gitlab-ci, build/windows: Make crossroad scripts self-contained

This make them easier to understand and to run local, as we do with native ones

(They can't be run local yet, further changes will try to acomplish this a bit)
This commit is contained in:
Bruno Lopes 2024-05-15 22:30:15 -03:00
parent 26e2f693dc
commit fdc2f080a8
3 changed files with 11 additions and 11 deletions

View File

@ -406,14 +406,8 @@ gimp-flatpak-x64:
- if: '$GIMP_CI_CROSSROAD_WIN64 != null'
image: $CI_REGISTRY_IMAGE:build-debian-latest
variables:
# 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
# variable overrides this behavior.
DEB_PYTHON_INSTALL_LAYOUT: "deb"
PATH: "$CI_PROJECT_DIR/.local/bin:$CI_PROJECT_DIR/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
XDG_DATA_HOME: "$CI_PROJECT_DIR/.local/share/"
# TODO: Crossroads handling of universal variables still not perfect
# FIXME: Crossroads handling of universal variables still not perfect
# The cause is: https://gitlab.gnome.org/GNOME/gimp/-/issues/11544
before_script: []
deps-win-x64-cross:
@ -431,7 +425,6 @@ deps-win-x64-cross:
- !reference [.default, cache]
script:
- bash -x build/windows/gitlab-ci/1_build-deps-crossroad.sh
- crossroad w64 gimp --run="build/windows/gitlab-ci/1_build-deps-crossroad.sh"
artifacts:
paths:
- .local/
@ -447,7 +440,6 @@ gimp-win-x64-cross:
stage: gimp
script:
- bash -x build/windows/gitlab-ci/2_build-gimp-crossroad.sh
- crossroad w64 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh"
- bash -x build/windows/gitlab-ci/3_bundle-gimp-uni_base.sh
artifacts:
expose_as: 'Windows zip'

View File

@ -13,12 +13,17 @@ apt-get install -y --no-install-recommends \
git clone --depth $GIT_DEPTH https://gitlab.freedesktop.org/crossroad/crossroad.git
cd crossroad
git apply ../build/windows/patches/0001-platforms-Enable-ccache.patch
# Needed because Debian adds by default a local/ folder to the install
# prefix of setup.py. This environment variable overrides this behavior.
export DEB_PYTHON_INSTALL_LAYOUT="deb"
./setup.py install --prefix=`pwd`/../.local
cd ..
exit 0
# CROSSROAD ENV
export PATH="$PWD/.local/bin:$PATH"
export XDG_DATA_HOME="$PWD/.local/share"
crossroad w64 gimp --run="build/windows/gitlab-ci/1_build-deps-crossroad.sh"
else
export ARTIFACTS_SUFFIX="-x64"

View File

@ -23,6 +23,9 @@ fi
# CROSSROAD ENV
export PATH="$PWD/.local/bin:$PWD/bin:$PATH"
export XDG_DATA_HOME="$PWD/.local/share"
crossroad w64 gimp --run="build/windows/gitlab-ci/2_build-gimp-crossroad.sh"
else
export ARTIFACTS_SUFFIX="-x64"