forked from edgardoh/darktable
-
-
Notifications
You must be signed in to change notification settings - Fork 39
332 lines (320 loc) · 12.6 KB
/
Copy pathci.yml
File metadata and controls
332 lines (320 loc) · 12.6 KB
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# This file is part of darktable,
# Copyright (C) 2020-2021 Hubert Kowalski.
# Copyright (C) 2020-2021 Pascal Obry.
# Copyright (C) 2021-2026 Aurélien PIERRE.
# Copyright (C) 2021 Daniel Vogelbacher.
# Copyright (C) 2021 luzpaz.
# Copyright (C) 2021-2022 Miloš Komarčević.
# Copyright (C) 2021-2022 parafin.
# Copyright (C) 2021 Simon Frei.
# Copyright (C) 2022 Apfelkraut.
# Copyright (C) 2022 naveen.
# Copyright (C) 2025 Guillaume Stutin.
# Copyright (C) 2025 Miguel Moquillon.
#
# darktable is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# darktable is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with darktable. If not, see <http://www.gnu.org/licenses/>.
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Keep in sync with manualrun.yml!
on:
push:
branches:
- master
- dev
- candidate
paths-ignore:
- "po/**"
- "packaging/**"
- "data/latex/**"
- "data/pixmaps/**"
- "data/pswp/**"
- "data/style/**"
- "data/themes/**"
- "data/watermarks/**"
- "**.md"
- "**.yml"
pull_request:
branches:
- master
paths-ignore:
- "po/**"
- "packaging/**"
- "data/latex/**"
- "data/lua/**"
- "data/pixmaps/**"
- "data/pswp/**"
- "data/style/**"
- "data/themes/**"
- "data/watermarks/**"
- "**.md"
workflow_dispatch:
permissions:
contents: read
jobs:
Linux:
name: Linux.${{ matrix.os.code }}.${{ matrix.compiler.compiler }}.${{ matrix.target }}.${{ matrix.btype }}.${{ matrix.generator }}
runs-on: ${{ matrix.os.label }}
strategy:
fail-fast: true
matrix:
os:
- { label: ubuntu-24.04, code: noble }
compiler:
- { compiler: GNU12, CC: gcc-12, CXX: g++-12, GCC_VER: "12", LLVM_VER: "" }
- { compiler: GNU14, CC: gcc-14, CXX: g++-14, GCC_VER: "14", LLVM_VER: "" }
- { compiler: LLVM20, CC: clang-20, CXX: clang++-20, GCC_VER: "", LLVM_VER: "20" }
btype:
- Debug
target:
- skiptest
- nofeatures
generator:
- Ninja
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
GCC_VER: ${{ matrix.compiler.GCC_VER }}
LLVM_VER: ${{ matrix.compiler.LLVM_VER }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_PREFIX: ${{ github.workspace }}/install
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
DARKTABLE_CLI: ${{ github.workspace }}/install/bin/ansel-cli
steps:
- name: Enable Ubuntu repositories
run: |
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
- name: Setup LLVM 20
run: |
sudo apt-get update
sudo apt-get install -y wget gnupg
wget https://apt.llvm.org/llvm-snapshot.gpg.key
sudo gpg --dearmor -o /usr/share/keyrings/llvm.gpg llvm-snapshot.gpg.key
echo "deb [signed-by=/usr/share/keyrings/llvm.gpg] http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install -y clang-20 libomp-20-dev clang-tidy-20
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1
path: src
- name: Install Base Dependencies
run: |
"${SRC_DIR}/packaging/install-deps-ubuntu.sh"
- name: Build and Install
run: |
cmake -E make_directory "${BUILD_DIR}";
cmake -E make_directory "${INSTALL_PREFIX}";
./src/.ci/ci-script.sh;
- name: Check if it runs
run: |
set +e
${INSTALL_PREFIX}/bin/ansel --version || true
${INSTALL_PREFIX}/bin/ansel-cli \
--width 2048 --height 2048 \
--apply-custom-presets false \
"${SRC_DIR}/data/pixmaps/256x256/ansel.png" \
output.png \
--core --disable-opencl --conf host_memory_limit=8192 \
--conf worker_threads=4 -t 4 \
--conf plugins/lighttable/export/force_lcms2=FALSE \
--conf plugins/lighttable/export/iccintent=0
status=$?
mkdir -p "${RUNNER_TEMP}/ansel-debug"
cp -v /tmp/ansel_bt_* "${RUNNER_TEMP}/ansel-debug/" 2>/dev/null || true
for f in /tmp/ansel_bt_*; do
[ -f "$f" ] && {
echo "===== $f ====="
cat "$f"
}
done
exit $status
- name: Check include hygiene
# Cheap, no compilation database needed, so it runs on every Linux variant. The
# ratchet is what catches a header pulling in a higher layer -- the case the
# unused-include check below is structurally blind to.
run: |
"${SRC_DIR}/tools/check_layering.sh"
"${SRC_DIR}/tools/check_module_boundaries.sh"
# `return FALSE` from a pointer-returning function. FALSE is 0, which is a valid
# null pointer constant, so this compiles silently in every configuration and
# only misleads the reader. Nothing else in the toolchain can see it.
python3 "${SRC_DIR}/tools/check_return_types.py" "${SRC_DIR}/src"
# A list built with g_list_prepend on BOTH sides of a repository boundary. The two
# prepends cancel, so the public function returns the opposite order to the single
# loop it replaced -- with identical SQL, a clean build and green CI. Twice now.
python3 "${SRC_DIR}/tools/check_list_order.py" "${SRC_DIR}/src"
- name: Check for includes added inside a conditional block
# Pull requests only: it compares against the base branch. An include placed inside a
# platform #ifdef compiles wherever that macro is set and fails everywhere else, which
# a single-platform build cannot show you.
if: ${{ github.event_name == 'pull_request' }}
run: |
cd "${SRC_DIR}"
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
./tools/check_conditional_includes.sh "origin/${{ github.base_ref }}"
- name: Check statelessness rules
# Measured from the compiled objects, so it needs the build above; Debug keeps the
# symbol tables objdump reads (an LTO Release build emits bytecode instead).
env:
BUILD_DIR: ${{ github.workspace }}/build
run: |
"${SRC_DIR}/tools/check_statelessness.sh"
- name: Check for unused includes in changed files
# Only on the LLVM variant: clang-tidy reads compile_commands.json, and a database
# written by GCC carries flags clang-tidy rejects. Only on pull requests, because it
# gates the diff rather than the tree -- see the script's header for why.
if: ${{ github.event_name == 'pull_request' && matrix.compiler.compiler == 'LLVM20' && matrix.target == 'skiptest' }}
env:
BUILD_DIR: ${{ github.workspace }}/build
CLANG_TIDY: clang-tidy-20
run: |
cd "${SRC_DIR}"
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
./tools/check_unused_includes.sh --changed "origin/${{ github.base_ref }}"
- name: Upload ansel backtrace
if: always()
uses: actions/upload-artifact@v4
with:
name: ansel-backtrace-${{ matrix.os.code }}-${{ matrix.compiler.compiler }}-${{ matrix.target }}-${{ matrix.btype }}
path: ${{ runner.temp }}/ansel-debug/*
if-no-files-found: ignore
- name: Run Integration test suite
#integration test can get "stuck" plus there are couple of errors here, so it needs to be addressed first
if: ${{ false }}
run: |
cd "${SRC_DIR}/tests/integration/"
./run.sh --no-opencl --no-deltae --fast-fail
Win64:
name: Win64.${{ matrix.msystem }}.${{ matrix.target }}.${{ matrix.btype }}.${{ matrix.generator }}
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
btype:
- Debug
eco: [-DUSE_XMLLINT=OFF]
target:
- skiptest
- nofeatures
generator:
- Ninja
msystem:
- UCRT64
defaults:
run:
shell: msys2 {0}
env:
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_PREFIX: ${{ github.workspace }}/install
ECO: ${{ matrix.eco }}
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
TARGET: ${{ matrix.target }}
GENERATOR: ${{ matrix.generator }}
# todo: use linker which supports --wrap, ld.bfd and ld.gold support it
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1
path: src
- name: Install Base Dependencies
run: |
$(cygpath ${SRC_DIR})/packaging/install-deps-windows-msys2.sh
- name: Build and Install
run: |
cmake -E make_directory "${BUILD_DIR}"
cmake -E make_directory "${INSTALL_PREFIX}"
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
- name: Check if it runs
run: |
$(cygpath ${INSTALL_PREFIX})/bin/ansel.exe --version || true
$(cygpath ${INSTALL_PREFIX})/bin/ansel-cli.exe --version || true
echo "Testing RUN!"
$(cygpath ${INSTALL_PREFIX})/bin/ansel-cli.exe \
--verbose \
--width 2048 --height 2048 \
--apply-custom-presets false \
$(cygpath ${SRC_DIR})/data/pixmaps/256x256/ansel.png \
output.png \
--core --disable-opencl --conf host_memory_limit=8192 \
--conf worker_threads=4 -t 4 \
--conf plugins/lighttable/export/force_lcms2=FALSE \
--conf plugins/lighttable/export/iccintent=0
macOS:
name: macOS.${{ matrix.compiler.compiler }}.${{ matrix.build.xcode }}.${{ matrix.target }}.${{ matrix.btype }}.${{ matrix.generator }}
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: true
matrix:
build:
- { os: macos-15, xcode: 26.3, deployment: 15.0 } # AppleClang 17, arm64
compiler:
- { compiler: XCode, CC: cc, CXX: c++ }
btype:
- Debug
target:
- skiptest
- nofeatures
generator:
- Ninja
eco: [-DUSE_GRAPHICSMAGICK=ON -DUSE_IMAGEMAGICK=OFF]
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.build.xcode }}.app/Contents/Developer
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.build.deployment }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_PREFIX: ${{ github.workspace }}/install
ECO: ${{ matrix.eco }}
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 1
path: ${{ env.SRC_DIR }}
- name: Install Base Dependencies
run: |
"${SRC_DIR}/packaging/install-deps-macos.sh"
- name: Build and Install
run: |
cmake -E make_directory "${BUILD_DIR}";
cmake -E make_directory "${INSTALL_PREFIX}";
./src/.ci/ci-script.sh;
- name: Check if it runs
run: |
${INSTALL_PREFIX}/bin/ansel --version || true
${INSTALL_PREFIX}/bin/ansel-cli \
--width 2048 --height 2048 \
--apply-custom-presets false \
"${SRC_DIR}/data/pixmaps/256x256/ansel.png" \
output.png \
--core --disable-opencl --conf host_memory_limit=8192 \
--conf worker_threads=4 -t 4 \
--conf plugins/lighttable/export/force_lcms2=FALSE \
--conf plugins/lighttable/export/iccintent=0