diff options
-rw-r--r-- | .gitlab-ci.yml | 16 | ||||
-rw-r--r-- | .gitlab-ci/test-msys2.sh | 32 |
2 files changed, 48 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9bdbc7ae..cb91027e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,3 +16,19 @@ fedora-x86_64: name: "gi-_${CI_COMMIT_REF_NAME}" paths: - "${CI_PROJECT_DIR}/_build/meson-logs" + +msys2-mingw32: + stage: build + tags: + - win32 + variables: + 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" + artifacts: + when: on_failure + name: "gi-_%CI_COMMIT_REF_NAME%" + paths: + - _build/meson-logs diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh new file mode 100644 index 00000000..5b5efe2a --- /dev/null +++ b/.gitlab-ci/test-msys2.sh @@ -0,0 +1,32 @@ +#!/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 \ + git \ + base-devel \ + mingw-w64-$MSYS2_ARCH-toolchain \ + mingw-w64-$MSYS2_ARCH-meson \ + mingw-w64-$MSYS2_ARCH-python3 \ + mingw-w64-$MSYS2_ARCH-libffi \ + mingw-w64-$MSYS2_ARCH-glib2 \ + mingw-w64-$MSYS2_ARCH-pkg-config \ + mingw-w64-$MSYS2_ARCH-cairo \ + mingw-w64-$MSYS2_ARCH-pcre \ + mingw-w64-$MSYS2_ARCH-zlib \ + mingw-w64-$MSYS2_ARCH-gettext + +meson --buildtype debug _build +cd _build +ninja + +meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib |