-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (53 loc) · 1.67 KB
/
linux-Windows-macOS.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
name: Linux, Windows, macOS
on:
push:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: mkdir
run: mkdir build
- name: Cache vcpkg
id: cache-vcpkg
uses: actions/cache@v2
with:
path: vcpkg
key: ${{ runner.os }}-${{ hashFiles('**/vcpkg.json') }}-project0-0
- name: checkout vcpkg
uses: actions/checkout@v2
with:
repository: "offscale/vcpkg"
ref: project0
path: vcpkg
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
- name: Setup vcpkg (Windows)
run: ./vcpkg/bootstrap-vcpkg.bat
if: matrix.os == 'windows-latest'
- name: "Setup vcpkg (non Windows)"
run: ./vcpkg/bootstrap-vcpkg.sh
if: matrix.os != 'windows-latest'
- name: configure (with vcpkg on Windows)
working-directory: ./build
run: |
cmake -DCMAKE_TOOLCHAIN_FILE="vcpkg\scripts\buildsystems\vcpkg.cmake" -DBUILD_REAL_API_TESTING="OFF" ..
shell: cmd
if: matrix.os == 'windows-latest'
- name: configure (with vcpkg on non-Windows)
working-directory: ./build
run: |
cmake -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" -DBUILD_REAL_API_TESTING="OFF" ..
if: matrix.os != 'windows-latest'
- name: build
working-directory: ./build
run: cmake --build .
- name: test
working-directory: ./build
run: ctest -C Debug .