-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (35 loc) · 1.63 KB
/
macos.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
name: macos
on: [push, pull_request]
jobs:
build:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
build-type: [ Release, RelWithDebInfo ]
compiler: [
#{ cxx: g++-11, pkgs: gcc@11, extra-flags: "-undefined dynamic_lookup" },
{ cxx: g++-12, pkgs: gcc@12, extra-flags: "-undefined dynamic_lookup" },
#{ cxx: g++-13, pkgs: gcc@13, extra-flags: "-undefined dynamic_lookup" },
#{ cxx: $(brew --prefix llvm@14)/bin/clang++, pkgs: llvm@14 gcc@11, extra-flags: "-stdlib=libstdc++ -gcc-toolchain=$(brew --prefix gcc@11)" },
{ cxx: $(brew --prefix llvm@15)/bin/clang++, pkgs: llvm@15 gcc@12, extra-flags: "--gcc-toolchain=$(brew --prefix gcc@12) -stdlib=libstdc++" }
]
defaults:
run:
working-directory: ${{ github.workspace }}/build
name: ${{ matrix.compiler.cxx }}, ${{ matrix.build-type }}
steps:
- name: checkout-repo
uses: actions/checkout@v3
- name: setup-compiler
run: brew update && brew install ${{ matrix.compiler.pkgs }} && ls -lR $(brew --prefix gcc@12)/
- name: setup-catch
run: sudo bash ./install_catch.sh -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_CXX_FLAGS="${{ matrix.compiler.extra-flags }}"
- name: setup-build
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_CXX_FLAGS="${{ matrix.compiler.extra-flags }}"
- name: build
run: cmake --build . --parallel 8
- name: run-tests
run: ctest --output-on-failure --schedule-random
- name: install
run: sudo cmake --install .