[pygobject] CI: clean up the msys2 job scripts



commit 80e48fd150407db4ba9cf51d9e77b25a3d4f08bd
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Nov 7 07:17:33 2020 +0100

    CI: clean up the msys2 job scripts

 .gitlab-ci.yml           |  9 +++------
 .gitlab-ci/test-msys2.sh | 45 ++++++++++++++++-----------------------------
 2 files changed, 19 insertions(+), 35 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 44045d80..de9d9b0b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,7 @@ cache:
     paths:
       - coverage/
   script:
+    - $env:CHERE_INVOKING = 'yes'
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
     - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
 
@@ -51,18 +52,14 @@ pages:
   only:
     - master
 
-python3-mingw32:
+mingw32:
   variables:
-    PYTHON: "python3"
     MSYSTEM: "MINGW32"
-    CHERE_INVOKING: "yes"
   <<: *mingw-defaults
 
-python3-mingw64:
+mingw64:
   variables:
-    PYTHON: "python3"
     MSYSTEM: "MINGW64"
-    CHERE_INVOKING: "yes"
   <<: *mingw-defaults
 
 python3.6:
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
index e11688bc..8fc42146 100755
--- a/.gitlab-ci/test-msys2.sh
+++ b/.gitlab-ci/test-msys2.sh
@@ -2,34 +2,22 @@
 
 set -e
 
-# skip the fontconfig cache, it's slooowww
-export MSYS2_FC_CACHE_SKIP=1
-export PANGOCAIRO_BACKEND=win32
-
-export PATH="/c/msys64/$MSYSTEM/bin:$PATH"
-if [[ "$MSYSTEM" == "MINGW32" ]]; then
-    export MSYS2_ARCH="i686"
-else
-    export MSYS2_ARCH="x86_64"
-fi
-
 pacman --noconfirm -Suy
 
 pacman --noconfirm -S --needed \
-    base-devel \
-    lcov \
-    mingw-w64-$MSYS2_ARCH-toolchain \
-    mingw-w64-$MSYS2_ARCH-ccache \
-    mingw-w64-$MSYS2_ARCH-$PYTHON-cairo \
-    mingw-w64-$MSYS2_ARCH-$PYTHON \
-    mingw-w64-$MSYS2_ARCH-$PYTHON-pip \
-    mingw-w64-$MSYS2_ARCH-$PYTHON-pytest \
-    mingw-w64-$MSYS2_ARCH-$PYTHON-coverage \
-    mingw-w64-$MSYS2_ARCH-gobject-introspection \
-    mingw-w64-$MSYS2_ARCH-libffi \
-    mingw-w64-$MSYS2_ARCH-glib2 \
-    mingw-w64-$MSYS2_ARCH-gtk3 \
-    git
+    "${MINGW_PACKAGE_PREFIX}"-ccache \
+    "${MINGW_PACKAGE_PREFIX}"-glib2 \
+    "${MINGW_PACKAGE_PREFIX}"-gobject-introspection \
+    "${MINGW_PACKAGE_PREFIX}"-gtk3 \
+    "${MINGW_PACKAGE_PREFIX}"-libffi \
+    "${MINGW_PACKAGE_PREFIX}"-python \
+    "${MINGW_PACKAGE_PREFIX}"-python-cairo \
+    "${MINGW_PACKAGE_PREFIX}"-python-coverage \
+    "${MINGW_PACKAGE_PREFIX}"-python-pip \
+    "${MINGW_PACKAGE_PREFIX}"-python-pytest \
+    "${MINGW_PACKAGE_PREFIX}"-toolchain \
+    git \
+    lcov
 
 # ccache setup
 export PATH="$MSYSTEM/lib/ccache/bin:$PATH"
@@ -39,16 +27,15 @@ export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
 
 # coverage setup
 export CFLAGS="-coverage -ftest-coverage -fprofile-arcs -Werror"
-PYVER=$($PYTHON -c "import sys; sys.stdout.write(''.join(map(str, sys.version_info[:3])))")
 COV_DIR="$(pwd)/coverage"
-COV_KEY="${MSYSTEM}.${PYVER}"
+COV_KEY="${CI_JOB_NAME}"
 mkdir -p "${COV_DIR}"
 export COVERAGE_FILE="${COV_DIR}/.coverage.${COV_KEY}"
 
 # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDEVMODE
 export PYTHONDEVMODE=1
 
-$PYTHON setup.py build_tests
+python setup.py build_tests
 
 lcov \
     --config-file .gitlab-ci/lcovrc \
@@ -56,7 +43,7 @@ lcov \
     --capture --initial --output-file \
     "${COV_DIR}/${COV_KEY}-baseline.lcov"
 
-MSYSTEM= $PYTHON -m coverage run --context "${COV_KEY}" tests/runtests.py
+MSYSTEM= python -m coverage run --context "${COV_KEY}" tests/runtests.py
 
 lcov \
     --config-file .gitlab-ci/lcovrc \


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