mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
From the horse's mouth: "WARNING: appstream-glib is heavy maintenance mode, use appstream instead" Additionally, appstream-glib no longer conforms fully to the appstream specification. Some care is taken to taken to support both libappstream 1.0 as well as libappstream 0.16.x to support stable distros.
874 lines
32 KiB
YAML
874 lines
32 KiB
YAML
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)
|
|
- none
|
|
default: 'none'
|
|
test_pipeline:
|
|
description: 'Pipelines used only for testing'
|
|
options:
|
|
- GIMP_CI_MESON_GCC #trigger the Debian GCC build (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 Clang build (base & fast)
|
|
## - 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 Clang build (base & fast)
|
|
## - Execution tests (dynamic code analysis)
|
|
## - Source tarball (base & fast)
|
|
## - Developer documentation (base & fast)
|
|
.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 (base & fast)
|
|
## - Developer documentation (base & fast)
|
|
## - Inno Windows installer (base but slow)
|
|
## - MS Store .msixupload (base but slow)
|
|
.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:
|
|
- 'runner_system_failure'
|
|
- 'scheduler_failure'
|
|
needs: []
|
|
# Default Docker image (unless otherwise defined)
|
|
image: debian:${DEB_VERSION}
|
|
variables:
|
|
DEB_VERSION: "bookworm"
|
|
# Common cloning procedure
|
|
GIT_DEPTH: "1"
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
# Enable colorful output when supported (e.g. ninja, cppcheck)
|
|
CLICOLOR_FORCE: "1"
|
|
# 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
|
|
|
|
## AppImage CI (Debian) ##
|
|
.debian:
|
|
extends: .default
|
|
rules:
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*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
|
|
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
|
|
variables:
|
|
CC: "clang"
|
|
CXX: "clang++"
|
|
CC_LD: lld
|
|
CXX_LD: lld
|
|
before_script:
|
|
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
|
|
timeout: 20m
|
|
|
|
.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:
|
|
extends: .debian
|
|
stage: dependencies
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:debug
|
|
entrypoint: [""]
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
UMFPACK: libumfpack5
|
|
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
|
script:
|
|
- export container=docker
|
|
- mkdir -p /kaniko/.docker
|
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
|
# Install deps
|
|
- echo "FROM debian:${DEB_VERSION}" > Dockerfile
|
|
- echo "RUN printf \"\e[0Ksection_start:0000000001:deps_install[collapsed=true]\r\e[0KInstalling dependencies provided by Debian $DEB_VERSION\n\"" >> Dockerfile
|
|
- echo "RUN apt-get update -qq" >> Dockerfile
|
|
## 'ca-certificates' is NOT a gimp dep, it is installed only to our Docker image work
|
|
- echo "RUN apt-get install -qq -y --no-install-recommends ca-certificates" >> Dockerfile
|
|
## Build-time only dependencies
|
|
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
|
|
- echo "appstream
|
|
bison
|
|
ccache
|
|
clang
|
|
desktop-file-utils
|
|
flex
|
|
gi-docgen
|
|
git
|
|
gobject-introspection
|
|
libgtk-3-bin
|
|
lld
|
|
meson
|
|
valac
|
|
xsltproc" >> Dockerfile
|
|
## Runtime dependencies
|
|
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
|
|
- echo "at-spi2-core
|
|
ffmpeg
|
|
gettext
|
|
gjs
|
|
glib-networking
|
|
graphviz
|
|
graphviz-dev
|
|
iso-codes
|
|
libaa1-dev
|
|
libappstream-dev
|
|
libarchive-dev
|
|
libbz2-dev
|
|
libcfitsio-dev
|
|
libgexiv2-dev
|
|
libgirepository1.0-dev
|
|
libgs10
|
|
libgs-dev
|
|
libgtk-3-dev
|
|
libgudev-1.0-dev
|
|
libheif-dev
|
|
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
|
|
mypaint-brushes
|
|
poppler-data
|
|
python3
|
|
python3-gi
|
|
python3-gi-cairo" >> Dockerfile
|
|
- echo "RUN printf \"\e[0Ksection_end:0000000002:deps_install\r\e[0K\n\"" >> 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;
|
|
- export LIB_DIR="lib";
|
|
- export LIB_SUBDIR=$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/");
|
|
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}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;
|
|
- echo "ENV CC=\"$CC\"" >> Dockerfile2;
|
|
- echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
|
|
- echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
|
|
- echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
|
|
- 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" $CI_PROJECT_DIR/babl >> Dockerfile2;
|
|
- echo "RUN meson setup $CI_PROJECT_DIR/babl/_build-${RUNNER} $CI_PROJECT_DIR/babl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION" >> Dockerfile2;
|
|
- echo "RUN ninja -C $CI_PROJECT_DIR/babl/_build-${RUNNER}" >> Dockerfile2;
|
|
- echo "RUN ninja -C $CI_PROJECT_DIR/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" $CI_PROJECT_DIR/gegl >> Dockerfile2;
|
|
- echo "RUN meson setup $CI_PROJECT_DIR/gegl/_build-${RUNNER} $CI_PROJECT_DIR/gegl -Dprefix=\"${GIMP_PREFIX}\" $PKGCONF_RELOCATABLE_OPTION $WORKSHOP_OPTION" >> Dockerfile2;
|
|
- echo "RUN ninja -C $CI_PROJECT_DIR/gegl/_build-${RUNNER}" >> Dockerfile2;
|
|
- echo "RUN ninja -C $CI_PROJECT_DIR/gegl/_build-${RUNNER} install" >> Dockerfile2;
|
|
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:gegl_build\r\e[0K\n\"" >> Dockerfile2;
|
|
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER} --cache=true --cache-ttl=120h --image-fs-extract-retry 1 --verbosity=warn
|
|
- if [ -f 'Dockerfile2' ]; then /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile2 --destination build-debian-${DEB_VERSION}-${RUNNER}-temp --cache=false --no-push --verbosity=warn; fi
|
|
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: 2 hours
|
|
|
|
gimp-debian:
|
|
extends: .debian
|
|
needs: ["deps-debian"]
|
|
stage: build
|
|
variables:
|
|
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}"
|
|
-Dpkgconfig.relocatable=true
|
|
-Drelocatable-bundle=yes
|
|
-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 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
|
|
|
|
|
|
## GNU/Linux 64-bit CIs (Debian) ##
|
|
.debian-x64:
|
|
extends: .debian
|
|
rules:
|
|
- <<: *CI_MERGE
|
|
- <<: *CI_COMMIT
|
|
- if: '$GIMP_CI_MESON_CLANG != null'
|
|
variables: {}
|
|
- if: '$GIMP_CI_MESON_GCC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_GCC.*/'
|
|
variables:
|
|
CC: "cc"
|
|
CXX: "c++"
|
|
CC_LD: bfd
|
|
CXX_LD: bfd
|
|
VARIANT: "-gcc"
|
|
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
|
|
variables:
|
|
MESON_OPTIONS: "-Dvector-icons=false"
|
|
VARIANT: "-raster"
|
|
- if: '$GIMP_CI_SOURCES != null'
|
|
- <<: *CI_RELEASE
|
|
parallel:
|
|
matrix:
|
|
- RUNNER: x86_64_v3
|
|
tags: []
|
|
|
|
deps-debian-x64:
|
|
extends: .debian-x64
|
|
stage: !reference [deps-debian, stage]
|
|
image: !reference [deps-debian, image]
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
WORKSHOP_OPTION: '-Dworkshop=true'
|
|
script:
|
|
- !reference [deps-debian, script]
|
|
artifacts: !reference [deps-debian, artifacts]
|
|
|
|
gimp-debian-x64:
|
|
extends: .debian-x64
|
|
needs: ["deps-debian-x64"]
|
|
stage: !reference [gimp-debian, stage]
|
|
variables: !reference [gimp-debian, variables]
|
|
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
|
|
- 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" != "-gcc" ] && [ "$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 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
|
|
|
|
|
|
## Flatpak CI (Fedora) ##
|
|
.flatpak:
|
|
extends: .default
|
|
rules:
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*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"
|
|
timeout: 90m
|
|
|
|
deps-flatpak:
|
|
extends: .flatpak
|
|
stage: dependencies
|
|
#https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1502
|
|
#cache:
|
|
#key: ${CI_JOB_NAME_SLUG}
|
|
#paths:
|
|
#- .flatpak-builder/
|
|
script:
|
|
- sh build/linux/flatpak/1_build-deps-flatpakbuilder.sh
|
|
artifacts:
|
|
paths:
|
|
- .flatpak-builder-$RUNNER.tar
|
|
- flatpak-builder.log
|
|
- babl-meson-log.tar
|
|
- gegl-meson-log.tar
|
|
expire_in: 2 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-meson-log.tar
|
|
expire_in: 2 days
|
|
|
|
|
|
## Snap CI (Ubuntu) ##
|
|
.snap:
|
|
extends: .default
|
|
rules:
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Snap.*/'
|
|
interruptible: true
|
|
- if: '$GIMP_CI_SNAP != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_SNAP.*/'
|
|
parallel:
|
|
matrix:
|
|
- DPKG_ARCH: [arm64, amd64]
|
|
tags:
|
|
- x86_64_v2
|
|
image:
|
|
name: $CI_REGISTRY_IMAGE:build-snap-${SNAPCRAFT_CORE_VERSION}
|
|
entrypoint: [""]
|
|
variables:
|
|
SNAPCRAFT_CORE_VERSION: "8_core24"
|
|
#@brunvonlope private credentials. We are using these for now
|
|
#until we don't get acess to 'gimp' entry on Snap Store: https://github.com/snapcrafters/gimp/issues/447
|
|
LAUNCHPAD_CREDENTIALS_ACCESS_TOKEN: pPs367Km5glpfXXK9BQl
|
|
LAUNCHPAD_CREDENTIALS_ACCESS_SECRET: PQ0r1JGdHQRWQCS255jNZdglCcK4KDmsGRSZxl4CZwWvMF00GLRFbz1185L08cjh5zWqhQddsvmgLg7l
|
|
timeout: 120m
|
|
|
|
deps-snap:
|
|
extends: .snap
|
|
stage: dependencies
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:debug
|
|
entrypoint: [""]
|
|
script:
|
|
- sh build/linux/snap/1_build-deps-snapcraft.sh
|
|
|
|
gimp-snap:
|
|
extends: .snap
|
|
needs: ["deps-snap"]
|
|
stage: build
|
|
variables:
|
|
#Snapcraft/launchpad does not allow shallow clones
|
|
GIT_DEPTH: 0
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
script:
|
|
- sh build/linux/snap/2_build-gimp-snapcraft.sh
|
|
artifacts:
|
|
paths:
|
|
- temp*.snap
|
|
- snapcraft*.txt
|
|
expire_in: 2 days
|
|
|
|
|
|
## WINDOWS pipelines (native MSYS2) ##
|
|
.win:
|
|
extends: .default
|
|
rules:
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/ && $CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/'
|
|
interruptible: true
|
|
variables:
|
|
INSTALLER_OPTION: '-Dwindows-installer=true'
|
|
STORE_OPTION: '-Dms-store=true'
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Windows Installer.*/'
|
|
interruptible: true
|
|
variables:
|
|
INSTALLER_OPTION: '-Dwindows-installer=true'
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/ && $CI_JOB_NAME =~ /.*64.*/ && $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.*/'
|
|
variables:
|
|
INSTALLER_OPTION: '-Dwindows-installer=true'
|
|
- if: '$GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/ && $CI_JOB_NAME =~ /.*64.*/ && $CI_JOB_NAME !~ /.*installer.*/'
|
|
variables:
|
|
STORE_OPTION: '-Dms-store=true'
|
|
- <<: *CI_RELEASE
|
|
variables:
|
|
INSTALLER_OPTION: '-Dwindows-installer=true'
|
|
STORE_OPTION: '-Dms-store=true'
|
|
parallel:
|
|
matrix:
|
|
- RUNNER: windows-aarch64
|
|
MSYSTEM_PREFIX: clangarm64
|
|
- RUNNER: win32-ps
|
|
MSYSTEM_PREFIX: clang64
|
|
tags:
|
|
- $RUNNER
|
|
variables:
|
|
MSYS_ROOT: 'C:/msys64'
|
|
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:
|
|
# FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
|
|
- $GIMP_PREFIX = "$PWD\_install-$MSYSTEM_PREFIX".Replace('\', '/')
|
|
timeout: 40m
|
|
|
|
.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;$MSYS_ROOT/$MSYSTEM_PREFIX/lib/pkgconfig;$MSYS_ROOT/$MSYSTEM_PREFIX/share/pkgconfig"
|
|
- $env:XDG_DATA_DIRS = "$GIMP_PREFIX/share;$MSYS_ROOT/$MSYSTEM_PREFIX/share"
|
|
## Runtime vars
|
|
- $env:PATH = "$GIMP_PREFIX/bin;$MSYS_ROOT/$MSYSTEM_PREFIX/bin;" + $env:PATH
|
|
- $env:GI_TYPELIB_PATH = "$GIMP_PREFIX/lib/girepository-1.0;$MSYS_ROOT/$MSYSTEM_PREFIX/lib/girepository-1.0"
|
|
- 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-$MSYSTEM_PREFIX/
|
|
- babl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
|
- gegl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
|
expire_in: 2 hours
|
|
|
|
gimp-win:
|
|
extends: .win
|
|
needs: ["deps-win"]
|
|
stage: build
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
script:
|
|
- build/windows/2_build-gimp-msys2.ps1
|
|
artifacts:
|
|
paths:
|
|
- gimp-$MSYSTEM_PREFIX/
|
|
- _build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
|
- _build-$MSYSTEM_PREFIX/done-dll.list
|
|
# Needed by dist-installer-weekly and dist-store-weekly
|
|
- _build-$MSYSTEM_PREFIX/config.h
|
|
- _build-$MSYSTEM_PREFIX/plug-ins/file_associations.list
|
|
- _build-$MSYSTEM_PREFIX/build/windows/installer/
|
|
- _build-$MSYSTEM_PREFIX/build/windows/store/
|
|
expire_in: 2 days
|
|
|
|
|
|
## WINDOWS x86 legacy CI (native MSYS2) ##
|
|
.win-x86:
|
|
extends: .win
|
|
rules:
|
|
- !reference [.win, rules]
|
|
- if: '$GIMP_CI_MSYS2_WIN32 != null'
|
|
parallel:
|
|
matrix:
|
|
- RUNNER: win32-ps
|
|
MSYSTEM_PREFIX: mingw32
|
|
variables:
|
|
MINGW_PACKAGE_PREFIX: mingw-w64-i686
|
|
CC: cc
|
|
CXX: c++
|
|
|
|
deps-win-x86:
|
|
extends: .win-x86
|
|
stage: !reference [deps-win, stage]
|
|
script:
|
|
- !reference [deps-win, script]
|
|
artifacts: !reference [deps-win, artifacts]
|
|
|
|
gimp-win-x86:
|
|
extends: .win-x86
|
|
needs: ["deps-win-x86"]
|
|
stage: !reference [gimp-win, stage]
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
script:
|
|
- $env:PATH = "C:/msys64/usr/bin;" + $env:PATH
|
|
- !reference [gimp-win, script]
|
|
artifacts: !reference [gimp-win, artifacts]
|
|
|
|
|
|
## 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-x64
|
|
rules:
|
|
# Don't run on release since the plug-in doesn't get installed in releases
|
|
- <<: *CI_MERGE
|
|
- <<: *CI_COMMIT
|
|
needs: ["gimp-debian-x64"]
|
|
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"
|
|
cache:
|
|
key: $CI_JOB_NAME
|
|
paths:
|
|
- _data
|
|
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
|
|
timeout: 30m
|
|
|
|
meson-health:
|
|
extends: .default
|
|
rules:
|
|
- <<: *CI_MERGE
|
|
- <<: *CI_COMMIT
|
|
stage: analysis
|
|
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
|
|
|
|
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 -i .local -i .cache -i gimp-x64 .
|
|
- 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:
|
|
- <<: *CI_COMMIT
|
|
- if: '$GIMP_CI_SOURCES != null'
|
|
- <<: *CI_RELEASE
|
|
needs: ["gimp-debian-x64"]
|
|
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:
|
|
- <<: *CI_COMMIT
|
|
- if: '$GIMP_CI_SOURCES != null'
|
|
- <<: *CI_RELEASE
|
|
needs: ["deps-debian-x64", "gimp-debian-x64"]
|
|
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/') &&
|
|
APP_VER=$(echo $GIMP_VER | sed 's/\([0-9]\+\.[0-9]\+\)\..*/\1/') &&
|
|
DIR_NAME=gimp-api-docs-$GIMP_VER &&
|
|
mkdir $DIR_NAME &&
|
|
mv "${GIMP_PREFIX}/share/doc/gimp-$APP_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
|
|
|
|
dist-flatpak-weekly:
|
|
extends:
|
|
- .default
|
|
- .publish_nightly
|
|
rules:
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Flatpak.*/'
|
|
interruptible: true
|
|
- if: '$GIMP_CI_FLATPAK != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_FLATPAK.*/'
|
|
needs: ["gimp-flatpak"]
|
|
stage: distribution
|
|
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: ["gimp-win", "gimp-win-x86"]
|
|
stage: distribution
|
|
tags:
|
|
- windows-aarch64
|
|
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:
|
|
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:Microsoft Store.*/'
|
|
interruptible: true
|
|
- if: '$GIMP_CI_MS_STORE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_MS_STORE.*/'
|
|
- <<: *CI_RELEASE
|
|
needs: ["gimp-win"]
|
|
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
|