Commit 8e5340b3 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui
Browse files

Merge branch 'bilelmoussaoui/ci' into 'master'

Gitlab CI: use sdk-template

See merge request !2
parents d72a6f10 b01cdc6c
Pipeline #118722 passed with stages
in 8 minutes and 57 seconds
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak-ci-initiative-sdk-extensions.yml'
stages:
- lint
- test
- review
- deploy
variables:
BUNDLE: "banner-viewer-nightly.flatpak"
flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
stage: "test"
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
extends: '.flatpak'
variables:
MANIFEST_PATH: "build-aux/org.gnome.design.BannerViewerDevel.json"
FLATPAK_MODULE: "banner-viewer"
MESON_ARGS: "-Dprofile=development"
APP_ID: "org.gnome.design.BannerViewerDevel"
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
# Create a flatpak bundle
- 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
- 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:
stage: review
script:
- echo "Stopping flatpak deployment"
when: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
stop_review:
extends: '.stop_review'
# Configure and run rustfmt
# Exits and builds fails if on bad format
......
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