-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
189 lines (171 loc) · 6.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
include:
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
dist-job-name: "build-release-tarball" # <1.>
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}" # <2.>
variables:
# Clone test-images
GIT_SUBMODULE_STRATEGY: recursive
RUST_BACKTRACE: "full"
TARBALL_ARTIFACT_PATH: "builddir/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
.install_dependencies:
before_script:
- apt update
- apt install -y git curl meson pkg-config gobject-introspection gi-docgen valac libgirepository1.0-dev python3-gi build-essential liblcms2-dev gettext clang mold bubblewrap libseccomp-dev libfontconfig-dev
- git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules
- apt-get install -y clang cmake pkg-config libbrotli-dev
- export CC=clang CXX=clang++
- cd libjxl
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
- cmake --build . -- -j$(nproc)
- cmake --install .
- cd ../..
- echo "deb https://deb.debian.org/debian/ testing main" >> /etc/apt/sources.list
- apt-get update
- apt-get install -y libheif-dev libgtk-4-dev libcairo2-dev meson
- apt-get install -y librsvg2-2
# Get QOI support in bookworm
- apt-get install -y shared-mime-info
# Required for librsvg/fontconfig, somehow fails to install automatically.
# Issue is new, first seen 2024-09-12
- apt-get install -y libbz2-dev
artifacts:
when: always
paths:
- tests/failures
- builddir/meson-logs
build-release-tarball:
stage: build
image: rust:1.80-bookworm
extends: .install_dependencies
script:
- apt-get install -y gawk
- ./build-aux/publish-crates-io.py
- meson setup builddir
- meson dist -C builddir
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "${TARBALL_ARTIFACT_PATH}"
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
test-x86_64:
image: rust:1.80-bookworm
extends: .install_dependencies
interruptible: true
script:
- export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu/
# Skip isolated install for tests to test usual installation scenario
- meson setup -Dprofile=dev -Dpython_tests=true -Dtest_skip_install=true -Dcapi_docs=true --prefix=/usr builddir
- meson install -C builddir
- meson test -vC builddir
- mv builddir/libglycin/libglycin-1 libglycin-docs
- mv builddir/libglycin/libglycin-gtk4-1 libglycin-gtk4-docs
artifacts:
paths:
- libglycin-docs
- libglycin-gtk4-docs
test-i386:
# Use hash to force i386, lookup "MANIFEST DIGEST" here <https://hub.docker.com/r/i386/rust/tags>
image: rust@sha256:8f7ec0c462a97974a827203da3d48a0e0b650b3134b6ff62d4351bc4d35fd88e
extends: .install_dependencies
interruptible: true
# As long as 32-bit CI is so unstable
allow_failure: true
script:
- export LD_LIBRARY_PATH=/usr/local/lib/i386-linux-gnu/
- apt-get install -y ninja-build
- meson setup -Dprofile=dev -Dpython_tests=true -Dtest_skip_install=true -Dtest_skip_ext=avif --prefix=/usr builddir
- meson install -C builddir
- meson test -vC builddir
test-aarch64:
image: rust:1.80-bookworm
tags:
- aarch64
extends: .install_dependencies
interruptible: true
# As long as runners fail to start bwrap
allow_failure: true
script:
- export LD_LIBRARY_PATH=/usr/local/lib/aarch64-linux-gnu/
- meson setup -Dprofile=dev -Dpython_tests=true -Dtest_skip_install=true --prefix=/usr builddir
- meson install -C builddir
- meson test -vC builddir
test-fedora40-loaders-async-io:
image: 'registry.fedoraproject.org/fedora:41'
interruptible: true
script:
- dnf install --assumeyes glycin-loaders cargo bubblewrap glib2-devel gtk4-devel lcms2-devel libseccomp-devel fontconfig-devel
- dnf downgrade glycin-loaders -y --allowerasing --releasever=40
- GLYCIN_TEST_SKIP_EXT=exr cargo test -p tests -- --nocapture --test-threads 1 \
color color_exif_orientation color_iccp_pro gray_iccp icon exif fonts
test-fedora40-loaders-tokio:
image: 'registry.fedoraproject.org/fedora:41'
interruptible: true
script:
- dnf install --assumeyes glycin-loaders cargo bubblewrap glib2-devel gtk4-devel lcms2-devel libseccomp-devel fontconfig-devel
- dnf downgrade glycin-loaders -y --allowerasing --releasever=40
- GLYCIN_TEST_SKIP_EXT=exr cargo test -p tests --no-default-features --features tokio -- --nocapture --test-threads 1 \
color color_exif_orientation color_iccp_pro gray_iccp icon exif fonts
test-fedora41-loaders-async-io:
image: 'registry.fedoraproject.org/fedora:41'
interruptible: true
script:
- dnf install --assumeyes glycin-loaders cargo bubblewrap glib2-devel gtk4-devel lcms2-devel libseccomp-devel fontconfig-devel
- GLYCIN_TEST_SKIP_EXT=exr cargo test -p tests -- --nocapture --test-threads 1 \
color color_exif_orientation color_iccp_pro gray_iccp icon exif fonts
test-fedora41-loaders-tokio:
image: 'registry.fedoraproject.org/fedora:41'
interruptible: true
script:
- dnf install --assumeyes glycin-loaders cargo bubblewrap glib2-devel gtk4-devel lcms2-devel libseccomp-devel fontconfig-devel
- GLYCIN_TEST_SKIP_EXT=exr cargo test -p tests --no-default-features --features tokio -- --nocapture --test-threads 1 \
color color_exif_orientation color_iccp_pro gray_iccp icon exif fonts
cargo-semver-checks:
image: rust
extends: .install_dependencies
interruptible: true
variables:
GIT_DEPTH: 1000
script:
# We need libglycin to be properly installed for pkgconf to work in libglycin-gtk4
- meson setup -Dprofile=dev -Dglycin-loaders=true --prefix=/usr builddir
- meson install -C builddir
- cargo install cargo-semver-checks --locked
- cargo semver-checks -p glycin -p glycin-utils
- cargo semver-checks -p libglycin -p libglycin-gtk4 --baseline-rev 1.1.0
cargo-fmt:
image: rust
interruptible: true
script:
- rustup component add rustfmt
- cargo fmt --check
cargo-deny:
image: rust
interruptible: true
script:
- cargo install cargo-deny --locked
- cargo deny --target x86_64-unknown-linux-gnu check
cargo-vet:
image: "rust"
allow_failure: true
interruptible: true
script:
- cargo install cargo-vet
- CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu cargo vet
pages:
stage: deploy
dependencies:
- test-x86_64
script:
- mkdir public
- mv libglycin-docs public/libglycin
- mv libglycin-gtk4-docs public/libglycin-gtk4
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH