Commit 60ee6306 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Merge branch 'bilelmoussaoui/ci' into 'master'

Gitlab CI: use sdk-extensions template

See merge request !6
parents fda9976d 18f77d92
Pipeline #118698 passed with stages
in 11 minutes and 45 seconds
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak-ci-initiative-sdk-extensions.yml'
stages:
- lint
- test
- review
- deploy
variables:
BUNDLE: "icon-library-nightly.flatpak"
flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.32"
stage: "test"
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
extends: '.flatpak'
variables:
MANIFEST_PATH: "build-aux/org.gnome.design.IconLibraryDevel.json"
FLATPAK_MODULE: "icon-library"
MESON_ARGS: "-Dprofile=development"
APP_ID: "org.gnome.design.IconLibraryDevel"
script:
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
# Build the flatpak repo
- flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app ${MESON_ARGS} _build
- flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
- flatpak-builder --finish-only app ${MANIFEST_PATH}
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak build
--env=LANG=C.UTF-8
--env=NO_AT_BRIDGE=1
app
dbus-run-session
meson test -C _build --no-stdsplit --print-errorlogs
# Create a flatpak bundle
- flatpak build-export repo app
- flatpak build-bundle repo ${BUNDLE} ${APP_ID}
artifacts:
paths:
- $BUNDLE
expire_in: 5 days
cache:
key: "flatpak"
paths:
- .flatpak-builder/downloads/
- .flatpak-builder/git/
- target/
- target_test/
review:
stage: review
dependencies:
- flatpak
script:
- echo "Generating flatpak deployment"
artifacts:
paths:
- $BUNDLE
expire_in: 30 days
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
on_stop: stop_review
- flatpak
extends: '.review'
stop_review:
extends: '.stop_review'
stop_review:
stage: review
script:
- echo "Stopping flatpak deployment"
when: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
# Configure and run rustfmt
# Exits and builds fails if on bad format
......
{
"app-id": "org.gnome.design.IconLibraryDevel",
"runtime": "org.gnome.Platform",
"runtime-version": "3.32",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment