[gimp] CI: use custom docker images for dependencies and GIMP builds



commit fdca56c94a9ad504e3dc8f1c3ec2d84dd39ef6fd
Author: Michael Schumacher <schumaml gmx net>
Date:   Fri May 29 22:41:22 2020 +0000

    CI: use custom docker images for dependencies and GIMP builds

 .gitlab-ci.yml | 201 ++++++++++++++++++++-------------------------------------
 1 file changed, 70 insertions(+), 131 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e680ccb8bd..4036a3dca0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
 image: debian:testing
 
 stages:
+  - prepare
   - dependencies
   - gimp
   - analysis
@@ -11,10 +12,70 @@ variables:
   INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}"
   APT_CACHE: "${CI_PROJECT_DIR}/apt-cache"
 
+## prepare docker images ##
+
+build-image:
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+  cache: {}
+  image:
+    name: gcr.io/kaniko-project/executor:debug
+    entrypoint: [""]
+  script:
+    - mkdir -p /kaniko/.docker
+    - echo 
"{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" 
/kaniko/.docker/config.json
+    - echo "FROM debian:testing" > Dockerfile
+    - echo "RUN apt-get update" >> Dockerfile
+    - echo "RUN apt-get install -y --no-install-recommends \\" >> Dockerfile
+    - echo "at-spi2-core build-essential desktop-file-utils ffmpeg ghostscript git glib-networking 
gobject-introspection graphviz-dev gtk-doc-tools hicolor-icon-theme intltool iso-codes libappstream-glib-dev 
libbz2-dev libdbus-glib-1-dev libexif-dev libgexiv2-dev libgirepository1.0-dev libgtk-3-bin libgtk-3-dev 
libgudev-1.0-dev libjson-glib-dev liblcms2-dev liblzma-dev libmng-dev libmypaint-dev libopenexr-dev 
libpoppler-glib-dev libraw-dev libraw19 librsvg2-dev libspiro-dev libsuitesparse-dev libtiff-dev libtiff5-dev 
libtool libumfpack5 libwebp-dev libwmf-dev libxmu-dev libxpm-dev luajit meson mypaint-brushes poppler-data 
python3 valac xauth xvfb" >> Dockerfile
+
+    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination 
$CI_REGISTRY_IMAGE:build-debian-latest --cache=true --cache-ttl=120h
+
+
+build-image-win64:
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+  cache: {}
+  image:
+    name: gcr.io/kaniko-project/executor:debug
+    entrypoint: [""]
+  script:
+    - mkdir -p /kaniko/.docker
+    - echo 
"{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" 
/kaniko/.docker/config.json
+    - echo "FROM debian:testing" > Dockerfile
+    - echo "RUN apt-get update" >> Dockerfile
+    - echo "RUN apt-get install -y --no-install-recommends \\" >> Dockerfile
+    - echo "build-essential cpio g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 git intltool libgdk-pixbuf2.0-dev 
libglib2.0-bin meson pkg-config python3 python3-distutils python3-docutils python3-pip rpm xsltproc" >> 
Dockerfile
+
+    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination 
$CI_REGISTRY_IMAGE:build-win64-latest --cache=true --cache-ttl=120h
+
+
+build-image-win32:
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+  cache: {}
+  image:
+    name: gcr.io/kaniko-project/executor:debug
+    entrypoint: [""]
+  script:
+    - mkdir -p /kaniko/.docker
+    - echo 
"{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" 
/kaniko/.docker/config.json
+    - echo "FROM debian:testing" > Dockerfile
+    - echo "RUN apt-get update" >> Dockerfile
+    - echo "RUN apt-get install -y --no-install-recommends \\" >> Dockerfile
+    - echo "build-essential cpio g++-mingw-w64-i686 gcc-mingw-w64-i686 git intltool libgdk-pixbuf2.0-dev 
libglib2.0-bin meson pkg-config python3 python3-distutils python3-docutils python3-pip rpm xsltproc" >> 
Dockerfile
+
+    - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination 
$CI_REGISTRY_IMAGE:build-win32-latest --cache=true --cache-ttl=120h
+
+
 ## GNU/Linux 64-bit CIs ##
 
 deps-debian/testing:
   stage: dependencies
+  image: $CI_REGISTRY_IMAGE:build-debian-latest
   cache:
     paths:
     - apt-cache
@@ -26,28 +87,6 @@ deps-debian/testing:
     - _babl/_build
     - _gegl/_build
   before_script:
-    - mkdir -p $APT_CACHE
-    - apt-get update
-    - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
-        build-essential
-        git
-        ffmpeg
-        gobject-introspection
-        libjson-glib-dev
-        libgexiv2-dev
-        libgirepository1.0-dev
-        liblcms2-dev
-        libopenexr-dev
-        libraw-dev
-        librsvg2-dev
-        libspiro-dev
-        libsuitesparse-dev
-        libtiff5-dev
-        luajit
-        meson
-        python3
-        valac
-    - apt-get install -y --reinstall ca-certificates
     - 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
     - export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig"
@@ -64,9 +103,11 @@ deps-debian/testing:
     - meson --prefix="${INSTALL_PREFIX}" _build
     - ninja -C _build
     - ninja -C _build install
+  needs: ["build-image"]
 
 .gimp-debian/testing-base:
   stage: gimp
+  image: $CI_REGISTRY_IMAGE:build-debian-latest
   dependencies:
     - deps-debian/testing
   cache:
@@ -80,53 +121,6 @@ deps-debian/testing:
     - _build
     #- "${INSTALL_DIR}"
   before_script:
