-
-
Notifications
You must be signed in to change notification settings - Fork 24
71 lines (54 loc) · 1.56 KB
/
ci_windows.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
name: ci_windows
env:
CTEST_NO_TESTS_ACTION: error
CTEST_PARALLEL_LEVEL: 0
CMAKE_BUILD_PARALLEL_LEVEL: 4
on:
push:
paths:
- "**.c"
- "**.cpp"
- "**.f90"
- "**.F90"
- "**/CMakeLists.txt"
- "**.cmake"
- ".github/workflows/ci_windows.yml"
- "!memcheck.cmake"
- "!coverage.cmake"
jobs:
msys2:
timeout-minutes: 30
runs-on: windows-latest
# Windows needs these defined within the job. $HOME doesn't work nor does ~.
env:
CMAKE_INSTALL_PREFIX: libs
CMAKE_PREFIX_PATH: libs
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-hdf5
- name: Put MSYS2_MinGW64 on PATH
run: echo "${{ runner.temp }}/msys64/mingw64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- uses: actions/checkout@v4
- name: config
run: cmake --preset default -G "MinGW Makefiles"
env:
HDF5_ROOT: ${{ runner.temp }}/msys64/mingw64/
- name: print config log
if: ${{ failure() }}
run: cat build/CMakeFiles/CMakeConfigureLog.yaml
- name: Build
run: cmake --build --preset default
- name: test
run: ctest --preset default
- name: install package
run: cmake --install build
- name: example workflow
run: cmake -S example -B example/build -G "MinGW Makefiles"
env:
HDF5_ROOT: ${{ runner.temp }}/msys64/mingw64/
- run: cmake --build example/build
- run: ctest --test-dir example/build -V