-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (58 loc) · 2.12 KB
/
Copy pathwindows.yml
File metadata and controls
67 lines (58 loc) · 2.12 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
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Windows Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
mode: [ Debug, Release ]
env:
CXX: cl.exe
CC: cl.exe
BUILDCACHE_COMPRESS: true
BUILDCACHE_DIR: ${{ github.workspace }}/.buildcache
BUILDCACHE_ACCURACY: SLOPPY
BUILDCACHE_LUA_PATH: ${{ github.workspace }}/tools
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
# ==== CACHE ====
- name: buildcache Cache
uses: actions/cache@v1.1.2
with:
path: ${{ github.workspace }}/.buildcache
key: buildcache-windows-${{ matrix.mode }}-${{ hashFiles('.pkg') }}-${{ hashFiles('**/*.h') }}-${{ hashFiles('**/*.cc') }}
restore-keys: |
buildcache-windows-${{ matrix.mode }}-${{ hashFiles('.pkg') }}-${{ hashFiles('**/*.h') }}
buildcache-windows-${{ matrix.mode }}-${{ hashFiles('.pkg') }}-
buildcache-windows-${{ matrix.mode }}-
- name: Dependencies Cache
uses: actions/cache@v1.1.2
with:
path: ${{ github.workspace }}/deps
key: deps-${{ hashFiles('.pkg') }}
restore-keys: deps-
# ==== BUILD ====
- name: Build
run: |
$devShell = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find **\Microsoft.VisualStudio.DevShell.dll
$installPath = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationpath
Import-Module $devShell
Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation -DevCmdArguments "-arch=amd64"
cmake -GNinja -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.mode }}
.\build\bin\buildcache.exe -z
cmake --build build --target express-test step-test
.\build\bin\buildcache.exe -s
# ==== TESTS ====
- name: Run Tests
run: |
.\build\express-test.exe
.\build\step-test.exe