-
Notifications
You must be signed in to change notification settings - Fork 29
34 lines (32 loc) · 1.18 KB
/
amd64_macos_cpp.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
# ref: https://github.com/actions/runner-images
name: amd64 macOS C++
on: [push, pull_request, workflow_dispatch]
jobs:
# Building using the github runner environement directly.
macos:
runs-on: macos-latest
strategy:
matrix:
build: [
["Xcode", "Release", "ALL_BUILD", "RUN_TESTS", "install"],
["Unix Makefiles", "Release", "all", "test", "install"]
]
fail-fast: false
env:
GENERATOR: ${{ matrix.build[0] }}
BUILD_TYPE: ${{ matrix.build[1] }}
BUILD_TARGET: ${{ matrix.build[2] }}
TEST_TARGET: ${{ matrix.build[3] }}
INSTALL_TARGET: ${{ matrix.build[4] }}
steps:
- uses: actions/checkout@v4
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "$GENERATOR" -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=install
- name: Build
run: cmake --build build --config "$BUILD_TYPE" --target "$BUILD_TARGET" -v
- name: Test
run: CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --config "$BUILD_TYPE" --target "$TEST_TARGET" -v
- name: Install
run: cmake --build build --config "$BUILD_TYPE" --target "$INSTALL_TARGET" -v