gitlab-ci: new build organization.

Rather than having the whole Win32 cross-build into the 'gimp' stage,
break the dependencies and GIMP-only builds in 2 stages.

Since apparently we need to keep the same structure for the native and
cross build (otherwise we don't get parallel builds; in other words, I
didn't find the possibility to set separate pipelines up), I move babl
and GEGL into the same 'dependencies' stage.

Finally I remove the -base rules extended into actual jobs, except for
`.gimp-base` (this is the only which makes sense as it is actually
common to the meson and autotools build).
This commit is contained in:
Jehan 2019-10-01 21:36:19 +02:00
parent aa611bea84
commit 90591dc7ed
2 changed files with 78 additions and 102 deletions

View File

@ -1,8 +1,7 @@
image: salamandar/archlinux-gimp:latest
stages:
- babl
- gegl
- dependencies
- gimp
variables:
@ -11,57 +10,17 @@ variables:
INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}"
PACMAN_CACHE: "${CI_PROJECT_DIR}/_pacman_cache"
cache:
paths:
- _pacman_cache
.babl-base:
stage: babl
deps-git:
stage: dependencies
cache:
paths:
- _pacman_cache
artifacts:
expire_in: 1 week
when: always
paths:
- "${INSTALL_DIR}"
- _babl/_build
before_script:
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig"
- export LD_LIBRARY_PATH="${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}"
- export XDG_DATA_DIRS="${INSTALL_PREFIX}/share:/usr/local/share:/usr/share"
- pacman -Syu --noconfirm --needed --cachedir "${PACMAN_CACHE}"
git
base-devel
gobject-introspection
meson
lcms2
- git clone --depth="${GIT_DEPTH}" https://gitlab.gnome.org/GNOME/babl.git _babl
babl-git:
extends: .babl-base
script:
- cd _babl
- meson -Dprefix="${INSTALL_PREFIX}" _build
- ninja -C _build
- ninja -C _build install
# babl-min:
# extends: .babl-base
# script:
# - BABL_MIN_VERSION="$(grep babl meson.build | grep version
# | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | sed 's/\./_/g')"
# - cd _babl
# - git fetch --no-tags origin "refs/tags/BABL_${BABL_MIN_VERSION}:refs/tags/MIN_VERSION"
# - git checkout MIN_VERSION
# - meson -Dprefix="${INSTALL_PREFIX}" _build
# - ninja -C _build
# - ninja -C _build install
.gegl-base:
stage: gegl
artifacts:
expire_in: 1 week
when: always
paths:
- "${INSTALL_DIR}"
- _gegl/_build
before_script:
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig"
@ -90,29 +49,21 @@ babl-git:
sdl2
suitesparse
- git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
gegl-git:
extends: .gegl-base
- git clone --depth="${GIT_DEPTH}" https://gitlab.gnome.org/GNOME/babl.git _babl
script:
- cd _gegl
- cd _babl
- meson -Dprefix="${INSTALL_PREFIX}" _build
- ninja -C _build
- ninja -C _build install
- cd ../_gegl
- meson --prefix="${INSTALL_PREFIX}" _build
- ninja -C _build
- ninja -C _build install
# gegl-min:
# extends: .gegl-base
# script:
# - GEGL_MIN_VERSION="$(grep gegl meson.build | grep version
# | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | sed 's/\./_/g')"
# - cd _gegl
# - git fetch --no-tags origin "refs/tags/GEGL_${GEGL_MIN_VERSION}:refs/tags/MIN_VERSION"
# - git checkout MIN_VERSION
# - meson -Dprefix="${INSTALL_PREFIX}" _build
# - ninja -C _build
# - ninja -C _build install
.gimp-base:
stage: gimp
dependencies:
- deps-git
artifacts:
expire_in: 1 week
when: always
@ -161,7 +112,7 @@ gegl-git:
iso-codes
xorg-server-xvfb
.gimp-autotools:
gimp-autotools:
extends: .gimp-base
script:
- mkdir _build
@ -175,7 +126,7 @@ gegl-git:
- make -j "$(nproc)"
# - make check
.gimp-meson:
gimp-meson:
extends: .gimp-base
script:
- meson _build
@ -186,33 +137,16 @@ gegl-git:
- ninja -C _build
# - ninja test
build-git-autotools:
extends: .gimp-autotools
dependencies:
- babl-git
- gegl-git
build-git-meson:
extends: .gimp-meson
dependencies:
- babl-git
- gegl-git
# build-min-autotools:
# extends: .gimp-autotools
# dependencies:
# - babl-git
# - gegl-git
# build-min-meson:
# extends: .gimp-meson
# dependencies:
# - babl-min
# - gegl-min
.gimp-x86_64-w64-mingw32-base:
deps-x86_64-w64-mingw32:
image: fedora:30
stage: gimp
stage: dependencies
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
XDG_DATA_HOME: "$CI_PROJECT_DIR/.local/share/"
cache:
paths:
- .cache/crossroad/
- dnf_cache
before_script:
- dnf install --assumeyes --setopt=cachedir=`pwd`/dnf_cache --verbose
automake
@ -246,25 +180,69 @@ build-git-meson:
#- pip3 install crossroad
- git clone git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
- cd crossroad
- ./setup.py install
- ./setup.py install --prefix=`pwd`/../.local
- cd ..
- gdk-pixbuf-query-loaders-64 > /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache
script:
- export PATH="`pwd`/.local/bin:$PATH"
- crossroad w64 gimp --run="build/windows/crossbuild-gitlab-ci.sh"
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
expire_in: 1 week
paths:
- .local/
- _deps/
build-git-x86_64-w64-mingw32-meson:
extends: .gimp-x86_64-w64-mingw32-base
gimp-x86_64-w64-mingw32-meson:
image: fedora:30
stage: gimp
dependencies:
- deps-x86_64-w64-mingw32
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
XDG_DATA_HOME: "$CI_PROJECT_DIR/.local/share/"
cache:
paths:
- .cache/crossroad/
- dnf_cache
before_script:
- dnf install --assumeyes --setopt=cachedir=`pwd`/dnf_cache --verbose
automake
autoconf
meson
cmake
gettext
gcc
gcc-c++
gperf
intltool
libtool
libxslt
make
python2
mingw64-gcc
mingw64-gcc-c++
mingw64-binutils
cpio rpm
shared-mime-info
which
libmount-devel
gdk-pixbuf2
gdk-pixbuf2-devel
glib2-devel
script:
- crossroad w64 gimp --run="build/windows/crossbuild-gitlab-ci.sh"
- export PATH="`pwd`/.local/bin:$PATH"
- mkdir _build && cd _build
- echo 'crossroad meson ..
-Dwmf=disabled -Dgtk-doc=false
-Dpython=always -Dlua=always
-Djavascript=always && ninja install' |
crossroad w64 gimp --run="-"
artifacts:
name: "app-tests-logs-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
expire_in: 1 week
paths:
- _deps/
- _build/
#- "${INSTALL_DIR}"
#- "${CROSSROAD_PREFIX}"

View File

@ -77,8 +77,6 @@ crossroad meson _build -Dintrospection=false && \
ninja -C _build install || exit 1
cd ..
# GIMP
# preparing GIMP
crossroad install atk gtk3 libtiff xz-libs librsvg2 poppler-glib dbus-glib && \
cd .. && mkdir _build && cd _build && \
crossroad meson .. -Dwmf=disabled -Dgtk-doc=false -Dpython=always -Dlua=always -Djavascript=always && ninja install
crossroad install atk gtk3 libtiff xz-libs librsvg2 poppler-glib dbus-glib