gitlab-ci: Drop 'packaging' stage

This stage was introduced in 076e4d68 and it fulfilled well its purpose. But
the side effects were: more (sometimes slow) uploading and downloading of
packages and artifacts. Even if we have caching, this is far from ideal.

Now, the so-called "packaging" jobs were moved inside in the "build" jobs.
The advantages are: just one pacman install (ideally cached from deps job);
direct packaging without waiting for upload/download; and less confusion,
since "packaging" naming was implying that the .zips are somewhat official,
which isn't totally true, and sometimes overlaps the dist/deploy concept.

---

Also, the flatpak job now uses config.h instead of triggering a GIMP build.
In other words, I'm reverting part of my work in some old commits.
This commit is contained in:
Bruno Lopes 2024-04-15 21:12:39 -03:00
parent bf91e454fd
commit d09a2a6f7a
2 changed files with 20 additions and 89 deletions

View file

@ -19,7 +19,7 @@
# - GIMP_CI_MSYS2_WIN64: trigger the native MSYS2 build for Win 64-bit. # - GIMP_CI_MSYS2_WIN64: trigger the native MSYS2 build for Win 64-bit.
# - GIMP_CI_MSYS2_WIN32: trigger the native MSYS2 build for Win 32-bit. # - GIMP_CI_MSYS2_WIN32: trigger the native MSYS2 build for Win 32-bit.
# - GIMP_CI_SOURCES: trigger the Debian build and the source tarball job. # - GIMP_CI_SOURCES: trigger the Debian build and the source tarball job.
# - GIMP_CI_FLATPAK: trigger the (normally) weekly flatpak build and publishing. # - GIMP_CI_FLATPAK: trigger the flatpak build and publishing.
# - GIMP_CI_WIN_INSTALLER: trigger all native MSYS2 builds then creates Inno Windows installer. # - GIMP_CI_WIN_INSTALLER: trigger all native MSYS2 builds then creates Inno Windows installer.
# - GIMP_CI_CPPCHECK: trigger cppcheck static analysis. # - GIMP_CI_CPPCHECK: trigger cppcheck static analysis.
@ -27,7 +27,6 @@ stages:
- prepare - prepare
- dependencies - dependencies
- gimp - gimp
- packaging
- distribution - distribution
- analysis - analysis
@ -90,7 +89,6 @@ image-debian-x64:
- if: '$GIMP_CI_RASTER_ICONS != null' - if: '$GIMP_CI_RASTER_ICONS != null'
- if: '$GIMP_CI_CROSSROAD_WIN64 != null' - if: '$GIMP_CI_CROSSROAD_WIN64 != null'
- if: '$GIMP_CI_SOURCES != null' - if: '$GIMP_CI_SOURCES != null'
- if: '$GIMP_CI_FLATPAK != null'
# On merge requests and commits. # On merge requests and commits.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "push"' - if: '$CI_PIPELINE_SOURCE == "push"'
@ -239,7 +237,6 @@ deps-debian-x64:
- if: '$GIMP_CI_RASTER_ICONS != null' - if: '$GIMP_CI_RASTER_ICONS != null'
- if: '$GIMP_CI_CROSSROAD_WIN64 != null' - if: '$GIMP_CI_CROSSROAD_WIN64 != null'
- if: '$GIMP_CI_SOURCES != null' - if: '$GIMP_CI_SOURCES != null'
- if: '$GIMP_CI_FLATPAK != null'
# On merge requests and commits. # On merge requests and commits.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "push"' - if: '$CI_PIPELINE_SOURCE == "push"'
@ -281,7 +278,6 @@ gimp-debian-x64:
- if: '$GIMP_CI_MESON_CLANG != null' - if: '$GIMP_CI_MESON_CLANG != null'
- if: '$GIMP_CI_CROSSROAD_WIN64 != null' - if: '$GIMP_CI_CROSSROAD_WIN64 != null'
- if: '$GIMP_CI_SOURCES != null' - if: '$GIMP_CI_SOURCES != null'
- if: '$GIMP_CI_FLATPAK != null'
# On merge requests and commits. # On merge requests and commits.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_PIPELINE_SOURCE == "push"' - if: '$CI_PIPELINE_SOURCE == "push"'
@ -306,7 +302,6 @@ gimp-debian-x64:
- _build${ARTIFACTS_SUFFIX}/config.h - _build${ARTIFACTS_SUFFIX}/config.h
- _build${ARTIFACTS_SUFFIX}/meson-dist/ - _build${ARTIFACTS_SUFFIX}/meson-dist/
- _build${ARTIFACTS_SUFFIX}/devel-docs/ - _build${ARTIFACTS_SUFFIX}/devel-docs/
- _build${ARTIFACTS_SUFFIX}/build/flatpak/
- _build${ARTIFACTS_SUFFIX}/meson-logs/ - _build${ARTIFACTS_SUFFIX}/meson-logs/
reports: reports:
junit: "_build${ARTIFACTS_SUFFIX}/meson-logs/testlog.junit.xml" junit: "_build${ARTIFACTS_SUFFIX}/meson-logs/testlog.junit.xml"
@ -337,7 +332,7 @@ gimp-debian-raster-icons:
- ninja test - ninja test
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml' include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
packaging-flatpak-x64: gimp-flatpak-x64:
# See: https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/DevOps-with-Flatpak # See: https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/DevOps-with-Flatpak
# XXX This job is mostly the same as .flatpak job of # XXX This job is mostly the same as .flatpak job of
# flatpak_ci_initiative.yml so far, except that we removed the # flatpak_ci_initiative.yml so far, except that we removed the
@ -349,8 +344,8 @@ packaging-flatpak-x64:
- if: '$GIMP_CI_FLATPAK != null' - if: '$GIMP_CI_FLATPAK != null'
# Merge requests with appropriate label. # Merge requests with appropriate label.
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*5. Flatpak package.*/' - if: '$CI_MERGE_REQUEST_LABELS =~ /.*5. Flatpak package.*/'
needs: ["gimp-debian-x64"] needs: []
stage: packaging stage: gimp
tags: tags:
- flatpak - flatpak
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master' image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master'
@ -383,8 +378,12 @@ packaging-flatpak-x64:
# Print the date, since appstream depends on local timezone # Print the date, since appstream depends on local timezone
- date && date -u - date && date -u
# Get pre-configured manifest from Debian job # Configure manifest
- cp _build${ARTIFACTS_SUFFIX}/build/flatpak/*json build/flatpak/ - flatpak build-init ${GIMP_PREFIX} $APP_ID org.gnome.Sdk org.gnome.Platform
- flatpak build ${GIMP_PREFIX} meson setup _build${ARTIFACTS_SUFFIX} || echo "Generated log"
- GIMP_APP_VERSION=$(grep 'Project version' _build${ARTIFACTS_SUFFIX}/meson-logs/meson-log.txt | head -1 | sed -e 's/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/' -e 's/\([0-9]\+\.[0-9]\+\)\..*/\1/')
- sed -i "s/@GIMP_APP_VERSION@/$GIMP_APP_VERSION/g" build/flatpak/org.gimp.GIMP-nightly.json.in
- mv build/flatpak/org.gimp.GIMP-nightly.json.in build/flatpak/org.gimp.GIMP-nightly.json
# GNOME script to customize the manifest # GNOME script to customize the manifest
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS} - rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
@ -399,7 +398,6 @@ packaging-flatpak-x64:
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH} - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
- tar cf repo.tar repo/ - tar cf repo.tar repo/
artifacts: artifacts:
expose_as: 'Linux flatpak'
paths: paths:
- flatpak-builder.log - flatpak-builder.log
# These are the same as flatpak_ci_initiative.yml as according to # These are the same as flatpak_ci_initiative.yml as according to
@ -408,7 +406,7 @@ packaging-flatpak-x64:
- repo.tar - repo.tar
- '.flatpak-builder/build/gimp/_flatpak_build/meson-logs/meson-log.txt' - '.flatpak-builder/build/gimp/_flatpak_build/meson-logs/meson-log.txt'
- '.flatpak-builder/build/gimp/_flatpak_build/meson-logs/testlog.txt' - '.flatpak-builder/build/gimp/_flatpak_build/meson-logs/testlog.txt'
expire_in: 1 week expire_in: 2 days
## WINDOWS 64-bit CI (cross-build crossroad) ## ## WINDOWS 64-bit CI (cross-build crossroad) ##
@ -467,22 +465,6 @@ gimp-win-x64-cross:
script: script:
- bash -x build/windows/gitlab-ci/2_build-gimp-crossroad.sh - bash -x build/windows/gitlab-ci/2_build-gimp-crossroad.sh
- crossroad w64 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh" - crossroad w64 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh"
artifacts:
paths:
- _install-x64-cross/
- _build-x64-cross/
expire_in: 1 day
packaging-win-x64-nightly:
extends: .win-cross
rules:
- !reference [.win-x64-cross, rules]
needs: ["gimp-win-x64-cross"]
stage: packaging
variables:
CROSSROAD_PLATFORM: "w64"
cache: []
script:
- bash -x build/windows/gitlab-ci/3_package-gimp-uni_base.sh - bash -x build/windows/gitlab-ci/3_package-gimp-uni_base.sh
- cd gimp-x64 - cd gimp-x64
- bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh - bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh
@ -551,23 +533,6 @@ gimp-win-a64:
stage: gimp stage: gimp
script: script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh"
artifacts:
paths:
- _install-a64/
- _build-a64/meson-*/
# Needed by dist-installer-weekly
- _build-a64/config.h
- _build-a64/build/windows/installer/
expire_in: 1 day
packaging-win-a64:
extends: .win-a64
rules:
- !reference [.win-a64, rules]
needs: ["gimp-win-a64"]
stage: packaging
cache: []
script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/3_package-gimp-uni_base.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/3_package-gimp-uni_base.sh"
- cd gimp-a64 - cd gimp-a64
- C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh" - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh"
@ -575,7 +540,7 @@ packaging-win-a64:
paths: paths:
- gimp-a64/ - gimp-a64/
- done-dll.list - done-dll.list
# Just passing-through files for dist-installer-weekly # Needed by dist-installer-weekly
- _build-a64/config.h - _build-a64/config.h
- _build-a64/build/windows/installer/ - _build-a64/build/windows/installer/
expire_in: 1 day expire_in: 1 day
@ -614,20 +579,6 @@ gimp-win-x64:
stage: gimp stage: gimp
script: script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh"
artifacts:
paths:
- _install-x64/
- _build-x64/meson-*/
expire_in: 1 day
packaging-win-x64:
extends: .win-x64
rules:
- !reference [.win-x64, rules]
needs: ["gimp-win-x64"]
stage: packaging
cache: []
script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/3_package-gimp-uni_base.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/3_package-gimp-uni_base.sh"
- cd gimp-x64 - cd gimp-x64
- C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh" - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh"
@ -673,20 +624,6 @@ gimp-win-x86:
stage: gimp stage: gimp
script: script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/2_build-gimp-msys2.sh"
artifacts:
paths:
- _install-x86/
- _build-x86/meson-*/
expire_in: 1 day
packaging-win-x86:
extends: .win-x86
rules:
- !reference [.win-x86, rules]
needs: ["gimp-win-x86"]
stage: packaging
cache: []
script:
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/3_package-gimp-uni_base.sh" - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/3_package-gimp-uni_base.sh"
- cd gimp-x86 - cd gimp-x86
- C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh" - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/3_package-gimp-uni_sym.sh"
@ -789,14 +726,19 @@ dist-flatpak-weekly:
rules: rules:
# Custom builds though web GUI, API or schedules. # Custom builds though web GUI, API or schedules.
- if: '$GIMP_CI_FLATPAK != null' - if: '$GIMP_CI_FLATPAK != null'
needs: ["packaging-flatpak-x64"] needs: ["gimp-flatpak-x64"]
stage: distribution stage: distribution
artifacts:
expose_as: 'Linux flatpak'
paths:
- gimp-git.flatpak
expire_in: 1 week
dist-installer-weekly: dist-installer-weekly:
extends: .win extends: .win
rules: rules:
- !reference [.win, rules] - !reference [.win, rules]
needs: ["packaging-win-a64", "packaging-win-x64", "packaging-win-x86"] needs: ["gimp-win-a64", "gimp-win-x64", "gimp-win-x86"]
stage: distribution stage: distribution
tags: tags:
- win32-ps - win32-ps

