-
-
Notifications
You must be signed in to change notification settings - Fork 55
82 lines (74 loc) · 2.11 KB
/
win-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Windows CI
on: [push, pull_request]
jobs:
Build:
runs-on: windows-latest
strategy:
fail-fast: true
# defaults:
# run:
# shell: msys2 {0}
env:
FC: gfortran
CC: gcc
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Dependencies
uses: msys2/setup-msys2@v2
with:
update: true
path-type: inherit
install: >-
mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gcc
- name: setup-mpi
id: setup-mpi
uses: mpi4py/setup-mpi@v1
with:
mpi: intelmpi
- name: MPI info
run: |
echo "${{ steps.setup-mpi.outputs.mpi }}"
mpiexec --version
ls $I_MPI_ROOT
ls $I_MPI_ROOT\bin
ls $I_MPI_ROOT\lib
mpifc.bat -show
mpicc.bat -show
- name: Build and Test
run: |
$ErrorActionPreference = "Stop"
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$PSDefaultParameterValues['*:ErrorAction']='Stop'
function ThrowOnNativeFailure {
if (-not $?)
{
throw 'Native Failure'
}
}
mkdir build
$env:VERBOSE = 1
make -Wdev -G "Unix Makefiles" -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME\apps\OpenCoarrays -DCMAKE_BUILD_TYPE:STRING="Debug"
ThrowOnNativeFailure
cmake --build build -j
ThrowOnNativeFailure
cmake --build build -t install -j
ThrowOnNativeFailure
ctest --test-dir build --output-on-failure --schedule-random --repeat-until-fail 1 --timeout 200
ThrowOnNativeFailure
echo $HOME\apps\OpenCoarrays\bin | Out-File -FilePath $GITHUB_PATH -Encoding utf8 -Append
ThrowOnNativeFailure
$env:PATH += ";$HOME\apps\OpenCoarrays\bin"
ThrowOnNativeFailure
cafrun --show
ThrowOnNativeFailure
caf --show
ThrowOnNativeFailure
cafrun --version
ThrowOnNativeFailure
caf --version
ThrowOnNativeFailure
cd build
make uninstall
ThrowOnNativeFailure