fractal/.gitlab-ci.yml

82 lines
3 KiB
YAML
Raw Normal View History

2021-02-04 19:25:29 +00:00
stages:
- check
- test
flatpak:
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}
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
# 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
2022-01-14 21:50:42 +00:00
cargo-clippy:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master'
stage: test
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}
pages:
image: "ghcr.io/gtk-rs/gtk4-rs/gtk4:latest"
variables:
RUSTDOCFLAGS: >
-Z unstable-options
--enable-index-page
--extern-html-root-url=gio=https://gtk-rs.org/gtk-rs/git/docs
--extern-html-root-url=gsk4=https://gtk-rs.org/gtk4-rs/git/docs
--extern-html-root-url=gdk4=https://gtk-rs.org/gtk4-rs/git/docs
--extern-html-root-url=gtk4=https://gtk-rs.org/gtk4-rs/git/docs
--extern-html-root-url=glib=https://gtk-rs.org/gtk-rs/git/docs
--extern-html-root-url=libadwaita=https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/libadwaita/
--extern-html-root-url=matrix-sdk=https://docs.rs/matrix-sdk
script:
# generate the docs
- dnf update -y
2021-11-25 13:36:12 +00:00
- dnf install -y openssl-devel cmake gtk-update-icon-cache llvm pipewire-devel clang
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- source $HOME/.cargo/env
- meson _build --prefix=/usr -Dskip-cargo-build=true
- ninja -C _build install
- cargo doc -p fractal --no-deps
- mv target/doc/ public
artifacts:
paths:
- public
only:
refs:
- fractal-next