mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 00:34:40 +01:00
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
variables:
|
|
BUNDLE: "authenticator-nightly.flatpak"
|
|
MANIFEST_PATH: "build-aux/com.belmoussaoui.Authenticator.Devel.json"
|
|
FLATPAK_MODULE: "authenticator"
|
|
APP_ID: "com.belmoussaoui.Authenticator.Devel"
|
|
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
|
|
|
stages:
|
|
- deploy
|
|
- check
|
|
- test
|
|
|
|
flatpak:
|
|
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
|
|
stage: test
|
|
tags:
|
|
- flatpak
|
|
script:
|
|
- >
|
|
xvfb-run -a -s "-screen 0 1024x768x24"
|
|
flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
|
|
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
|
|
artifacts:
|
|
name: 'Flatpak artifacts'
|
|
expose_as: 'Get Flatpak bundle here'
|
|
when: 'always'
|
|
paths:
|
|
- "${BUNDLE}"
|
|
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt'
|
|
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt'
|
|
expire_in: 14 days
|
|
|
|
rustfmt:
|
|
image: "rust:slim"
|
|
stage: check
|
|
script:
|
|
- rustup component add rustfmt
|
|
- echo -e "" >> src/config.rs
|
|
- echo -e "" >> src/static_resources.rs
|
|
- rustc -Vv && cargo -Vv
|
|
- cargo fmt --version
|
|
- cargo fmt --all -- --color=always --check
|
|
|
|
docs:
|
|
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
|
|
stage: deploy
|
|
tags:
|
|
- flatpak
|
|
script:
|
|
- flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} --force-clean flatpak_app ${MANIFEST_PATH}
|
|
- flatpak build --with-appdir --share=network --env=PATH="$PATH:/usr/lib/sdk/rust-stable/bin" flatpak_app cargo doc -p authenticator --no-deps --all-features
|
|
- rm -rf public
|
|
- mv _build/target/doc/ public
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master
|