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 image: salamandar/archlinux-gimp:latest
stages: stages:
- babl - dependencies
- gegl
- gimp - gimp
variables: variables:
@ -11,57 +10,17 @@ variables:
INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}" INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}"
PACMAN_CACHE: "${CI_PROJECT_DIR}/_pacman_cache" PACMAN_CACHE: "${CI_PROJECT_DIR}/_pacman_cache"
cache: deps-git:
paths: stage: dependencies
- _pacman_cache cache:
paths:
.babl-base: - _pacman_cache
stage: babl
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
when: always when: always
paths: paths:
- "${INSTALL_DIR}" - "${INSTALL_DIR}"
- _babl/_build - _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 - _gegl/_build
before_script: before_script:
- export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig" - export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig"
@ -90,29 +49,21 @@ babl-git:
sdl2 sdl2
suitesparse suitesparse
- git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl - git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
- git clone --depth="${GIT_DEPTH}" https://gitlab.gnome.org/GNOME/babl.git _babl
gegl-git:
extends: .gegl-base
script: script:
- cd _gegl - cd _babl
- meson -Dprefix="${INSTALL_PREFIX}" _build
- ninja -C _build
- ninja -C _build install
- cd ../_gegl
- meson --prefix="${INSTALL_PREFIX}" _build - meson --prefix="${INSTALL_PREFIX}" _build
- ninja -C _build - ninja -C _build
- ninja -C _build install - 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: .gimp-base:
stage: gimp stage: gimp
dependencies:
- deps-git
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
when: always when: always
@ -161,7 +112,7 @@ gegl-git:
iso-codes iso-codes
xorg-server-xvfb xorg-server-xvfb
.gimp-autotools: gimp-autotools:
extends: .gimp-base extends: .gimp-base
script: script:
- mkdir _build - mkdir _build
@ -175,7 +126,7 @@ gegl-git:
- make -j "$(nproc)" - make -j "$(nproc)"
# - make check # - make check
.gimp-meson: gimp-meson:
extends: .gimp-base extends: .gimp-base
script: script:
- meson _build - meson _build
@ -186,33 +137,16 @@ gegl-git:
- ninja -C _build - ninja -C _build
# - ninja test # - ninja test
build-git-autotools: deps-x86_64-w64-mingw32:
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:
image: fedora:30 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: before_script:
- dnf install --assumeyes --setopt=cachedir=`pwd`/dnf_cache --verbose - dnf install --assumeyes --setopt=cachedir=`pwd`/dnf_cache --verbose
automake automake
@ -246,25 +180,69 @@ build-git-meson:
#- pip3 install crossroad #- pip3 install crossroad
- git clone git://git.tuxfamily.org/gitroot/crossroad/crossroad.git - git clone git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
- cd crossroad - cd crossroad
- ./setup.py install - ./setup.py install --prefix=`pwd`/../.local
- cd .. - cd ..
- gdk-pixbuf-query-loaders-64 > /usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders.cache - 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: gimp-x86_64-w64-mingw32-meson:
extends: .gimp-x86_64-w64-mingw32-base image: fedora:30
stage: gimp
dependencies:
- deps-x86_64-w64-mingw32
variables: variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/" XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
XDG_DATA_HOME: "$CI_PROJECT_DIR/.local/share/"
cache: cache:
paths: paths:
- .cache/crossroad/ - .cache/crossroad/
- dnf_cache - 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: 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: artifacts:
name: "app-tests-logs-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always when: always
expire_in: 1 week expire_in: 1 week
paths: paths:
- _deps/
- _build/ - _build/
#- "${INSTALL_DIR}" #- "${CROSSROAD_PREFIX}"

View File

@ -77,8 +77,6 @@ crossroad meson _build -Dintrospection=false && \
ninja -C _build install || exit 1 ninja -C _build install || exit 1
cd .. cd ..
# GIMP # preparing GIMP
crossroad install atk gtk3 libtiff xz-libs librsvg2 poppler-glib dbus-glib && \ 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