-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (47 loc) · 1.27 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
name: Windows Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
mode: [ Debug, Release ]
env:
CXX: cl
CC: cl
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: ilammy/msvc-dev-cmd@v1
- name: Build
run: |
cmake -GNinja -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.mode }}
cmake --build build --target pkg pkg-test
- name: Run Tests
run: .\build\pkg-test
- name: Upload Distribution
if: matrix.mode == 'Release'
uses: actions/upload-artifact@v1
with:
name: pkg
path: ./build/pkg.exe
# ==== RELEASE ====
- name: Upload Release
if: github.event.action == 'published' && matrix.mode == 'Release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/pkg.exe
asset_name: pkg.exe
asset_content_type: application/octet-stream