From 37ce0c8e5079d2077e734ef3f091ea973e0eb805 Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Sun, 11 Jul 2021 18:12:42 +0200 Subject: [PATCH] Add tests on Windows Server Signed-off-by: Nicolas Bock --- .github/workflows/CI.yaml | 33 ++++++++++++++++++++++++++++ scripts/ci-windows-gcc-4.8-test-1.sh | 16 ++++++++++++++ scripts/prepare-container-windows.sh | 7 ++++++ 3 files changed, 56 insertions(+) create mode 100755 scripts/ci-windows-gcc-4.8-test-1.sh create mode 100755 scripts/prepare-container-windows.sh diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 99c1fd2c2..e607bedfe 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -78,6 +78,39 @@ jobs: TEST_SCRIPT: ${{ matrix.TEST_SCRIPT || env.TEST_SCRIPT }} run: ${TEST_SCRIPT} testing + build_windows: + name: Build and test the library on Windows Server (${{ matrix.JOBNAME }}) + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + - JOBNAME: gcc-11 C single real + TEST_SCRIPT: ./scripts/ci-gcc-11-C-single-real.sh + - JOBNAME: gcc-11 C double real + TEST_SCRIPT: ./scripts/ci-gcc-11-C-double-real.sh + - JOBNAME: gcc-11 C single complex + TEST_SCRIPT: ./scripts/ci-gcc-11-C-single-complex.sh + - JOBNAME: gcc-11 C double complex + TEST_SCRIPT: ./scripts/ci-gcc-11-C-double-complex.sh + - JOBNAME: gcc-11 Fortran single real + TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-single-real.sh + - JOBNAME: gcc-11 Fortran double real + TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-double-real.sh + - JOBNAME: gcc-11 Fortran single complex + TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-single-complex.sh + - JOBNAME: gcc-11 Fortran double complex + TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-double-complex.sh + steps: + - name: Check out sources + uses: actions/checkout@v2 + - name: Prepare container + run: ./scripts/prepare-container-windows.sh + - name: Build and test library + env: + TEST_SCRIPT: ${{ matrix.TEST_SCRIPT || env.TEST_SCRIPT }} + run: ${TEST_SCRIPT} testing + build: name: Build and test the library (${{ matrix.JOBNAME }}) runs-on: ubuntu-18.04 diff --git a/scripts/ci-windows-gcc-4.8-test-1.sh b/scripts/ci-windows-gcc-4.8-test-1.sh new file mode 100755 index 000000000..d5fdb4282 --- /dev/null +++ b/scripts/ci-windows-gcc-4.8-test-1.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e -u -x + +basedir=$(readlink --canonicalize $(dirname $0)/..) + +[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh + +export CC=gcc-4.8 +export CXX=g++-4.8 +export FC=gfortran-4.8 +export BUILD_SHARED_LIBS=yes +export BML_OPENMP=no +export BML_INTERNAL_BLAS=no + +${basedir}/build.sh testing diff --git a/scripts/prepare-container-windows.sh b/scripts/prepare-container-windows.sh new file mode 100755 index 000000000..e802cb89e --- /dev/null +++ b/scripts/prepare-container-windows.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e -u -x + +choco install \ + cmake \ + llvm