From 08671f431b66cefe8dcb5718e3828887e98e7636 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 8 Dec 2018 21:00:58 +0100 Subject: ci: Add a msys2 autotools job Getting rid of autotools wont be easy, so make sure we run all tests on Windows, not just the ones ported to meson. --- .gitlab-ci.yml | 26 +++++++++++++++++----- .gitlab-ci/test-msys2-autotools.sh | 27 +++++++++++++++++++++++ .gitlab-ci/test-msys2-meson.sh | 45 ++++++++++++++++++++++++++++++++++++++ .gitlab-ci/test-msys2.sh | 45 -------------------------------------- 4 files changed, 93 insertions(+), 50 deletions(-) create mode 100644 .gitlab-ci/test-msys2-autotools.sh create mode 100644 .gitlab-ci/test-msys2-meson.sh delete mode 100644 .gitlab-ci/test-msys2.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2562d2a3..50e7a4ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ cache: paths: - _ccache/ -fedora-x86_64-meson-python3: +fedora-x86_64-meson: stage: build variables: CCACHE_BASEDIR: "${CI_PROJECT_DIR}" @@ -28,7 +28,7 @@ fedora-x86_64-meson-python3: paths: - "${CI_PROJECT_DIR}/_build/meson-logs" -fedora-x86_64-autotools-python3: +fedora-x86_64-autotools: stage: build variables: CCACHE_BASEDIR: "${CI_PROJECT_DIR}" @@ -47,7 +47,7 @@ fedora-x86_64-autotools-python3: paths: - "${CI_PROJECT_DIR}/*/scanner/test-suite.log" -msys2-mingw32-python3: +msys2-mingw32-meson: stage: build tags: - win32 @@ -56,14 +56,30 @@ msys2-mingw32-python3: 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" + - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh" artifacts: when: on_failure name: "gi-_%CI_COMMIT_REF_NAME%" paths: - _build/meson-logs -vs2017-x64-python3: +msys2-mingw32-autotools: + 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-autotools.sh" + artifacts: + when: on_failure + name: "gi-_%CI_COMMIT_REF_NAME%" + paths: + - _build/meson-logs + +vs2017-x64-meson: stage: build allow_failure: true tags: diff --git a/.gitlab-ci/test-msys2-autotools.sh b/.gitlab-ci/test-msys2-autotools.sh new file mode 100644 index 00000000..1029864b --- /dev/null +++ b/.gitlab-ci/test-msys2-autotools.sh @@ -0,0 +1,27 @@ +#!/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 \ + autoconf-archive \ + mingw-w64-$MSYS2_ARCH-toolchain \ + mingw-w64-$MSYS2_ARCH-python3 \ + mingw-w64-$MSYS2_ARCH-libffi \ + mingw-w64-$MSYS2_ARCH-cairo \ + mingw-w64-$MSYS2_ARCH-glib2 \ + mingw-w64-$MSYS2_ARCH-gtk-doc + +./autogen.sh + +make -j6 +make -j6 check diff --git a/.gitlab-ci/test-msys2-meson.sh b/.gitlab-ci/test-msys2-meson.sh new file mode 100644 index 00000000..9c5abe3e --- /dev/null +++ b/.gitlab-ci/test-msys2-meson.sh @@ -0,0 +1,45 @@ +#!/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-ccache \ + mingw-w64-$MSYS2_ARCH-meson \ + mingw-w64-$MSYS2_ARCH-python3 \ + mingw-w64-$MSYS2_ARCH-python3-pip \ + mingw-w64-$MSYS2_ARCH-libffi \ + 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 + +export CCACHE_BASEDIR="${CI_PROJECT_DIR}" +export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" + +pip3 install --upgrade --user meson==0.48.2 flake8 +export PATH="$HOME/.local/bin:$PATH" + +# FIXME: https://github.com/Alexpux/MINGW-packages/pull/4064 +# Passing the full interpreter path works around the issue +PYTHON="$(which python3)" +meson -Dpython="${PYTHON}" --buildtype debug _build +cd _build +ninja + +meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib +cd .. + +python3 -m flake8 --count diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh deleted file mode 100644 index 9c5abe3e..00000000 --- a/.gitlab-ci/test-msys2.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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-ccache \ - mingw-w64-$MSYS2_ARCH-meson \ - mingw-w64-$MSYS2_ARCH-python3 \ - mingw-w64-$MSYS2_ARCH-python3-pip \ - mingw-w64-$MSYS2_ARCH-libffi \ - 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 - -export CCACHE_BASEDIR="${CI_PROJECT_DIR}" -export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" - -pip3 install --upgrade --user meson==0.48.2 flake8 -export PATH="$HOME/.local/bin:$PATH" - -# FIXME: https://github.com/Alexpux/MINGW-packages/pull/4064 -# Passing the full interpreter path works around the issue -PYTHON="$(which python3)" -meson -Dpython="${PYTHON}" --buildtype debug _build -cd _build -ninja - -meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib -cd .. - -python3 -m flake8 --count -- cgit v1.2.1