-
-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (42 loc) · 1.38 KB
/
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
name: ci
on:
push:
paths:
- "**.cmake"
- "**/CMakeLists.txt"
- ".github/workflows/ci.yml"
jobs:
core:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Ninja
run: cmake -Dprefix:PATH=~/ninja -P scripts/install_ninja.cmake
- name: Install CMake
run: cmake -Dprefix:PATH=~/cmake -P scripts/install_cmake.cmake
- name: CMake path (linux)
if: runner.os == 'Linux'
run: echo "$HOME/ninja:$HOME/cmake/bin" >> $GITHUB_PATH
- name: CMake path (macOS)
if: runner.os == 'macOS'
run: echo "$HOME/ninja:$HOME/cmake/CMake.app/Contents/bin" >> $GITHUB_PATH
- name: CMake path (Windows)
if: runner.os == 'Windows'
run: echo "$env:userprofile/ninja;$env:userprofile/cmake/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: echo $PATH
- run: cmake --version
- run: ninja --version
- name: configure cmake (w/ Fortran)
if: runner.os != 'Windows'
run: cmake -G Ninja --preset default
env:
FC: gfortran-13
- name: configure CMake (w/o Fortran)
if: runner.os == 'Windows'
run: cmake -G Ninja -Dfortran=no --preset default
- run: cmake --build --preset release
- run: ctest --preset release