-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
65 lines (56 loc) · 1.83 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
stages:
- check
- test
- deploy
variables:
BUNDLE: "org.gnome.FractalDevel.flatpak"
MANIFEST_PATH: "flatpak/org.gnome.Fractal.json"
FLATPAK_MODULE: "fractal"
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.36"
.flatpak_cache_template: &flatpak_cache
cache:
key: "flatpak"
paths:
- .flatpak-builder/cache/
- _build/target/
- target_docs/
- target_test/
check:
image: "registry.gitlab.com/alatiera/rustfmt-oci-image/rustfmt:stable"
stage: "check"
script:
# Create blank versions of our configured files
# so rustfmt does not yell about non-existent files or completely empty files
- echo -e "" >> fractal-gtk/src/config.rs
- echo -e "" >> fractal-gtk/src/static_resources.rs
- rustc -Vv && cargo -Vv
- cargo --version
- cargo fmt --all -- --check
flatpak:
extends: '.flatpak'
image: "$FLATPAK_IMAGE"
variables:
RUNTIME_REPO: 'https://nightly.gnome.org/gnome-nightly.flatpakrepo'
APP_ID: "org.gnome.FractalDevel"
nightly:
extends: '.publish_nightly'
dependencies: ['flatpak']
needs: ['flatpak']
pages:
image: "$FLATPAK_IMAGE"
stage: deploy
tags:
- flatpak
script:
- flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} --force-clean app ${MANIFEST_PATH}
- flatpak-builder --user --disable-rofiles-fuse --run app ${MANIFEST_PATH} meson _build
- flatpak-builder --user --disable-rofiles-fuse --run app ${MANIFEST_PATH} ninja -C _build doc
- rm -rf public
- mv _build/target/doc/ public
artifacts:
paths:
- public
only:
- master
<<: *flatpak_cache