-
Notifications
You must be signed in to change notification settings - Fork 12
75 lines (64 loc) · 2 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
75
# .github/workflows/macos.yml
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Macos Build
on:
push:
branches: ["main"]
paths:
- "include/**"
- "src/**"
- "tests/**"
- "examples/**"
- "cmake/**"
- "Makefile"
- "CMakePresets.json"
- "CMakeLists.txt"
- ".github/workflows/macos.yml"
pull_request:
branches: ["main"]
paths:
- "include/**"
- "src/**"
- "tests/**"
- "examples/**"
- "cmake/**"
- "Makefile"
- "CMakePresets.json"
- "CMakeLists.txt"
- ".github/workflows/macos.yml"
jobs:
build:
runs-on: macos-15
strategy:
fail-fast: false
matrix:
preset: [debug, release]
# TODO: compiler: [g++, clang++-19]
compiler: [g++, clang++-18]
steps:
- uses: actions/checkout@v4
- name: Setup Cpp
# if: startsWith(matrix.compiler, 'clang')
uses: aminya/setup-cpp@v1
with:
# TODO: compiler: llvm-19
# clangtidy: true
# cmake: true
ninja: true
- name: Install llvm-19
if: startsWith(matrix.compiler, 'clang')
run: |
brew install llvm@19 || echo ignored
- name: macos clang++-18 ${{ matrix.preset }}
if: startsWith(matrix.compiler, 'clang')
run: CXX=$(brew --prefix llvm@18)/bin/clang++ cmake --workflow --preset ${{ matrix.preset }}
- name: macos clang++-18 sanitizer
if: startsWith(matrix.compiler, 'clang') && startsWith(matrix.preset, 'debug')
run: CXX=$(brew --prefix llvm@18)/bin/clang++ make all
- name: macos g++ ${{ matrix.preset }}
if: startsWith(matrix.compiler, 'g++')
run: CXX=${{ matrix.compiler }} cmake --workflow --preset ${{ matrix.preset }}
# TODO: fails with AppleClang 16.0.0 on CI!
# - name: macos g++ sanitizer
# if: startsWith(matrix.compiler, 'g++') && startsWith(matrix.preset, 'debug')
# run: CXX=${{ matrix.compiler }} make all