[pygobject] gitlab-ci: Add MSYS2 test jobs



commit 1534289ce5934b73b5c980f8e246192009337776
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Feb 20 16:38:25 2018 +0100

    gitlab-ci: Add MSYS2 test jobs
    
    This assumes a gitlab runner with a "win32" tag which has
    MSYS2 installed in the default path and uses the "cmd" shell.

 .gitlab-ci.yml           | 32 +++++++++++++++++++++++++++-----
 .gitlab-ci/test-msys2.sh | 28 ++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f426e93..4f02af61 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,11 +7,6 @@ stages:
   - build_and_test
   - coverage
 
-before_script:
-  - mkdir -p _ccache
-  - export CCACHE_BASEDIR=${PWD}
-  - export CCACHE_DIR=${PWD}/_ccache
-
 cache:
   paths:
     - _ccache/
@@ -22,6 +17,9 @@ cache:
     paths:
       - coverage/
   script:
+   - mkdir -p _ccache
+   - export CCACHE_BASEDIR=${PWD}
+   - export CCACHE_DIR=${PWD}/_ccache
    - bash -x ./.gitlab-ci/test-docker.sh
 
 coverage:
@@ -34,6 +32,30 @@ coverage:
   script:
     - bash -x ./.gitlab-ci/coverage-docker.sh
 
+python2-mingw32:
+  stage: build_and_test
+  tags:
+    - win32
+  variables:
+    PYTHON: "python2"
+    MSYSTEM: "MINGW32"
+    CHERE_INVOKING: "yes"
+  script:
+    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
+    - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
+
+python3-mingw32:
+  stage: build_and_test
+  tags:
+    - win32
+  variables:
+    PYTHON: "python3"
+    MSYSTEM: "MINGW32"
+    CHERE_INVOKING: "yes"
+  script:
+    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
+    - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
+
 python2.7:
   variables:
     PYENV_VERSION: "2.7.14"
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
new file mode 100755
index 00000000..84c1c12c
--- /dev/null
+++ b/.gitlab-ci/test-msys2.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e
+
+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 \
+    mingw-w64-$MSYS2_ARCH-toolchain \
+    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-gobject-introspection \
+    mingw-w64-$MSYS2_ARCH-libffi \
+    mingw-w64-$MSYS2_ARCH-glib2 \
+    mingw-w64-$MSYS2_ARCH-gtk3 \
+    git \
+    autoconf-archive
+
+$PYTHON setup.py test


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