diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c86c648186..0e7febdce2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,6 +62,7 @@ stages: variables: GIT_DEPTH: "1" + GIT_SUBMODULE_STRATEGY: recursive ARTIFACTS_SUFFIX: "-x64" GIMP_PREFIX: "${CI_PROJECT_DIR}/_install${ARTIFACTS_SUFFIX}" @@ -248,7 +249,6 @@ deps-debian-gcc: before_script: # Universal variables - !reference [.default, before_script] - - git submodule update --init - mkdir -p _build${ARTIFACTS_SUFFIX} && cd _build${ARTIFACTS_SUFFIX} after_script: - ccache --show-stats @@ -341,7 +341,6 @@ packaging-flatpak-x64: - flatpak image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master' variables: - GIT_SUBMODULE_STRATEGY: normal # Replace with your manifest path MANIFEST_PATH: "build/flatpak/org.gimp.GIMP-nightly.json" RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo" diff --git a/build/windows/gitlab-ci/1_build-deps-crossroad.sh b/build/windows/gitlab-ci/1_build-deps-crossroad.sh index 51b1f09077..bf6337135e 100644 --- a/build/windows/gitlab-ci/1_build-deps-crossroad.sh +++ b/build/windows/gitlab-ci/1_build-deps-crossroad.sh @@ -1,11 +1,16 @@ #!/bin/sh +if [ -z "$GIT_DEPTH" ]; then + export GIT_DEPTH=1 +fi + + # BASH ENV if [[ -z "$CROSSROAD_PLATFORM" ]]; then apt-get install -y --no-install-recommends \ wine \ wine64 -git clone --depth=${GIT_DEPTH} https://gitlab.freedesktop.org/crossroad/crossroad.git +git clone --depth $GIT_DEPTH https://gitlab.freedesktop.org/crossroad/crossroad.git cd crossroad ./setup.py install --prefix=`pwd`/../.local cd .. @@ -29,8 +34,8 @@ fi ## Clone babl and GEGL (follow master branch) mkdir _deps && cd _deps -git clone --depth 1 https://gitlab.gnome.org/GNOME/babl.git _babl -git clone --depth 1 https://gitlab.gnome.org/GNOME/gegl.git _gegl +git clone --depth $GIT_DEPTH https://gitlab.gnome.org/GNOME/babl.git _babl +git clone --depth $GIT_DEPTH https://gitlab.gnome.org/GNOME/gegl.git _gegl ## Build babl and GEGL mkdir _babl/_build${ARTIFACTS_SUFFIX}-cross/ && cd _babl/_build${ARTIFACTS_SUFFIX}-cross/ diff --git a/build/windows/gitlab-ci/1_build-deps-msys2.sh b/build/windows/gitlab-ci/1_build-deps-msys2.sh index 28252e11fa..3d1a1064fc 100644 --- a/build/windows/gitlab-ci/1_build-deps-msys2.sh +++ b/build/windows/gitlab-ci/1_build-deps-msys2.sh @@ -24,7 +24,7 @@ else DEPS_DIR=$(dirname $PWD) cd $DEPS_DIR fi - + export GIT_DEPTH=1 pacman --noconfirm -Suy fi @@ -61,8 +61,6 @@ fi # Clone babl and GEGL (follow master branch) -export GIT_DEPTH=1 - clone_or_pull () { repo="https://gitlab.gnome.org/GNOME/${1}.git" @@ -76,7 +74,7 @@ clone_or_pull () fi if [ ! -d "_${1}" ]; then - git clone $git_options --depth=${GIT_DEPTH} $repo _${1} || exit 1 + git clone $git_options --depth $GIT_DEPTH $repo _${1} || exit 1 else cd _${1} && git pull && cd .. fi diff --git a/build/windows/gitlab-ci/2_build-gimp-crossroad.sh b/build/windows/gitlab-ci/2_build-gimp-crossroad.sh index 8c3256cc40..7266bde764 100644 --- a/build/windows/gitlab-ci/2_build-gimp-crossroad.sh +++ b/build/windows/gitlab-ci/2_build-gimp-crossroad.sh @@ -17,8 +17,9 @@ echo export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository echo "${GIMP_PREFIX}/bin/gimp-console-$GIMP_APP_VERSION \"\$@\"" >> bin/gimp-console-$GIMP_APP_VERSION chmod u+x bin/gimp-console-$GIMP_APP_VERSION -git submodule update --init - +if [ -z "$GIT_SUBMODULE_STRATEGY" ]; then + git submodule update --init +fi # CROSSROAD ENV else diff --git a/build/windows/gitlab-ci/2_build-gimp-msys2.sh b/build/windows/gitlab-ci/2_build-gimp-msys2.sh index 4f38bef398..184f8e8a33 100644 --- a/build/windows/gitlab-ci/2_build-gimp-msys2.sh +++ b/build/windows/gitlab-ci/2_build-gimp-msys2.sh @@ -29,9 +29,8 @@ else echo "To run this script locally, please do it from to the gimp git folder" exit 1 fi - + git submodule update --init pacman --noconfirm -Suy - export MESON_OPTIONS="-Drelocatable-bundle=no" fi @@ -61,9 +60,6 @@ export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}" # End of universal variables - -git submodule update --init - if [ ! -f "_build${ARTIFACTS_SUFFIX}/build.ninja" ]; then mkdir -p "_build${ARTIFACTS_SUFFIX}" && cd "_build${ARTIFACTS_SUFFIX}" # We disable javascript as we are not able for the time being to add a