Skip to content

Add all three MSYS2 systems to Windows CI #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,82 @@ jobs:
with:
name: WindowsCMakeTestlog
path: build/Testing/Temporary/LastTest.log

msys2-build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: [
{ msystem: MSYS, arch: x86_64 },
{ msystem: MINGW64, arch: x86_64 },
{ msystem: MINGW32, arch: i686 }
]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2

- name: Setup MinGW native environment
uses: msys2/setup-msys2@v2
if: contains(matrix.msystem, 'MINGW')
with:
msystem: ${{ matrix.msystem }}
update: false
install: >-
git
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-gcc-fortran
mingw-w64-${{ matrix.arch }}-python
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-ninja

- name: Setup msys POSIX environment
uses: msys2/setup-msys2@v2
if: contains(matrix.msystem, 'MSYS')
with:
msystem: MSYS
update: false
install: >-
git
gcc
gcc-fortran
python
python-pip
cmake
ninja

- name: Install fypp
run: pip install fypp

- run: >-
cmake -G Ninja
-DCMAKE_SH="CMAKE_SH-NOTFOUND"
-Wdev
-B build
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
-DCMAKE_MAXIMUM_RANK=4
env:
FC: gfortran
CC: gcc
CXX: g++

- name: CMake build
run: cmake --build build --parallel

- name: catch build fail
run: cmake --build build --verbose --parallel 1
if: failure()

- name: CTest
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
working-directory: build

- uses: actions/upload-artifact@v1
if: failure()
with:
name: WindowsCMakeTestlog
path: build/Testing/Temporary/LastTest.log
2 changes: 1 addition & 1 deletion src/tests/stats/test_mean.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ program test_mean
implicit none

real(sp), parameter :: sptol = 1000 * epsilon(1._sp)
real(dp), parameter :: dptol = 1000 * epsilon(1._dp)
real(dp), parameter :: dptol = 2000 * epsilon(1._dp)

real(sp) :: s1(3) = [1.0_sp, 2.0_sp, 3.0_sp]

Expand Down