-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (53 loc) · 1.95 KB
/
windows.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
name: "CI: Windows"
on: [ push ]
env:
VCPKG_ROOT: ${{github.workspace}}\vcpkg
VCPKG_TARGET_TRIPLET: x64-windows
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}\vcpkg\bincache
VCPKG_CACHE_EDITION: 1
jobs:
windows-latest-test:
runs-on: windows-latest
if: contains(github.event.head_commit.message, '[skip-ci]') == false
steps:
- uses: actions/checkout@v4
- uses: ilammy/[email protected]
- uses: lukka/get-cmake@latest
- name: Cache Vcpkg
id: restore-vcpkg-and-artifacts
uses: actions/cache@v3
with:
path: |
${{env.VCPKG_ROOT}}
!${{env.VCPKG_ROOT}}\buildtrees
!${{env.VCPKG_ROOT}}\packages
!${{env.VCPKG_ROOT}}\downloads
!${{env.VCPKG_ROOT}}\installed
key: tactile-windows-vcpkg-${{hashFiles('vcpkg.json')}}-${{env.VCPKG_CACHE_EDITION}}
- name: Install Vcpkg
if: steps.restore-vcpkg-and-artifacts.outputs.cache-hit != 'true'
run: |
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
.\vcpkg\vcpkg integrate install
- name: Create directory ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
if: steps.restore-vcpkg-and-artifacts.outputs.cache-hit != 'true'
run: mkdir -p ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
- name: Generate build files
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: |
mkdir build
cd build
cmake .. -GNinja `
-DCMAKE_BUILD_TYPE=Debug `
-DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} `
-DTACTILE_USE_SANITIZERS=OFF `
-DTACTILE_BUILD_TESTS=ON `
--log-level=DEBUG
- name: Build
run: ninja -C build
- name: Run core tests
working-directory: ./build/debug/test
shell: cmd
run: tactile-core-test.exe