-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (46 loc) · 1.38 KB
/
cmake.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
name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain:
- {compiler: gcc}
- {compiler: intel}
- {compiler: intel-classic}
- {compiler: nvidia-hpc}
exclude:
- os: windows-latest
toolchain: {compiler: nvidia-hpc}
- os: macos-latest
toolchain: {compiler: nvidia-hpc}
- os: macos-latest
toolchain: {compiler: intel}
steps:
- uses: actions/checkout@v4
- uses: awvwgk/setup-fortran@main
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
- name: Install Ninja
uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install ninja
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=${{ env.FC }} -DBUILD_TESTING=TRUE -GNinja
env:
FC: ${{ steps.setup-fortran.outputs.fc }}
- name: Build with CMake
run: cmake --build build --config Release
- name: Test with CMake
working-directory: build
run: ctest -C Release