forked from microsoft/cppgraphqlgen
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.27 KB
/
macos.yml
File metadata and controls
54 lines (43 loc) · 1.27 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
name: macOS
on: [push, pull_request]
jobs:
xcode:
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
runs-on: macos-11
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache vcpkg
uses: actions/cache@v2
id: cache-vcpkg
with:
path: vcpkg/
key: vcpkg-x64-osx
- name: Install Dependencies
if: ${{ !steps.cache-vcpkg.outputs.cache-hit }}
shell: pwsh
run: |
git clone https://github.com/microsoft/vcpkg
cd vcpkg
./bootstrap-vcpkg.sh -allowAppleClang
./vcpkg integrate install
./vcpkg install boost-program-options rapidjson gtest
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure
shell: pwsh
working-directory: build/
run: |
$vcpkgToolchain = Join-Path '../vcpkg' './scripts/buildsystems/vcpkg.cmake' -Resolve
$cmakeBuildType = '${{ matrix.config }}'
cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ${{ github.workspace }}
- name: Build
working-directory: build/
run: cmake --build . -j -v
- name: Test
working-directory: build/
run: ctest --output-on-failure