-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (83 loc) · 2.78 KB
/
windows-build-test.yml
File metadata and controls
91 lines (83 loc) · 2.78 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Windows Build & Test
on:
push:
branches:
- main
paths:
- 'src/**'
- 'include/**'
- 'tests/**'
- 'CMakeLists.txt'
- '.github/workflows/windows-build-test.yml'
pull_request:
branches:
- main
paths:
- 'src/**'
- 'include/**'
- 'tests/**'
- 'CMakeLists.txt'
- '.github/workflows/windows-build-test.yml'
jobs:
build-and-test-windows:
if: false # TODO: Re-enable later
name: Build and Test on Windows
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies via vcpkg
timeout-minutes: 15
run: |
Write-Host "Installing dependencies via vcpkg (faster and more reliable for CI)..."
# vcpkg provides Vulkan headers/loader without needing full SDK installation
vcpkg install vulkan:x64-windows glfw3:x64-windows glslang:x64-windows spdlog:x64-windows glm:x64-windows gtest:x64-windows --recurse
# This takes forever to build ffmpeg... TODO: Find workaround
# vcpkg install glfw3:x64-windows glslang:x64-windows spdlog:x64-windows glm:x64-windows gtest:x64-windows ffmpeg[avcodec,avformat,swscale]:x64-windows
vcpkg integrate install
Write-Host "All dependencies installed successfully"
- name: Configure CMake
timeout-minutes: 5
run: |
cmake -B build `
-DCMAKE_BUILD_TYPE=Release `
-DBUILD_TESTS=ON `
-DDISABLE_FFMPEG=ON `
-DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" `
.
- name: Build
timeout-minutes: 10
run: cmake --build build --config Release
- name: Run unit tests
timeout-minutes: 5
run: |
# Run vsdf_tests
$vsdfTestPath = ".\build\tests\Release\vsdf_tests.exe"
if (Test-Path $vsdfTestPath) {
Write-Host "Running vsdf_tests..."
& $vsdfTestPath
if ($LASTEXITCODE -ne 0) {
Write-Error "vsdf_tests failed with exit code $LASTEXITCODE"
exit $LASTEXITCODE
}
} else {
Write-Error "vsdf_tests not found at $vsdfTestPath"
exit 1
}
# Run filewatcher_tests
$filewatcherTestPath = ".\build\tests\filewatcher\Release\filewatcher_tests.exe"
if (Test-Path $filewatcherTestPath) {
Write-Host "Running filewatcher_tests..."
& $filewatcherTestPath
if ($LASTEXITCODE -ne 0) {
Write-Error "filewatcher_tests failed with exit code $LASTEXITCODE"
exit $LASTEXITCODE
}
} else {
Write-Error "filewatcher_tests not found at $filewatcherTestPath"
exit 1
}