forked from nzbgetcom/nzbget
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.01 KB
/
windows-tests.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
name: windows tests
on:
push:
branches:
- feature/*
- develop
- main
pull_request:
branches:
- develop
- main
workflow_call:
workflow_dispatch:
jobs:
test:
runs-on: [self-hosted, windows]
steps:
- name: Prepare environment
run: |
"C:\Program Files\CMake\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
cmake --version
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DBUILD_ONLY_TESTS=ON
cmake --build . --config Release -j 2
- name: Test
run: |
cd build
ctest -C Release
- name: Upload test artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: nzbget-windows-test-log
path: build/Testing/Temporary/LastTest.log
retention-days: 5