2021-02-04 19:25:29 +00:00
|
|
|
stages:
|
|
|
|
- check
|
|
|
|
- test
|
2022-01-19 15:28:54 +00:00
|
|
|
- doc
|
2021-02-04 19:25:29 +00:00
|
|
|
|
|
|
|
flatpak:
|
2021-02-24 13:48:04 +00:00
|
|
|
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master'
|
2021-02-04 19:25:29 +00:00
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- flatpak
|
|
|
|
variables:
|
|
|
|
BUNDLE: "fractal-nightly.flatpak"
|
2021-02-04 23:21:16 +00:00
|
|
|
MANIFEST_PATH: "build-aux/org.gnome.FractalNext.Devel.json"
|
2021-02-04 19:25:29 +00:00
|
|
|
FLATPAK_MODULE: "fractal"
|
2021-02-04 23:21:16 +00:00
|
|
|
APP_ID: "org.gnome.FractalNext.Devel"
|
2021-02-04 19:25:29 +00:00
|
|
|
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
|
|
|
|
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}
|
2022-01-19 15:28:54 +00:00
|
|
|
- mkdir logs
|
|
|
|
- mv .flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt logs/
|
|
|
|
- mv .flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt logs/
|
|
|
|
|
2021-02-04 19:25:29 +00:00
|
|
|
artifacts:
|
|
|
|
name: 'Flatpak artifacts'
|
|
|
|
expose_as: 'Get Flatpak bundle here'
|
|
|
|
when: 'always'
|
|
|
|
paths:
|
|
|
|
- "${BUNDLE}"
|
2022-01-19 15:28:54 +00:00
|
|
|
- 'logs'
|
2021-02-04 19:25:29 +00:00
|
|
|
expire_in: 14 days
|
|
|
|
|
|
|
|
# Configure and run rustfmt
|
|
|
|
# Exits and builds fails if on bad format
|
|
|
|
rustfmt:
|
|
|
|
image: "rust:slim"
|
|
|
|
script:
|
|
|
|
- rustup component add rustfmt
|
|
|
|
- rustc -Vv && cargo -Vv
|
|
|
|
- cargo fmt --version
|
|
|
|
- cargo fmt --all -- --color=always --check
|
2021-04-24 15:08:53 +00:00
|
|
|
|
2022-01-14 21:50:42 +00:00
|
|
|
cargo-clippy:
|
|
|
|
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master'
|
2022-01-18 00:04:36 +00:00
|
|
|
stage: check
|
2022-01-14 21:50:42 +00:00
|
|
|
tags:
|
|
|
|
- flatpak
|
|
|
|
variables:
|
|
|
|
MANIFEST_PATH: "build-aux/org.gnome.FractalNext.Devel.json"
|
|
|
|
FLATPAK_MODULE: "fractal"
|
|
|
|
script:
|
|
|
|
- flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
|
|
|
|
- echo "cargo clippy -- -D warnings" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
|
|
|
|
|
2021-04-24 15:08:53 +00:00
|
|
|
pages:
|
2022-01-19 15:28:54 +00:00
|
|
|
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master'
|
2021-04-24 15:08:53 +00:00
|
|
|
variables:
|
|
|
|
RUSTDOCFLAGS: >
|
|
|
|
-Z unstable-options
|
2021-05-02 19:02:35 +00:00
|
|
|
--enable-index-page
|
2022-01-19 15:28:54 +00:00
|
|
|
--extern-html-root-url=gio=https://gtk-rs.org/gtk-rs-core/stable/latest/docs/gio/
|
|
|
|
--extern-html-root-url=gsk4=https://gtk-rs.org/gtk4-rs/stable/latest/docs/gsk4/
|
|
|
|
--extern-html-root-url=gdk4=https://gtk-rs.org/gtk4-rs/stable/latest/docs/gdk4/
|
|
|
|
--extern-html-root-url=gtk4=https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/
|
|
|
|
--extern-html-root-url=glib=https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/
|
|
|
|
--extern-html-root-url=libadwaita=https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/stable/latest/docs/libadwaita/
|
|
|
|
--extern-html-root-url=matrix-sdk=https://matrix-org.github.io/matrix-rust-sdk/matrix_sdk
|
|
|
|
stage: doc
|
|
|
|
tags:
|
|
|
|
- flatpak
|
|
|
|
variables:
|
|
|
|
MANIFEST_PATH: "build-aux/org.gnome.FractalNext.Devel.json"
|
|
|
|
FLATPAK_MODULE: "fractal"
|
2021-04-24 15:08:53 +00:00
|
|
|
script:
|
2022-01-19 15:28:54 +00:00
|
|
|
- flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
|
|
|
|
- echo "ninja src/doc" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
|
|
|
|
- mv .flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/src/doc public
|
|
|
|
- chmod -R a=rwx public
|
2021-04-24 15:08:53 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-01-19 15:28:54 +00:00
|
|
|
- 'public'
|
2021-04-24 15:08:53 +00:00
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- fractal-next
|