[gimp/wip/Jehan/native-win64-build: 1/2] build: do not build Windows GIMP with ccache.




commit fad55a4a5c3ec9319eeb0f3f8108fe823f0db2c2
Author: Jehan <jehan girinstud io>
Date:   Mon May 3 20:01:29 2021 +0200

    build: do not build Windows GIMP with ccache.
    
    The build rules were highly inspired by other projects on GNOME's
    Gitlab. All of them used to build with ccache. It worked fine for the
    main build, but completely broke GObject Introspection build on both
    babl and GEGL. And the worse thing is that meson was absolutely not
    displaying the error, just saying it failed (even in verbose mode). A
    lot of time wasted trying to debug.
    
    Therefore let's get rid of ccache.
    
    Other minor changes:
    
    * Build from the build dir, rather than source. The other way around
      works too, but I actually find commands simpler this way.
    * Adding artifacts.

 .gitlab-ci.yml               |  6 ++++++
 build/windows/build-msys2.sh | 45 ++++++++++++++++++++++++--------------------
 2 files changed, 31 insertions(+), 20 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 90e7b0584e..a2fb23674d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -196,6 +196,12 @@ gimp-native-win64:
   script:
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
     - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/build-msys2.sh"
+  artifacts:
+    name: "GIMP-Win-native-${CI_COMMIT_SHORT_SHA}"
+    when: always
+    expire_in: 2 days
+    paths:
+    - _install
   needs: []
 
 deps-win64:
diff --git a/build/windows/build-msys2.sh b/build/windows/build-msys2.sh
index 68bbe9183e..0e2384ad56 100644
--- a/build/windows/build-msys2.sh
+++ b/build/windows/build-msys2.sh
@@ -31,7 +31,6 @@ pacman --noconfirm -Suy
 pacman --noconfirm -S --needed \
     base-devel \
     mingw-w64-$MSYS2_ARCH-toolchain \
-    mingw-w64-$MSYS2_ARCH-ccache \
     mingw-w64-$MSYS2_ARCH-pkg-config \
     mingw-w64-$MSYS2_ARCH-meson \
     \
@@ -73,14 +72,12 @@ pacman --noconfirm -S --needed \
     mingw-w64-$MSYS2_ARCH-shared-mime-info \
     mingw-w64-$MSYS2_ARCH-suitesparse \
     mingw-w64-$MSYS2_ARCH-vala \
-    mingw-w64-$MSYS2_ARCH-xpm-nox \
-    mingw-w64-$MSYS2_ARCH-babl \
-    mingw-w64-$MSYS2_ARCH-gegl
+    mingw-w64-$MSYS2_ARCH-xpm-nox
 
-mkdir -p _ccache
-export CCACHE_BASEDIR="$(pwd)"
-export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
-export CC="ccache gcc"
+#mkdir -p _ccache
+#export CCACHE_BASEDIR="$(pwd)"
+#export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
+#export CC="ccache gcc"
 
 export GIT_DEPTH=1
 export GIMP_PREFIX=`realpath ~/_install`
@@ -90,25 +87,33 @@ export PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:$PKG_CONFIG_PATH"
 export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH}"
 export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
 
+# export XDG_DATA_DIRS="$XDG_DATA_DIRS:${GIMP_PREFIX}/share:/usr/local/share:/usr/share:/mingw64/share/"
+# export XDG_DATA_DIRS="$XDG_DATA_DIRS:${GIMP_PREFIX}/share:/mingw64/share/"
+export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/mingw64/share/"
+#export XDG_DATA_DIRS="/mingw64/share/"
+
 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
 
-cd _babl
-meson -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false _build
-ninja -v -C _build
-ninja -C _build install
-cd ../_gegl
-meson -Dprefix="${GIMP_PREFIX}" -Ddocs=false _build
-ninja -C _build
-ninja -C _build install
-cd ..
+mkdir _babl/_build
+cd _babl/_build
+meson -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false ..
+ninja
+ninja install
+
+mkdir ../../_gegl/_build
+cd ../../_gegl/_build
+meson -Dprefix="${GIMP_PREFIX}" -Ddocs=false ..
+ninja
+ninja install
+cd ../..
 
 # Build
-ccache --zero-stats
-ccache --show-stats
+#ccache --zero-stats
+#ccache --show-stats
 
 ./autogen.sh --prefix="${GIMP_PREFIX}"
 make -j4
 make install
 
-ccache --show-stats
+#ccache --show-stats


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