gitlab-ci, build: Drop custom "CI_*" variables

Let's figure out what job is running using the predefined GitLab variables.
This commit is contained in:
Bruno Lopes 2024-04-23 08:50:33 -03:00
parent 1420e60f45
commit bffe62d43e
4 changed files with 7 additions and 11 deletions

View File

@ -390,7 +390,6 @@ gimp-flatpak-x64:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS == null && $CI_COMMIT_TAG == null'
image: $CI_REGISTRY_IMAGE:build-debian-latest
variables:
BUILD_TYPE: "CI_CROSS"
# Needed because by default, Debian has now changed
# "sysconfig.get_default_scheme()" from "posix_prefix" to "posix_local" which
# adds a local/ folder to the install prefix of setup.py. This environment
@ -452,7 +451,6 @@ gimp-win-x64-cross:
# Merge requests with appropriate label.
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*5. Windows Installer.*/'
variables:
BUILD_TYPE: "CI_NATIVE"
CHERE_INVOKING: "yes"
# We use the same universal variables but not directly from PS
before_script: []

View File

@ -12,9 +12,7 @@ else # [[ "$MSYSTEM_CARCH" == "i686" ]];
export ARTIFACTS_SUFFIX="-x86"
fi
if [[ "$BUILD_TYPE" == "CI_NATIVE" ]]; then
GIMP_DIR=""
else
if [[ -z "$GITLAB_CI" ]]; then
# Make the script work locally
if [[ "$0" != "build/windows/gitlab-ci/1_build-deps-msys2.sh" ]]; then
echo "To run this script locally, please do it from to the gimp git folder"

View File

@ -15,7 +15,7 @@ else # [[ "$MSYSTEM_CARCH" == "i686" ]];
export MSYS2_PREFIX="c:/msys64${MSYSTEM_PREFIX}"
fi
if [[ "$BUILD_TYPE" == "CI_NATIVE" ]]; then
if [[ "$GITLAB_CI" ]]; then
# XXX We've got a weird error when the prefix is in the current dir.
# Until we figure it out, this trick seems to work, even though it's
# completely ridiculous.
@ -125,7 +125,7 @@ make_cmd ()
echo "Please run the gimp.cmd file to get proper plug-in support."> ${GIMP_PREFIX}/README.txt
}
if [[ "$BUILD_TYPE" == "CI_NATIVE" ]]; then
if [[ "$GITLAB_CI" ]]; then
make_cmd CI %cd%
cd ..

View File

@ -19,7 +19,7 @@ else # [[ "$MSYSTEM_CARCH" == "i686" ]];
fi
if [[ "$BUILD_TYPE" == "CI_CROSS" ]]; then
if [[ "$CI_JOB_NAME" =~ "cross" ]]; then
apt-get update
apt-get install -y --no-install-recommends \
binutils \
@ -32,7 +32,7 @@ fi
# Bundle deps and GIMP files
export GIMP_PREFIX="`realpath ./_install`${ARTIFACTS_SUFFIX}"
if [[ "$BUILD_TYPE" == "CI_CROSS" ]]; then
if [[ "$CI_JOB_NAME" =~ "cross" ]]; then
export GIMP_PREFIX="`realpath ./_install`${ARTIFACTS_SUFFIX}-cross"
export MSYS_PREFIX="$GIMP_PREFIX"
fi
@ -142,12 +142,12 @@ done
### .pdb (CodeView) debug symbols
### TODO: REMOVE 'if [[ "$MSYSTEM...' WHEN GCC 14 IS ON MSYS2
### crossroad don't have LLVM/Clang backend yet
if [[ "$MSYSTEM_CARCH" != "i686" ]] && [[ "$BUILD_TYPE" != "CI_CROSS" ]]; then
if [[ "$MSYSTEM_CARCH" != "i686" ]] && [[ ! "$CI_JOB_NAME" =~ "cross" ]]; then
cp -fr ${GIMP_PREFIX}/bin/*.pdb ${GIMP_DISTRIB}/bin/
fi
## Optional executables, .DLLs and resources for GObject Introspection support
if [[ "$BUILD_TYPE" != "CI_CROSS" ]]; then
if [[ ! "$CI_JOB_NAME" =~ "cross" ]]; then
cp -fr ${MSYS_PREFIX}/bin/libgirepository-*.dll ${GIMP_DISTRIB}/bin/
python3 build/windows/gitlab-ci/3_bundle-gimp-uni_dep.py ${GIMP_DISTRIB}/bin/libgirepository-*.dll ${GIMP_PREFIX}/ ${MSYS_PREFIX}/ ${GIMP_DISTRIB} --output-dll-list done-dll.list
cp -fr ${MSYS_PREFIX}/lib/girepository-*/ ${GIMP_DISTRIB}/lib/