-
Notifications
You must be signed in to change notification settings - Fork 5
81 lines (68 loc) · 2.11 KB
/
ci.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: "CI"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '25 2 * * 2'
jobs:
build_analyze:
runs-on: windows-2022
strategy:
fail-fast: False
matrix:
arch: [x64, arm64]
build_type: [Debug, Release]
sdk_version: [19041, 22621]
# Run unit tests and CodeQL analysis on x64Debug only
include:
- arch: x64
build_type: Debug
codeql: True
sdk_version: 19041
name: build_${{matrix.arch}}_${{matrix.build_type}}_${{matrix.sdk_version}}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
if: ${{ matrix.codeql }}
uses: github/codeql-action/init@v1
with:
languages: cpp
- name: Install Windows SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1
with:
sdk-version: ${{ matrix.sdk_version }}
- name: Build
run: |
mkdir build && pushd build
cmake -A ${{ matrix.arch }} -DCMAKE_SYSTEM_VERSION=10.0.${{ matrix.sdk_version }}.0 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
cmake --build . --parallel --config ${{ matrix.build_type }}
popd
- name: Perform CodeQL Analysis
if: ${{ matrix.codeql }}
uses: github/codeql-action/analyze@v1
- name: Collect test artifact
uses: actions/upload-artifact@v2
with:
name: proxy-wifi-test-${{ matrix.arch }}-${{ matrix.build_type }}
path: build/test/${{ matrix.build_type }}/proxy-wifi-test.exe
run_unit_tests:
needs: build_analyze
runs-on: windows-2022
steps:
- name: Download test artifact
id: download
uses: actions/download-artifact@v4.1.7
with:
name: proxy-wifi-test-x64-Debug
- name: Run tests
run: ${{steps.download.outputs.download-path}}/proxy-wifi-test.exe -s >> test-logs.txt
- name: Collect test logs on failure
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-logs
path: test-logs.txt