View file

@ -8,7 +8,7 @@ if [[ "$MSYSTEM_CARCH" == "aarch64" ]]; then
export ARTIFACTS_SUFFIX="-a64" export ARTIFACTS_SUFFIX="-a64"
export MSYS_PREFIX="c:/msys64${MSYSTEM_PREFIX}" export MSYS_PREFIX="c:/msys64${MSYSTEM_PREFIX}"
export GIMP_DISTRIB=`realpath ./gimp-a64` export GIMP_DISTRIB=`realpath ./gimp-a64`
elif [[ "$CROSSROAD_PLATFORM" == "w64" ]] || [[ "$MSYSTEM_CARCH" == "x86_64" ]]; then elif [[ "$CI_JOB_NAME" == "gimp-win-x64-cross" ]] || [[ "$MSYSTEM_CARCH" == "x86_64" ]]; then
export ARTIFACTS_SUFFIX="-x64" export ARTIFACTS_SUFFIX="-x64"
export MSYS_PREFIX="c:/msys64${MSYSTEM_PREFIX}" export MSYS_PREFIX="c:/msys64${MSYSTEM_PREFIX}"
export GIMP_DISTRIB=`realpath ./gimp-x64` export GIMP_DISTRIB=`realpath ./gimp-x64`
@ -18,10 +18,6 @@ else # [[ "$MSYSTEM_CARCH" == "i686" ]];
export GIMP_DISTRIB=`realpath ./gimp-x86` export GIMP_DISTRIB=`realpath ./gimp-x86`
fi fi
if [[ "$BUILD_TYPE" != "CI_CROSS" ]] && [[ "$BUILD_TYPE" != "CI_NATIVE" ]]; then
pacman --noconfirm -Suy
fi
if [[ "$BUILD_TYPE" == "CI_CROSS" ]]; then if [[ "$BUILD_TYPE" == "CI_CROSS" ]]; then
apt-get update apt-get update
@ -31,13 +27,6 @@ if [[ "$BUILD_TYPE" == "CI_CROSS" ]]; then
file \ file \
libglib2.0-bin \ libglib2.0-bin \
python3 python3
else
# Install the required (pre-built) packages again
# We take code from deps script to better maintenance
GIMP_DIR=""
DEPS_CODE=$(cat build/windows/gitlab-ci/1_build-deps-msys2.sh)
DEPS_CODE=$(sed -n '/# Install the/,/# End of install/p' <<< $DEPS_CODE)
echo "$DEPS_CODE" | bash
fi fi