-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (63 loc) · 3.33 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: macos
on: [push, pull_request]
jobs:
build:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
build-type: [ Release, RelWithDebInfo, Debug ]
compiler: [
# { cxx: g++-11, pkgs: gcc@11, extra-flags: "-undefined dynamic_lookup -Wno-psabi" },
# { cxx: g++-12, pkgs: gcc@12, extra-flags: "-undefined dynamic_lookup -Wno-psabi" },
# { cxx: g++-13, pkgs: gcc@13, extra-flags: "-undefined dynamic_lookup -Wno-psabi" },
# { cxx: g++-14, pkgs: gcc@14, extra-flags: "-undefined dynamic_lookup -Wno-psabi" },
{
cxx: $(brew --prefix llvm@14)/bin/clang++,
pkgs: llvm@14 gcc@11,
extra-flags: "-femulated-tls -stdlib=libstdc++ -stdlib++-isystem $(brew --prefix gcc@11)/include/c++/11 -cxx-isystem $(brew --prefix gcc@11)/include/c++/11/aarch64-apple-darwin23 -fsanitize=thread -g -fno-omit-frame-pointer",
linker-flags: "-L$(brew --prefix gcc@11)/lib/gcc/11"
}
# {
# cxx: $(brew --prefix llvm@15)/bin/clang++,
# pkgs: llvm@15 gcc@12,
# extra-flags: "-femulated-tls -stdlib=libstdc++ -stdlib++-isystem $(brew --prefix gcc@12)/include/c++/12 -cxx-isystem $(brew --prefix gcc@12)/include/c++/12/aarch64-apple-darwin23",
# linker-flags: "-L$(brew --prefix gcc@12)/lib/gcc/12"
# },
# {
# cxx: $(brew --prefix llvm@16)/bin/clang++,
# pkgs: llvm@16 gcc@13,
# extra-flags: "-femulated-tls -stdlib=libstdc++ -stdlib++-isystem $(brew --prefix gcc@13)/include/c++/13 -cxx-isystem $(brew --prefix gcc@13)/include/c++/13/aarch64-apple-darwin23",
# linker-flags: "-L$(brew --prefix gcc@13)/lib/gcc/13"
# },
# {
# cxx: $(brew --prefix llvm@17)/bin/clang++,
# pkgs: llvm@17 gcc@14,
# extra-flags: "-femulated-tls -stdlib=libstdc++ -stdlib++-isystem $(brew --prefix gcc@14)/include/c++/14 -cxx-isystem $(brew --prefix gcc@14)/include/c++/14/aarch64-apple-darwin23",
# linker-flags: "-L$(brew --prefix gcc@14)/lib/gcc/14"
# },
# {
# cxx: $(brew --prefix llvm@18)/bin/clang++,
# pkgs: llvm@18 gcc@14,
# extra-flags: "-femulated-tls"
# }
]
defaults:
run:
working-directory: ${{ github.workspace }}/build
name: ${{ matrix.compiler.pkgs }}, ${{ matrix.build-type }}
steps:
- name: checkout-repo
uses: actions/checkout@v4
- name: setup-compiler
run: brew update && brew install ${{ matrix.compiler.pkgs }}
- name: setup-catch
run: sudo bash ../tools/install_catch.sh -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_CXX_FLAGS="${{ matrix.compiler.extra-flags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.compiler.linker-flags }}"
- name: setup-build
run: cmake .. -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DGAPP_CXX_FLAGS="${{ matrix.compiler.extra-flags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.compiler.linker-flags }}" -DGAPP_USE_WERROR=ON
- name: build
run: cmake --build . --parallel 8
- name: run-tests
run: ctest --output-on-failure --schedule-random
- name: install
run: sudo cmake --install .