-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (40 loc) · 1.42 KB
/
build.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
name: build
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
defaults:
run:
shell: bash
env:
BUILD_TYPE: Release
jobs:
build:
name: Build
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- { name: Ubuntu GCC, os: ubuntu-latest, cc: gcc, cxx: g++ }
- { name: Ubuntu Clang, os: ubuntu-latest, cc: clang, cxx: clang++ }
- { name: macOS GCC, os: macOS-latest, cc: gcc, cxx: g++ }
- { name: macOS Clang, os: macOS-latest, cc: clang, cxx: clang++ }
- { name: Windows GCC, os: windows-latest, cc: gcc, cxx: g++ }
- { name: Windows Clang, os: windows-latest, cc: clang, cxx: clang++ }
- { name: Windows MSVC, os: windows-latest, cc: msvc, cxx: msvc }
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure CMake
working-directory: ${{github.workspace}}
run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -Dfintamath_build_tests=ON -Dfintamath_build_shared=ON -Dfintamath_warnings_as_errors=ON
env:
CC: ${{matrix.config.cc}}
CXX: ${{matrix.config.cxx}}
- name: Build
working-directory: ${{github.workspace}}
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C${{env.BUILD_TYPE}} --output-on-failure