diff options
Diffstat (limited to '.gitlab-ci/test-msys2.sh')
-rwxr-xr-x | .gitlab-ci/test-msys2.sh | 45 |
1 files changed, 16 insertions, 29 deletions
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 \ |