-
Notifications
You must be signed in to change notification settings - Fork 1.6k
63 lines (51 loc) · 1.96 KB
/
CI-unixish.yml
File metadata and controls
63 lines (51 loc) · 1.96 KB
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
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: CI-unixish
on:
push:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
permissions:
contents: read
jobs:
build_cmake_boost:
strategy:
matrix:
os: [macos-13, macos-15] # non-macos platforms are already built with Boost in other contexts
fail-fast: false # Prefer quick result
runs-on: ${{ matrix.os }}
env:
# TODO: figure out why there are cache misses with PCH enabled
CCACHE_SLOPPINESS: pch_defines,time_macros
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
- name: CMake build on macOS (force Boost)
run: |
set -ex
# make sure we fail when Boost is requested and not available
# will fail because no package configuration is available
cmake -S . -B cmake.output.boost-force -G "Unix Makefiles" -DUSE_BOOST=On
exit $(($? ? 1 : 0))
# coreutils contains "nproc"
- name: Install missing software on macos
run: |
brew install coreutils boost
- name: CMake build on macOS (no Boost)
run: |
# make sure Boost is not used when disabled even though it is available
cmake -S . -B cmake.output.boost-no -G "Unix Makefiles" -DUSE_BOOST=Off
- name: CMake build on macOS (with Boost)
run: |
cmake -S . -B cmake.output.boost -G "Unix Makefiles" -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build cmake.output.boost -- -j$(nproc)