forked from tcbrindle/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 2.09 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
76
77
78
# Based on macos.yml from {fmt}
# https://github.com/fmtlib/fmt/blob/master/.github/workflows/macos.yml
name: macos
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: macos-14
strategy:
matrix:
compiler: [GCC-13, LLVM-Clang-16, LLVM-Clang-17]
test_with: [Headers, Module]
build_type: [Debug, Release]
exclude:
- compiler: GCC-13
test_with: Module
- compiler: LLVM-Clang-16
test_with: Module
include:
- compiler: GCC-13
cxx: g++-13
install: |
brew update
brew install gcc@13 ninja
- compiler: LLVM-Clang-16
cxx: /usr/local/opt/llvm@16/bin/clang++
install: |
brew install llvm@16 ninja
- compiler: LLVM-Clang-17
cxx: /usr/local/opt/llvm@17/bin/clang++
install: |
brew install llvm@17 ninja
steps:
- uses: actions/checkout@master
# - uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: '14.3.1'
- name: Install llvm
run: |
brew uninstall llvm@15
brew install llvm@14
- name: Create Build Environment
run: |
${{matrix.install}}
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
run: |
cmake -GNinja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=${{matrix.cxx}} \
-DFLUX_BUILD_BENCHMARKS=${{matrix.build_type == 'Release'}} \
-DFLUX_BUILD_MODULE=${{matrix.test_with == 'Module'}} \
-DFLUX_BUILD_TESTS_USING_MODULE=${{matrix.test_with == 'Module'}} \
$GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}}
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}}
env:
CTEST_OUTPUT_ON_FAILURE: True