-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
43 lines (41 loc) · 1.56 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
stages:
- check
- test
flatpak:
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-46'
stage: test
tags:
- flatpak
variables:
BUNDLE: "gtk-rust-template-nightly.flatpak"
MANIFEST_PATH: "build-aux/com.belmoussaoui.GtkRustTemplate.Devel.json"
FLATPAK_MODULE: "gtk-rust-template"
APP_ID: "com.belmoussaoui.GtkRustTemplate.Devel"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
script:
- flatpak install --user --noninteractive flathub org.freedesktop.Sdk.Extension.llvm16//23.08
- >
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
# Create blank versions of our configured files
# so rustfmt does not yell about non-existent files or completely empty files
- echo -e "" >> src/config.rs
- rustc -Vv && cargo -Vv
- cargo fmt --version
- cargo fmt --all -- --color=always --check