-    - mkdir -p $APT_CACHE
-    - apt-get update
-    - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
-        at-spi2-core
-        build-essential
-        desktop-file-utils
-        ffmpeg
-        hicolor-icon-theme
-        ghostscript
-        git
-        glib-networking
-        gobject-introspection
-        gtk-doc-tools
-        intltool
-        iso-codes
-        libappstream-glib-dev
-        libbz2-dev
-        libdbus-glib-1-dev
-        libexif-dev
-        libgexiv2-dev
-        libgirepository1.0-dev
-        libgtk-3-bin
-        libgtk-3-dev
-        libgudev-1.0-dev
-        libjson-glib-dev
-        liblcms2-dev
-        liblzma-dev
-        libmng-dev
-        libmypaint-dev
-        libopenexr-dev
-        libpoppler-glib-dev
-        libraw19
-        librsvg2-dev
-        libspiro-dev
-        libtiff-dev
-        libtool
-        libumfpack5
-        libwebp-dev
-        libwmf-dev
-        libxmu-dev
-        libxpm-dev
-        meson
-        mypaint-brushes
-        poppler-data
-        valac
-        xauth
-        xvfb
     - export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/pkgconfig:${INSTALL_PREFIX}/share/pkgconfig"
     - export PKG_CONFIG_PATH="${INSTALL_PREFIX}/lib/`gcc -print-multiarch`/pkgconfig/:$PKG_CONFIG_PATH"
     - export PKG_CONFIG_PATH="${INSTALL_PREFIX}/share/`gcc -print-multiarch`/pkgconfig/:$PKG_CONFIG_PATH"
@@ -167,6 +161,7 @@ gimp-debian/testing-clang:
     CC: "clang"
     CXX: "clang++"
   script:
+    - mkdir -p "$APT_CACHE"
     - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
         clang libomp-dev
     - meson _build
@@ -181,6 +176,7 @@ gimp-debian/testing-clang:
 
 deps-win64:
   stage: dependencies
+  image: $CI_REGISTRY_IMAGE:build-win64-latest
   variables:
     XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
     XDG_DATA_HOME:  "$CI_PROJECT_DIR/.local/share/"
@@ -189,21 +185,6 @@ deps-win64:
     - .cache/crossroad/
     - apt-cache
   before_script:
-    - mkdir -p $APT_CACHE
-    - apt-get update
-    - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
-        build-essential
-        cpio
-        gcc-mingw-w64-x86-64
-        g++-mingw-w64-x86-64
-        git
-        meson
-        pkg-config
-        python3-distutils
-        python3-docutils
-        python3-pip
-        rpm
-    - apt-get install -y --reinstall ca-certificates
     - git clone --depth=${GIT_DEPTH} git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
     - cd crossroad
     - ./setup.py install --prefix=`pwd`/../.local
@@ -219,9 +200,11 @@ deps-win64:
     paths:
       - .local/
       - _deps/
+  needs: ["build-image-win64"]
 
 gimp-win64:
   stage: gimp
+  image: $CI_REGISTRY_IMAGE:build-win64-latest
   dependencies:
     - deps-win64
   variables:
@@ -231,22 +214,6 @@ gimp-win64:
     paths:
     - .cache/crossroad/
     - apt-cache
-  before_script:
-    - mkdir -p $APT_CACHE
-    - apt-get update
-    - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
-        build-essential
-        cpio
-        gcc-mingw-w64-x86-64
-        g++-mingw-w64-x86-64
-        git
-        intltool
-        libgdk-pixbuf2.0-dev
-        libglib2.0-bin
-        meson
-        python3
-        rpm
-        xsltproc
   script:
     - export PATH="`pwd`/.local/bin:$PATH"
     - mkdir _build && cd _build
@@ -271,6 +238,7 @@ gimp-win64:
 
 deps-win32:
   stage: dependencies
+  image: $CI_REGISTRY_IMAGE:build-win32-latest
   variables:
     XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
     XDG_DATA_HOME:  "$CI_PROJECT_DIR/.local/share/"
@@ -279,21 +247,6 @@ deps-win32:
     - .cache/crossroad/
     - apt-cache
   before_script:
-    - mkdir -p $APT_CACHE
-    - apt-get update
-    - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
-        build-essential
-        cpio
-        gcc-mingw-w64-i686
-        g++-mingw-w64-i686
-        git
-        meson
-        pkg-config
-        python3-distutils
-        python3-docutils
-        python3-pip
-        rpm
-    - apt-get install -y --reinstall ca-certificates
     - git clone --depth=${GIT_DEPTH} git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
     - cd crossroad
     - ./setup.py install --prefix=`pwd`/../.local
@@ -309,9 +262,11 @@ deps-win32:
     paths:
       - .local/
       - _deps/
+  needs: ["build-image-win32"]
 
 gimp-win32:
   stage: gimp
+  image: $CI_REGISTRY_IMAGE:build-win32-latest
   dependencies:
     - deps-win32
   variables:
@@ -321,22 +276,6 @@ gimp-win32:
     paths:
     - .cache/crossroad/
     - apt-cache
-  before_script:
-    - mkdir -p $APT_CACHE
-    - apt-get update
-    - apt-get install -y --no-install-recommends -o dir::cache::archives="$APT_CACHE"
-        build-essential
-        cpio
-        gcc-mingw-w64-i686
-        g++-mingw-w64-i686
-        git
-        intltool
-        libgdk-pixbuf2.0-dev
-        libglib2.0-bin
-        meson
-        python3
-        rpm
-        xsltproc
   script:
     - export PATH="`pwd`/.local/bin:$PATH"
     - mkdir _build && cd _build


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]