-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (86 loc) · 2.54 KB
/
ci.yml
File metadata and controls
114 lines (86 loc) · 2.54 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: ci
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
CTEST_NO_TESTS_ACTION: error
CTEST_PARALLEL_LEVEL: 0
CMAKE_INSTALL_PREFIX: ~/libs
CMAKE_PREFIX_PATH: ~/libs
CMAKE_GENERATOR: Ninja
on:
push:
workflow_dispatch:
# avoid wasted runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
core:
strategy:
matrix:
shared: [true, false]
msis2: [true, false]
os: [ubuntu-latest, macos-latest]
# future, these work
# libhdf5-mpi-dev
# hdf5-mpi
# macOS use gcc + gfortran to avoid HDF5 find fail and build fail
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Install system libs (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install --no-install-recommends libhdf5-dev
- name: Install system libs (macOS)
if: runner.os == 'macOS'
run: |
brew install hdf5
echo "CC=gcc-15" >> $GITHUB_ENV
echo "FC=gfortran-15" >> $GITHUB_ENV
- &checkout
uses: actions/checkout@v6
- name: Configure MSIS msis2=${{ matrix.msis2 }} shared=${{ matrix.shared }}
run: >-
cmake --preset default
-Dmsis2:BOOL=${{ matrix.msis2 }}
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
- name: Build MSIS
run: cmake --build --preset default
- name: Test MSIS
run: ctest --preset default
- name: Install MSIS
run: cmake --install build
- name: Example-build & test
run: cmake --workflow default
working-directory: example
windows:
timeout-minutes: 20
runs-on: windows-latest
env:
CMAKE_INSTALL_PREFIX: libs
CMAKE_PREFIX_PATH: libs
strategy:
matrix:
msis2: [true, false]
# shared: [true, false]
# shared always error 135 even on only msis shared. not a problem on real pc.
steps:
- uses: msys2/setup-msys2@v2
id: msys2
with:
update: true
install: >-
mingw-w64-ucrt-x86_64-gcc-fortran
mingw-w64-ucrt-x86_64-hdf5
- name: Put MSYS2_MinGW64 on PATH
run: echo "${{ steps.msys2.outputs.msys2-location }}/ucrt64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- *checkout
- name: Configure MSIS
run: cmake --preset default -Dmsis2:BOOL=${{ matrix.msis2 }}
env:
HDF5_ROOT: ${{ steps.msys2.outputs.msys2-location }}/ucrt64
- name: Build MSIS
run: cmake --build --preset default
- name: Test MSIS
run: ctest --preset default