-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (46 loc) · 1.31 KB
/
cmake.yaml
File metadata and controls
55 lines (46 loc) · 1.31 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
name: CMake Build and Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
build_type: [Release]
shared_libs: [ON, OFF]
fortran: [OFF]
include:
# Add a Fortran build on each platform (shared only)
- os: ubuntu-latest
build_type: Release
shared_libs: ON
fortran: ON
- os: macos-latest
build_type: Release
shared_libs: ON
fortran: ON
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libyaml-dev gfortran
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install libyaml gcc
- name: Configure
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}
-DAST_BUILD_FORTRAN=${{ matrix.fortran }}
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build --output-on-failure