-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (44 loc) · 1.2 KB
/
Copy pathbuild_test_macos.yml
File metadata and controls
53 lines (44 loc) · 1.2 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
name: MacOS Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
env:
CMAKE_BUILD_TYPE: Release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake
uses: lukka/get-cmake@v3.29.2
- name: Cache vcpkg packages
uses: actions/cache@v4
with:
path: |
~/.cache/vcpkg
heiFIP/build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('heiFIP/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install dependencies
run: |
brew update
brew install pkg-config cmake git
- name: Configure and Build
working-directory: heiFIP
run: |
cmake -B build -S . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
cmake --build build -j$(sysctl -n hw.ncpu)
- name: Run Tests
working-directory: heiFIP
run: |
cd build
ctest --output-on-failure