summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2020-11-07 07:17:33 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2020-11-07 09:09:19 +0100
commit80e48fd150407db4ba9cf51d9e77b25a3d4f08bd (patch)
tree53567b3e06190581515fc10b1e80096612d0f7ac
parente28fe69030608e06775ca1711d9e1664b8b36758 (diff)
downloadpygobject-80e48fd150407db4ba9cf51d9e77b25a3d4f08bd.tar.gz
CI: clean up the msys2 job scripts
-rw-r--r--.gitlab-ci.yml9
-rwxr-xr-x.gitlab-ci/test-msys2.sh45
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 \