-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
95 lines (85 loc) · 2.93 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
stages:
- check
- test
- deploy
include:
- project: "GNOME/citemplates"
file: "templates/default-rules.yml"
- project: "GNOME/citemplates"
file: "flatpak/flatpak_ci_initiative.yml"
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
dist-job-name: "flatpak@x86_64"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
- component: "gitlab.gnome.org/GNOME/citemplates/basic-deploy-docs@master"
inputs:
docs-job-name: "cargo-doc"
variables:
BUNDLE: "org.gnome.Snapshot.Devel.flatpak"
MANIFEST_PATH: "build-aux/org.gnome.Snapshot.Devel.json"
FLATPAK_MODULE: "snapshot"
APP_ID: "org.gnome.Snapshot.Devel"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
TARBALL_ARTIFACT_PATH: ".flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
flatpak@x86_64:
extends: ".flatpak@x86_64"
interruptible: true
variables:
CONFIG_OPTS: "-Dprofile=default"
flatpak@aarch64:
extends: ".flatpak@aarch64"
allow_failure: true
interruptible: true
variables:
CONFIG_OPTS: "-Dprofile=default"
rustfmt:
image: "rust:slim"
stage: check
script:
- rustup component add rustfmt
- echo -e "" >> src/config.rs
- rustc -Vv && cargo -Vv
- cargo fmt --version
- cargo fmt --all -- --color=always --check
codespell:
stage: check
script:
- dnf install -y codespell
- codespell -S "*.png,*.po,.git,*.jpg" -L crate -f
cargo-doc:
stage: test
image: "ghcr.io/gtk-rs/gtk4-rs/gtk4:latest"
interruptible: true
artifacts:
name: 'Code Documentation'
paths:
- ${CI_PROJECT_NAME}-docs.tar.gz
variables:
DOC_OPTIONS: |
--extern-html-root-url=gtk4=https://gtk-rs.org/gtk4-rs/stable/latest/docs/
--extern-html-root-url=gio=https://gtk-rs.org/gtk-rs-core/stable/latest/docs/
--extern-html-root-url=glib=https://gtk-rs.org/gtk-rs-core/stable/latest/docs/
--extern-html-root-url=gio=https://gtk-rs.org/gtk-rs-core/stable/latest/docs/
--extern-html-root-url=gstreamer=https://gstreamer.pages.freedesktop.org/gstreamer-rs/stable/latest/docs/
before_script:
- sudo dnf install -y gstreamer1-devel gstreamer1-plugins-base-devel
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
- source $HOME/.cargo/env
- rustup toolchain install nightly --profile minimal --allow-downgrade
script:
- cargo +nightly rustdoc -p aperture -- -Z unstable-options ${DOC_OPTIONS}
- tar --auto-compress --create --file "$CI_PROJECT_DIR/${CI_PROJECT_NAME}-docs.tar.gz" --directory "target/doc" .
cargo-audit:
stage: test
interruptible: true
image: rust
allow_failure: true
script:
- cargo install cargo-deny
- cargo deny check advisories bans sources
nightly@x86_64:
extends: ".publish_nightly"
needs: ["flatpak@x86_64"]
nightly@aarch64:
extends: ".publish_nightly"
needs: ["flatpak@aarch64"]