-
Notifications
You must be signed in to change notification settings - Fork 860
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
1017 lines (960 loc) · 42.1 KB
/
.gitlab-ci.yml
File metadata and controls
1017 lines (960 loc) · 42.1 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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
spec:
inputs:
distribution_pipeline:
description: 'Pipelines that creates installable GIMP'
options:
- GIMP_CI_APPIMAGE #trigger the appimage making (base & fast).
- GIMP_CI_FLATPAK #trigger the flatpak build and publishing (base but slow)
- GIMP_CI_SNAP #trigger the snap build (base but slow)
- GIMP_CI_WIN_INSTALLER #trigger all native MSYS2 builds then creates Inno Windows installer (base but slow)
- GIMP_CI_MS_STORE #trigger arm64 and x64 native MSYS2 builds then creates a .msixbundle (base but slow)
- GIMP_CI_MACOS #trigger arm64 native macOS build then create a .dmg installer (base but slow)
- none
default: 'none'
test_pipeline:
description: 'Pipelines used only for testing'
options:
- GIMP_CI_MESON_CLANG #trigger the Debian Clang build (rare usefulness)
- GIMP_CI_MESON_MSVC #trigger the Windows Clang-CL/MSVC build (rare usefulness)
- GIMP_CI_MESON_APPLECLANG #trigger the Apple Clang build with Homebrew packages (rare usefulness)
- GIMP_CI_RASTER_ICONS #trigger the Debian Clang build without vector icons (rare usefulness)
- GIMP_CI_CPPCHECK #trigger cppcheck (static code analysis)
- none
default: 'none'
---
workflow:
auto_cancel:
on_new_commit: interruptible
##################################################
# There are five "TYPES" of pipelines on our CI: #
##################################################
## 1. On MERGE REQUESTS, the following are triggered:
## - Abbreviated Linux build
## - Building quality tests (static code analysis)
## - clang-format (static code analysis)
## - Execution tests (dynamic code analysis)
.pipeline_merge: &CI_MERGE
if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
interruptible: true
variables: {}
## 2. LABELED MERGE REQUESTS (search for $CI_MERGE_REQUEST_LABELS =~ /.*Package).
#'interruptible: true' needs to be hardcoded on job rules
# GitLab is quite sensitive about rules 'if' order so be careful
## 3. On COMMITS except tags.
## - Linux build
## - Building quality tests (static code analysis)
## - Execution tests (dynamic code analysis)
## - Source tarball
## - Developer documentation
.pipeline_commit: &CI_COMMIT
if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_TAG == null'
interruptible: true
variables: {}
## 4. RELEASES.
## - Source tarball
## - Developer documentation
## - Linux .appimage
## - Inno Windows installer
## - MS Store .msixupload
.pipeline_release: &CI_RELEASE
if: '$CI_COMMIT_TAG != null'
interruptible: false
variables: {}
.default:
## 5. On CUSTOM builds though web GUI, API or schedules.
## Scheduled CI ($CI_PIPELINE_SOURCE == "schedule") will run regularly all
## the 'distribution_pipeline' and 'test_pipeline' above. To run them without
## waiting for schedules: https://gitlab.gnome.org/GNOME/gimp/-/pipelines/new
interruptible: false
# Common jobs behavior
retry:
max: 1
when:
- 'scheduler_failure'
needs: []
# Default Docker image (keep variables: DEB_VERSION: consistent with devel-docs/os-support.txt)
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
variables:
DEB_VERSION: "bookworm"
UMFPACK: libumfpack5
RUNNER: "x86_64_v3"
# Common cloning procedure
GIT_DEPTH: "1"
GIT_SUBMODULE_STRATEGY: none
# Enable colorful output when supported (e.g. ninja, cppcheck)
CLICOLOR_FORCE: "1"
# Disable timestamps on CI logs
FF_TIMESTAMPS: false
# Common artifacts behavior
artifacts:
name: "${CI_JOB_NAME_SLUG}${VARIANT}-${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}"
when: always
stages:
- dependencies
- build
- analysis
- distribution
## Common GNU/Linux 64-bit CI (Debian) ##
.debian-nonreloc:
extends: .default
rules:
- <<: *CI_MERGE
- <<: *CI_COMMIT
variables: {}
- if: '$GIMP_CI_MESON_CLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_CLANG.*/'
variables:
CC: clang
CXX: clang++
CC_LD: lld
CXX_LD: lld
TOOLCHAIN: "clang lld"
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
VARIANT: -clang
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
variables:
MESON_OPTIONS: "-Dvector-icons=false"
VARIANT: "-raster"
- <<: *CI_RELEASE
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
timeout: 40m
.debian_environ: &ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
- printf "\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\n"
- gcc -print-multi-os-directory 2>/dev/null | grep -q ./ && export LIB_DIR=$(gcc -print-multi-os-directory | sed 's/\.\.\///g') || export LIB_DIR="lib"
- gcc -print-multiarch 2>/dev/null | grep -q . && export LIB_SUBDIR=$(echo $(gcc -print-multiarch)'/') || export LIB_SUBDIR=
## Build-time vars
- export PKG_CONFIG_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
- export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
## Runtime vars
- export PATH="${GIMP_PREFIX}/bin:$PATH"
- export LD_LIBRARY_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
- printf "\e[0Ksection_end:`date +%s`:environ\r\e[0K\n"
deps-debian-nonreloc:
extends: .debian-nonreloc
stage: dependencies
image: quay.io/containers/aio:latest
variables:
GIT_STRATEGY: none
script:
- export BUILDAH_FORMAT=docker
- export BUILDAH_ISOLATION=chroot
- export STORAGE_DRIVER=vfs
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
# Install deps
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
- echo "RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends ca-certificates \\" >> Dockerfile
## Build-time only dependencies
- echo "${TOOLCHAIN:-build-essential}
appstream
bison
desktop-file-utils
flex
gi-docgen
git
gobject-introspection
libgtk-3-bin
meson
valac
xsltproc \\" >> Dockerfile
## Runtime dependencies
- echo "at-spi2-core
ffmpeg
gettext
gjs
glib-networking
graphviz
graphviz-dev
gvfs
iso-codes
libaa1-dev
libappstream-dev
libarchive-dev
libasound2-dev
libbz2-dev
libcfitsio-dev
libgexiv2-dev
libgirepository1.0-dev
libgs10
libgs-dev
libgtk-3-dev
libgudev-1.0-dev
libheif-dev
$LIBHEIF_PLUGINS
libjson-glib-dev
libjxl-dev
liblcms2-dev
liblzma-dev
libmaxflow-dev
libmng-dev
libmypaint-dev
libomp-dev
libopenexr-dev
libopenjp2-7-dev
libpoppler-glib-dev
libqoi-dev
librsvg2-dev
libsuitesparse-dev
libtiff-dev
$UMFPACK
libunwind-dev
libwebp-dev
libwmf-dev
libxmu-dev
libxpm-dev
locales
mypaint-brushes
poppler-data
python3
python3-gi
python3-gi-cairo
xdg-utils" >> Dockerfile
- echo "RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen" >> Dockerfile
# Prepare environ
- echo "FROM $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}" > Dockerfile2;
- echo "RUN printf \"\e[0Ksection_start:\`date +%s\`:environ[collapsed=true]\r\e[0KPreparing build environment\n\"" >> Dockerfile2;
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/lib/$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/")pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\"" >> Dockerfile2;
- echo "ENV XDG_DATA_DIRS=\"${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}\"" >> Dockerfile2;
- if [ "$VARIANT" = "-clang" ]; then
echo "ENV CC=\"$CC\"" >> Dockerfile2;
echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
fi
- echo "ENV CLICOLOR_FORCE=\"1\"" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:\`date +%s\`:environ\r\e[0K\n\"" >> Dockerfile2;
# Build some dependencies
## Build babl
- echo "RUN printf \"\e[0Ksection_start:\`date +%s\`:babl_build[collapsed=true]\r\e[0KBuilding babl\n\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/babl.git | grep -oi \"BABL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git" babl >> Dockerfile2;
# TODO: remove this line once we have a babl 0.1.126. Takes care of an option name change.
- export BABL_RELOCATABLE_OPTION=$(([ $CI_COMMIT_TAG ] && (([ $RELOCATABLE_OPTION ] && echo -Drelocatable=enabled) || true)) || echo $RELOCATABLE_OPTION)
- echo "RUN meson setup babl/_build-${RUNNER} babl -Dprefix=\"${GIMP_PREFIX}\" $BABL_RELOCATABLE_OPTION $PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI" >> Dockerfile2;
- echo "RUN ninja -C babl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C babl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:\`date +%s\`:babl_build\r\e[0K\n\"" >> Dockerfile2;
## Build GEGL
- echo "RUN printf \"\e[0Ksection_start:\`date +%s\`:gegl_build[collapsed=true]\r\e[0KBuilding gegl\n\"" >> Dockerfile2;
- echo "RUN git clone --branch \"\$([ \"$CI_COMMIT_TAG\" ] && echo \"\$(git ls-remote --tags --exit-code --refs https://gitlab.gnome.org/GNOME/gegl.git | grep -oi \"GEGL_[0-9]*_[0-9]*_[0-9]*\" | sort --version-sort | tail -1)\" || echo \"master\")\" --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git" gegl >> Dockerfile2;
- echo "RUN meson setup gegl/_build-${RUNNER} gegl -Dprefix=\"${GIMP_PREFIX}\" $RELOCATABLE_OPTION $PKGCONF_RELOCATABLE_OPTION $WARN_AS_ERROR_ON_CI" >> Dockerfile2;
- echo "RUN ninja -C gegl/_build-${RUNNER}" >> Dockerfile2;
- echo "RUN ninja -C gegl/_build-${RUNNER} install" >> Dockerfile2;
- echo "RUN printf \"\e[0Ksection_end:\`date +%s\`:gegl_build\r\e[0K\n\"" >> Dockerfile2;
#FIXME: '2>&1 | grep -v STEP' since buildah is too verbose. See: https://github.com/containers/buildah/issues/6362
- printf "\e[0Ksection_start:`date +%s`:deps_install[collapsed=true]\r\e[0KInstalling dependencies provided by Debian $DEB_VERSION\n"
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile --tag $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} --layers --cache-from $CI_REGISTRY_IMAGE/cache --cache-to $CI_REGISTRY_IMAGE/cache --cache-ttl=120h --iidfile new_image_id.txt 2>&1 | grep -v STEP
- if [ "$(skopeo inspect --config "docker://$CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}" 2>/dev/null | sed -n '/"diff_ids"/,/\]/p' | grep -o 'sha256:[a-f0-9]*' | tr '\n' ',' || echo "none")" != "$(buildah inspect --format '{{if .OCIv1.RootFS}}{{range .OCIv1.RootFS.DiffIDs}}{{.}},{{end}}{{else}}{{range .Docker.RootFS.DiffIDs}}{{.}},{{end}}{{end}}' "$(cat new_image_id.txt)")" ]; then buildah push --log-level error --compression-format zstd --compression-level 3 --force-compression $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} 2>&1 | grep -v STEP; fi
- printf "\e[0Ksection_end:`date +%s`:deps_install\r\e[0K\n"
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile2 --no-cache 2>&1 | grep -v STEP
artifacts:
paths:
- _install-${RUNNER}/
- babl/_build-${RUNNER}/meson-logs/meson-log.txt
- babl/_build-${RUNNER}/config.h
- gegl/_build-${RUNNER}/meson-logs/meson-log.txt
- gegl/_build-${RUNNER}/config.h
expire_in: 4 hours
gimp-debian-nonreloc:
extends: .debian-nonreloc
needs: ["deps-debian-nonreloc"]
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- *ENVIRON
# Check building
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Dfile-plug-ins-test=true
$MESON_OPTIONS $WARN_AS_ERROR_ON_CI
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
# Check execution
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
- ninja test
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
# Check source
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
- if [ $(git diff |wc -l) -ne 0 ]; then
printf "ERROR. A generated file was updated without the source:\n";
git diff;
exit 1;
fi
- if [ "$VARIANT" != "-clang" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
fi
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
# Check install
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking non-relocatable GIMP installation\n"
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
artifacts:
paths:
- _install-${RUNNER}/
- _build-${RUNNER}/meson-logs/meson-log.txt
- _build-${RUNNER}/meson-dist/
- _build-${RUNNER}/config.h
reports:
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
expire_in: 2 days
## AppImage CI (Debian) ##
.debian:
extends: .debian-nonreloc
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:AppImage.*/'
interruptible: true
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: [aarch64, x86_64_v3]
tags:
- $RUNNER
variables:
#FIXME: remove this variables: key and go back to relying on .default DEB_VERSION on GIMP 3.3/3.4
DEB_VERSION: "trixie"
UMFPACK: libumfpack6
LIBHEIF_PLUGINS: "libheif-plugin-dav1d libheif-plugin-aomenc libheif-plugin-libde265 libheif-plugin-x265 libheif-plugin-j2kdec libheif-plugin-j2kenc"
deps-debian:
extends: .debian
stage: !reference [deps-debian-nonreloc, stage]
image: !reference [deps-debian-nonreloc, image]
variables:
GIT_STRATEGY: none
RELOCATABLE_OPTION: '-Drelocatable-bundle=yes'
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
script:
- !reference [deps-debian-nonreloc, script]
artifacts: !reference [deps-debian-nonreloc, artifacts]
gimp-debian:
extends: .debian
needs: ["deps-debian"]
stage: !reference [gimp-debian-nonreloc, stage]
variables:
#FIXME: remove this variables: key and go back to relying on gimp-debian-nonreloc variables: on GIMP 3.3/3.4
GIT_SUBMODULE_STRATEGY: recursive
script:
- *ENVIRON
# Build GIMP
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
-Drelocatable-bundle=yes
-Dpkgconfig.relocatable=true
-Dgi-docgen=disabled
-Dcheck-update=yes
-Dbuild-id=org.gimp.GIMP_official.AppImage.$(uname -m)
- cd _build-${RUNNER}
- ninja
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
# Create bundle
- printf "\e[0Ksection_start:`date +%s`:gimp_bundle[collapsed=true]\r\e[0KCreating AppDir bundle\n"
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; }
- cd ..
- sh build/linux/appimage/3_dist-gimp-goappimage.sh --bundle-only > goappimage.log 2>&1 || { cat goappimage.log; exit 1; }
- printf "\e[0Ksection_end:`date +%s`:gimp_bundle\r\e[0K\n"
artifacts:
paths:
- AppDir*/
- appimageignore*
- _build-${RUNNER}/meson-logs/meson-log.txt
- _build-${RUNNER}/config.h
expire_in: 2 days
## Flatpak CI (Fedora) ##
.flatpak:
extends: .default
#We need to specify this since .flatpak from flatpak_ci_initiative.yml sets to true
interruptible: false
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Flatpak.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Flatpak.*/'
interruptible: true
- if: '$GIMP_CI_FLATPAK != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_FLATPAK.*/'
parallel:
matrix:
- RUNNER: [flatpak-aarch64, flatpak-x86_64]
tags:
- $RUNNER
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master
variables:
RUN_TESTS: 0
MESON_DIST: 0
before_script:
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
#40min is enough only if no module was updated/rebuilt, we need more time in case of module bumps
timeout: 240m
deps-flatpak:
extends: .flatpak
stage: dependencies
script:
- sh build/linux/flatpak/1_build-deps-flatpakbuilder.sh
artifacts:
paths:
- _build-$RUNNER
- flatpak-builder.log
- babl-meson-log.txt
- gegl-meson-log.txt
expire_in: 4 hours
gimp-flatpak:
extends: .flatpak
needs: ["deps-flatpak"]
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- sh build/linux/flatpak/2_build-gimp-flatpakbuilder.sh
artifacts:
paths:
- temp*.flatpak
- repo*.tar
- gimp-flatpak-builder.log
- gimp-meson-log.txt
expire_in: 2 days
## Snap CI (Ubuntu) ##
.snap:
extends: .default
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Snap.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Snap.*/'
interruptible: true
- if: '$GIMP_CI_SNAP != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_SNAP.*/'
- <<: *CI_RELEASE
parallel:
matrix:
- RUNNER: [aarch64, x86_64_v3]
tags:
- $RUNNER
image: $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER}
variables:
SNAPCRAFT_BASE_VERSION: "8_core24"
RUNNER: x86_64_v3
timeout: 40m
deps-snap:
extends: .snap
stage: dependencies
image: quay.io/containers/aio:latest
script:
- export BUILDAH_FORMAT=docker
- export BUILDAH_ISOLATION=chroot
- export STORAGE_DRIVER=vfs
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
# Install deps
- echo "FROM ghcr.io/canonical/snapcraft:${SNAPCRAFT_BASE_VERSION}" > Dockerfile
- echo "ENTRYPOINT [\"\"]" >> Dockerfile
- echo "WORKDIR $CI_PROJECT_DIR" >> Dockerfile
- echo "ENV GITLAB_CI=1" >> Dockerfile
- echo "ENV RUNNER=$RUNNER" >> Dockerfile
- echo "RUN apt-get update -y && apt-get install -y curl jq squashfs-tools sudo git locales" >> Dockerfile
- echo "RUN echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen" >> Dockerfile
#FIXME: https://github.com/canonical/snapcraft-rocks/issues/37 and https://github.com/canonical/snapcraft-rocks/issues/33
- echo "RUN cp -r /usr/lib/python3.*/site-packages/extensions/* /usr/share/snapcraft/extensions/ && ln -s /usr/libexec/snapcraft/craftctl /usr/bin/craftctl" >> Dockerfile
- echo "RUN sh build/linux/snap/1_build-deps-snapcraft.sh --install-snaps" >> Dockerfile;
# Build babl and GEGL
- echo "FROM $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER}" > Dockerfile2;
- if [ "$CI_COMMIT_TAG" ]; then
echo "ENV CI_COMMIT_TAG=\"$CI_COMMIT_TAG\"" >> Dockerfile2;
fi
- echo "RUN sh build/linux/snap/1_build-deps-snapcraft.sh" >> Dockerfile2;
#FIXME: '2>&1 | grep -v STEP' since buildah is too verbose. See: https://github.com/containers/buildah/issues/6362
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile --tag $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER} --layers --cache-from $CI_REGISTRY_IMAGE/cache --cache-to $CI_REGISTRY_IMAGE/cache --cache-ttl=120h --iidfile new_image_id.txt 2>&1 | grep -v STEP
- if [ "$(skopeo inspect --config "docker://$CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER}" 2>/dev/null | sed -n '/"diff_ids"/,/\]/p' | grep -o 'sha256:[a-f0-9]*' | tr '\n' ',' || echo "none")" != "$(buildah inspect --format '{{if .OCIv1.RootFS}}{{range .OCIv1.RootFS.DiffIDs}}{{.}},{{end}}{{else}}{{range .Docker.RootFS.DiffIDs}}{{.}},{{end}}{{end}}' "$(cat new_image_id.txt)")" ]; then buildah push --log-level error --compression-format zstd --compression-level 3 --force-compression $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_BASE_VERSION}-${RUNNER} 2>&1 | grep -v STEP; fi
- buildah build --log-level error --volume $CI_PROJECT_DIR:$CI_PROJECT_DIR:Z --file $CI_PROJECT_DIR/Dockerfile2 --no-cache 2>&1 | grep -v STEP
artifacts:
paths:
- _install-$RUNNER.tar
- _build-$RUNNER.tar
- babl-meson-log.tar
- gegl-meson-log.tar
expire_in: 4 hours
gimp-snap:
extends: .snap
needs: ["deps-snap"]
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- sh build/linux/snap/2_build-gimp-snapcraft.sh
artifacts:
paths:
- temp*.snap
- gimp-snapcraft.log
- gimp-meson-log.tar
expire_in: 2 days
## WINDOWS pipelines (native MSYS2) ##
.win:
extends: .default
rules:
#Developers (on GNOME/gimp namespace) can create multi-arch installers (.exe or .msixbundle)
#Non developers (e.g. on MRs), however, can create x64-only installers (.exe or .msix)
- if: '$RUNNER == "windows-aarch64" && $CI_PROJECT_NAMESPACE != "GNOME"'
when: never
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/ && $CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/) || ($CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Windows Installer.*/ && $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Microsoft Store.*/)'
interruptible: true
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
STORE_OPTION: '-Dms-store=true'
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Windows Installer.*/) && $CI_JOB_NAME !~ /.*store.*/'
interruptible: true
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
- if: '($CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Microsoft Store.*/) && $CI_JOB_NAME !~ /.*installer.*/'
interruptible: true
variables:
STORE_OPTION: '-Dms-store=true'
- if: '$GIMP_CI_WIN_INSTALLER != null && $GIMP_CI_MS_STORE != null'
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
STORE_OPTION: '-Dms-store=true'
- if: '($GIMP_CI_WIN_INSTALLER != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_WIN_INSTALLER.*/) && $CI_JOB_NAME !~ /.*store.*/'
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
- if: '($GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/) && $CI_JOB_NAME !~ /.*installer.*/'
variables:
STORE_OPTION: '-Dms-store=true'
- if: '($GIMP_CI_MESON_MSVC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_MSVC.*/) && $CI_JOB_NAME !~ /.*installer.*/ && $CI_JOB_NAME !~ /.*store.*/ && $CI_JOB_NAME !~ /.*aarch64.*/'
variables:
VCPKG_ROOT: "$CI_PROJECT_DIR/vcpkg"
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
VARIANT: "-msvc"
- <<: *CI_RELEASE
variables:
INSTALLER_OPTION: '-Dwindows-installer=true'
STORE_OPTION: '-Dms-store=true'
parallel:
matrix:
- RUNNER: [windows-aarch64, win32-ps]
tags:
- $RUNNER
variables:
MSYS_ROOT: 'C:/msys64'
#See: https://gitlab.gnome.org/creiter/gitlab-ci-win32-runner-v2/-/commit/5bb796c37b212b592f0c7432de44ca0ad0c41707
CC: 'cc'
CXX: 'c++'
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
- $GIMP_PREFIX = "$PWD\_install-$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())"
- if ("$VARIANT" -eq '-msvc') { if (-not (Test-Path $env:VCPKG_ROOT)) { git clone --depth 1 https://github.com/microsoft/vcpkg; .\vcpkg\bootstrap-vcpkg.bat }; pip install meson }
- if ("$VARIANT" -eq '-msvc') { $VSINSTALLDIR = $(vswhere -products * -latest -property installationPath); Import-Module "$VSINSTALLDIR\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"; Enter-VsDevShell -VsInstallPath "$VSINSTALLDIR" -SkipAutomaticLocation -DevCmdArguments "-arch=$(((Get-WmiObject Win32_ComputerSystem).SystemType).Split('-')[0].Trim().ToLower())" }
#40min is enough only on msys2 or if no vcpkg port was updated/rebuilt, we need more time in case of port bumps
timeout: 240m
.win_environ: &WIN_ENVIRON
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
- Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):win_environ[collapsed=true]$([char]13)$([char]27)[0KPreparing build environment"
## Build-time vars
- $env:PKG_CONFIG_PATH = "$GIMP_PREFIX/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/pkgconfig;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/pkgconfig;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share/pkgconfig"
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/share;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/share"
## Runtime vars
- $env:PATH = "$GIMP_PREFIX/bin;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/bin;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/bin;$env:PATH"
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$env:VCPKG_ROOT/installed/$env:VCPKG_DEFAULT_TRIPLET/lib/girepository-1.0;$env:MSYS_ROOT/$env:MSYSTEM_PREFIX/lib/girepository-1.0"
## MSVC-specific vars
- if ($env:VCPKG_ROOT) { $env:CC='clang-cl'; $env:CXX='clang-cl'; $env:PKG_CONFIG="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\pkgconf\pkgconf.exe"; $env:PATH="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\glib;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gdk-pixbuf;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\gettext\bin;$(Resolve-Path $env:VCPKG_ROOT\downloads\tools\perl\*.*\perl\bin -ErrorAction SilentlyContinue);$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxml2;$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\tools\libxslt;$env:PATH"; $env:GIO_MODULE_DIR="$env:VCPKG_ROOT\installed\$env:VCPKG_DEFAULT_TRIPLET\plugins\glib-networking" }
- Write-Output "$([char]27)[0Ksection_end:$(Get-Date -UFormat %s -Millisecond 0):win_environ$([char]13)$([char]27)[0K"
deps-win:
extends: .win
stage: dependencies
script:
- build\windows\1_build-deps-msys2.ps1
artifacts:
paths:
- _install-*/
- babl/_build-*/meson-logs/meson-log.txt
- gegl/_build-*/meson-logs/meson-log.txt
expire_in: 4 hours
gimp-win:
extends: .win
needs:
- job: deps-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- build\windows\2_build-gimp-msys2.ps1
artifacts:
paths:
- gimp-*n*/
- _build-*/meson-logs/meson-log.txt
- _build-*/done-dll.list
# Needed by dist-installer-weekly and dist-store-weekly
- _build-*/config.h
- _build-*/plug-ins/file_associations.list
- _build-*/build/windows/installer/
- _build-*/build/windows/store/
expire_in: 2 days
## macOS pipelines (MacPorts) ##
.macos-inhouse:
extends: .default
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Macos Dmg.*/ || $CI_MERGE_REQUEST_DESCRIPTION =~ /.*Package:Macos Dmg.*/'
interruptible: true
variables:
OPT_PREFIX: /opt/macports
DMG_OPTION: '-Ddmg=true'
- if: '$GIMP_CI_MACOS != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MACOS.*/'
variables:
OPT_PREFIX: /opt/macports
DMG_OPTION: '-Ddmg=true'
- if: '($GIMP_CI_MESON_APPLECLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_APPLECLANG.*/) && $CI_JOB_NAME !~ /.*x86_64.*/ && $CI_JOB_NAME !~ /.*dist-mac-.*/'
variables:
OPT_PREFIX: /opt/homebrew
WARN_AS_ERROR_ON_CI: '-Dwerror=true'
VARIANT: -homebrew
parallel:
matrix:
- ARCH: [arm64, x86_64]
tags:
- macos
- marathon
variables:
ORKA_RUNNER: tahoe-1
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
before_script:
- export GIMP_PREFIX="$PWD/_install-$ARCH"
- export PATH="$OPT_PREFIX/bin:$PATH"
- if [ "$ARCH" = 'x86_64' ]; then softwareupdate --install-rosetta --agree-to-license; fi
#4h is enough only on arm64 or if no macports port was updated/rebuilt, we need more time in case of port bumps
timeout: 24h
.macos_environ: &MAC_ENVIRON
- printf "\e[0Ksection_start:`date +%s`:macos_environ[collapsed=true]\r\e[0KPreparing build environment\n"
## Build-time vars
- export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/pkgconfig:${OPT_PREFIX}/lib/pkgconfig:${OPT_PREFIX}/opt/libarchive/lib/pkgconfig"
- export XDG_DATA_DIRS="${GIMP_PREFIX}/share:${OPT_PREFIX}/share"
## Runtime vars
- export PATH="${GIMP_PREFIX}/bin:${OPT_PREFIX}/bin:$PATH"
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/lib/girepository-1.0:${OPT_PREFIX}/lib/girepository-1.0"
- printf "\e[0Ksection_end:`date +%s`:macos_environ\r\e[0K\n"
deps-macos-inhouse:
extends: .macos-inhouse
stage: dependencies
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
unprotect: true
paths:
- macports-cached-$ARCH
script:
# Do not call sh since it is old bash on macOS, not the default zsh
- arch -${ARCH} zsh build/macos/1_build-deps-macports.sh
artifacts:
paths:
- _install-*
# The full build dir is needed due to its .o for .dSYM creation on next job
- babl/_build-*
- gegl/_build-*
expire_in: 4 hours
gimp-macos-inhouse:
extends: .macos-inhouse
needs:
- job: deps-macos-inhouse
#to allow running Homebrew builds
optional: true
stage: build
variables:
GIT_SUBMODULE_STRATEGY: recursive
cache:
- key: $CI_PROJECT_NAMESPACE-$ARCH${VARIANT}
unprotect: true
paths:
- macports-cached-$ARCH
policy: pull
script:
# Do not call sh since it is old bash on macOS, not the default zsh
- arch -${ARCH} zsh build/macos/2_build-gimp-macports.sh
artifacts:
paths:
- gimp-*.app
- _build*/meson-logs/meson-log.txt
- _build*/done-dylib.list
# Needed by dist-mac-weekly
- _build-*/config.h
- _build-*/plug-ins/file_associations_mac.list
- _build-*/gimp-data/images/logo/gimp-dmg.png
- _build-*/build/macos/.VolumeIcon.icns
expire_in: 2 days
## Analysis ##
file-plug-in-tests:
# FIXME: Do we need another job testing this under Windows? MSYS2 usually has
# the latest deps. It might be a good idea to test that too, maybe weekly?
extends: .debian-nonreloc
rules:
# Don't run on release since the plug-in doesn't get installed in releases
- <<: *CI_MERGE
- <<: *CI_COMMIT
needs: ["gimp-debian-nonreloc"]
stage: analysis
variables:
GIT_STRATEGY: none
GIMP_TESTS_DATA_FOLDER: "$CI_PROJECT_DIR/_data/gimp-test-images/"
GIMP_TESTS_LOG_FILE: "$CI_PROJECT_DIR/_log/import-tests.log"
REGRESSION_STRING: "Total number of regressions: 0"
script:
- API_VER=$(grep GIMP_PKGCONFIG_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
- APP_VER=$(grep GIMP_APP_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/')
- *ENVIRON
- pkg-config --variable=gimplibdir gimp-${API_VER} 2>/dev/null | grep . && PLUG_IN_DIR=$(echo $(pkg-config --variable=gimplibdir gimp-${API_VER})'/plug-ins/')
- export PYTHONPATH="${PLUG_IN_DIR}test-file-plug-ins"
- export GIMP_TESTS_CONFIG_FILE="${PLUG_IN_DIR}test-file-plug-ins/tests/batch-config.ini"
- mkdir _log
- mkdir _data && cd _data
- git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/Infrastructure/gimp-test-images.git gimp-test-images
- cd ..
- cat ${PLUG_IN_DIR}test-file-plug-ins/batch-import-tests.py | gimp-console-${APP_VER} -idf --batch-interpreter python-fu-eval -b - --quit
- if [ $(grep -c "${REGRESSION_STRING}" "${GIMP_TESTS_LOG_FILE}") -ne 1 ]; then
printf "There are file import regressions. Check the log at ${GIMP_TESTS_LOG_FILE}!\n";
exit 1;
fi
# FIXME No export testing for now until it's more developed. A limited test
# can be done from the plug-in for bmp export.
artifacts:
paths:
- _log/
reports:
junit: "_log/import-tests.xml"
expire_in: 2 days
meson-health:
extends: .default
rules:
- <<: *CI_MERGE
- <<: *CI_COMMIT
stage: analysis
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- apt-get update -qq
- apt-get install -qq -y --no-install-recommends git shellcheck devscripts
- sh .gitlab/run_meson_health_diff.sh
allow_failure: true
clang-format:
extends: .default
rules:
- <<: *CI_MERGE
stage: analysis
script:
- apt-get update
- apt-get install -y clang-format
git
- sh .gitlab/run_style_check_diff.sh
allow_failure: true
artifacts:
when: on_failure
paths:
- fetch_upstream.log
- fetch_origin.log
expire_in: 2 days
branches-check:
extends: .default
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH'
stage: analysis
variables:
GIT_DEPTH: "0"
script:
- apt-get update -qq
- apt-get install -qq -y --no-install-recommends git
- sh .gitlab/check_dead_branches.sh
allow_failure: true
cppcheck:
extends: .default
rules:
- if: '$GIMP_CI_CPPCHECK != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_CPPCHECK.*/'
stage: analysis
script:
- apt-get update
- apt-get install -y cppcheck
- cppcheck -q -j8 --enable=all --force --output-file=cppcheck.xml --xml --xml-version=2
-i _build -i babl -i gegl -i _install .
- mkdir report
- cppcheck-htmlreport --source-dir=. --title=gimp --file=cppcheck.xml --report-dir=report
artifacts:
paths:
- report/
expire_in: 8 days
## Ready-to-distribute ##
sources-debian:
extends: .default
rules:
# Don't run on MRs since non-merged/non-upstream code can't be distributed by us
- <<: *CI_COMMIT
- <<: *CI_RELEASE
needs: ["gimp-debian-nonreloc"]
stage: distribution
variables:
GIT_STRATEGY: none
script:
- mv _build*/meson-dist/gimp-*.tar.xz .
- FILENAME=`ls gimp-*.tar.xz` &&
sha256sum gimp-*.tar.xz > ${FILENAME}.SHA256SUMS &&
sha512sum gimp-*.tar.xz > ${FILENAME}.SHA512SUMS
artifacts:
paths:
- gimp-*.tar.xz
- gimp-*.tar.xz.SHA256SUMS
- gimp-*.tar.xz.SHA512SUMS
expire_in: 2 days
dev-docs:
extends: .default
rules:
# Don't run on MRs since non-merged/non-upstream code can't be distributed by us
- <<: *CI_COMMIT
- <<: *CI_RELEASE
needs: ["deps-debian-nonreloc", "gimp-debian-nonreloc"]
stage: distribution
variables:
GIT_STRATEGY: none
script:
- apt-get update
- apt-get install -y xz-utils
- export GIMP_PREFIX=$(echo $PWD/_install*)
- BABL_VER=$(grep BABL_VERSION babl/_build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
BABL_API_VER=$(grep BABL_API_VERSION babl/_build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
DIR_NAME=babl-api-docs-$BABL_VER &&
mkdir $DIR_NAME &&
mv "${GIMP_PREFIX}/share/doc/babl-$BABL_API_VER" $DIR_NAME/ &&
TAR_NAME="$DIR_NAME.tar.xz" &&
tar --dereference -cJf ${TAR_NAME} $DIR_NAME &&
sha256sum $TAR_NAME > ${TAR_NAME}.SHA256SUMS &&
sha512sum $TAR_NAME > ${TAR_NAME}.SHA512SUMS
- GEGL_MAJ_VER=$(grep GEGL_MAJOR_VERSION gegl/_build*/config.h |head -1 |sed 's/^[^0-9]*\([0-9]*\).*$/\1/') &&
GEGL_MIN_VER=$(grep GEGL_MINOR_VERSION gegl/_build*/config.h |head -1 |sed 's/^[^0-9]*\([0-9]*\).*$/\1/') &&
GEGL_MIC_VER=$(grep GEGL_MICRO_VERSION gegl/_build*/config.h |head -1 |sed 's/^[^0-9]*\([0-9]*\).*$/\1/') &&
GEGL_VER="$GEGL_MAJ_VER.$GEGL_MIN_VER.$GEGL_MIC_VER" &&
GEGL_API_VER="$GEGL_MAJ_VER.$GEGL_MIN_VER" &&
DIR_NAME=gegl-api-docs-$GEGL_VER &&
mkdir $DIR_NAME &&
mv "${GIMP_PREFIX}/share/doc/gegl-$GEGL_API_VER" $DIR_NAME/ &&
TAR_NAME="$DIR_NAME.tar.xz" &&
tar --dereference -cJf ${TAR_NAME} $DIR_NAME &&
sha256sum $TAR_NAME > ${TAR_NAME}.SHA256SUMS &&
sha512sum $TAR_NAME > ${TAR_NAME}.SHA512SUMS
- GIMP_VER=$(grep GIMP_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
API_VER=$(grep GIMP_PKGCONFIG_VERSION _build*/config.h | head -1 | sed 's/^.*"\([^"]*\)"$/\1/') &&
DIR_NAME=gimp-api-docs-$GIMP_VER &&
mkdir $DIR_NAME &&
mv "${GIMP_PREFIX}/share/doc/gimp-$API_VER" $DIR_NAME/reference &&
TAR_NAME="$DIR_NAME.tar.xz" &&
tar --dereference -cJf ${TAR_NAME} $DIR_NAME &&
sha256sum $TAR_NAME > ${TAR_NAME}.SHA256SUMS &&
sha512sum $TAR_NAME > ${TAR_NAME}.SHA512SUMS
artifacts:
paths:
- babl-api-docs-*.tar.xz
- babl-api-docs-*.tar.xz.SHA256SUMS
- babl-api-docs-*.tar.xz.SHA512SUMS
- gegl-api-docs-*.tar.xz
- gegl-api-docs-*.tar.xz.SHA256SUMS
- gegl-api-docs-*.tar.xz.SHA512SUMS
- gimp-api-docs-*.tar.xz
- gimp-api-docs-*.tar.xz.SHA256SUMS
- gimp-api-docs-*.tar.xz.SHA512SUMS
expire_in: 2 days
dist-appimage-weekly:
extends: .default
rules:
- !reference [.debian, rules]
needs: ["gimp-debian"]
stage: distribution
script:
- sh build/linux/appimage/3_dist-gimp-goappimage.sh
artifacts:
expose_as: 'Linux appimage'
paths:
- build/linux/appimage/_Output/
expire_in: 8 days
include:
project: GNOME/citemplates
file: flatpak/flatpak_ci_initiative.yml
#flatpak_ci_initiative.yml is extremely pervasive. See: https://gitlab.gnome.org/GNOME/citemplates/-/issues/35
ref: 42fbc2526a7680b6a4f284a210e63e3973ea6dae
dist-flatpak-weekly:
extends:
- .default
- .publish_nightly
rules:
- !reference [.flatpak, rules]
needs: ["gimp-flatpak"]
stage: distribution
image:
name: "ghcr.io/flathub/flatpak-builder-lint:latest"
entrypoint: [""]
script:
- sh build/linux/flatpak/3_dist-gimp-flatpakbuilder.sh
artifacts:
expose_as: 'Linux flatpak'
paths:
- build/linux/flatpak/_Output/
expire_in: 8 days
dist-snap-weekly:
extends: .default
rules:
- !reference [.snap, rules]
needs: ["gimp-snap"]
stage: distribution
image: !reference [.snap, image]
variables: !reference [.snap, variables]
script:
- sh build/linux/snap/3_dist-gimp-snapcraft.sh
artifacts:
expose_as: 'Linux snap'
paths:
- build/linux/snap/_Output/
expire_in: 8 days
dist-installer-weekly:
extends: .default
rules:
- !reference [.win, rules]
needs:
- job: gimp-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
stage: distribution
tags:
- win32-ps
variables:
MSYS_ROOT: 'C:/msys64'
script:
- build\windows\installer\3_dist-gimp-inno.ps1
artifacts:
expose_as: 'Windows exe'
paths:
- build/windows/installer/_Output/
- inno.log
expire_in: 8 days
dist-store-weekly:
extends: .default
rules:
- !reference [.win, rules]
needs:
- job: gimp-win
#to allow running outside 'GNOME/gimp' namespace (on MRs)
optional: true
stage: distribution
tags:
- win32-ps
script:
- build\windows\store\3_dist-gimp-winsdk.ps1
artifacts:
expose_as: 'Windows msix'
paths:
- build/windows/store/_Output/
- winsdk.log
expire_in: 8 days