-
Notifications
You must be signed in to change notification settings - Fork 33
75 lines (60 loc) · 1.95 KB
/
cmake-tier2.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: Build (Tier 2 platforms)
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
macos-homebrew:
runs-on: macos-latest
strategy:
matrix:
include: [
# We need AppleClang 16, but GitHub only has 14 for now.
# { compiler: apple-clang },
{ compiler: clang }
]
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: brew install pkg-config gtkmm3 cmake
- name: Install Clang Compiler
if: ${{ matrix.compiler == 'clang' }}
run: brew install llvm@17
- name: Create Build Directory
run: cmake -E make_directory build
- name: Configure CMake (Apple Clang)
if: ${{ matrix.compiler == 'apple-clang' }}
shell: bash
working-directory: ${{github.workspace}}/build
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
- name: Configure CMake
if: ${{ matrix.compiler == 'clang' }}
shell: bash
working-directory: ${{github.workspace}}/build
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm@17)/bin/clang++
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure