-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (137 loc) · 4.72 KB
/
Copy pathci.yml
File metadata and controls
154 lines (137 loc) · 4.72 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: CI
on: [push, pull_request]
jobs:
build-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew update
brew install cmake glfw
- name: Build
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
- name: Verify artifacts
run: |
# Verify libraries
ls -la build/lib/libqvlib.a
[ -f build/lib/libqvlib.a ]
ls -la build/lib/libsubdivide.a
[ -f build/lib/libsubdivide.a ]
ls -la build/lib/libviewer.a
[ -f build/lib/libviewer.a ]
# Verify example binaries exist
ls -la build/bin/ccsub
[ -f build/bin/ccsub ]
ls -la build/bin/loopsub
[ -f build/bin/loopsub ]
ls -la build/bin/subviewer
[ -f build/bin/subviewer ]
- name: Test CLI help commands
run: |
# Test each CLI with help flag
echo "Testing ccsub --help"
build/bin/ccsub --help || build/bin/ccsub -h
echo "Testing loopsub --help"
build/bin/loopsub --help || build/bin/loopsub -h
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake libglfw3-dev
- name: Build
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel
- name: Verify artifacts
run: |
# Verify libraries
ls -la build/lib/libqvlib.a
[ -f build/lib/libqvlib.a ]
ls -la build/lib/libsubdivide.a
[ -f build/lib/libsubdivide.a ]
ls -la build/lib/libviewer.a
[ -f build/lib/libviewer.a ]
# Verify example binaries exist
ls -la build/bin/ccsub
[ -f build/bin/ccsub ]
ls -la build/bin/loopsub
[ -f build/bin/loopsub ]
ls -la build/bin/subviewer
[ -f build/bin/subviewer ]
- name: Test CLI help commands
run: |
# Test each CLI with help flag
echo "Testing ccsub --help"
build/bin/ccsub --help || build/bin/ccsub -h
echo "Testing loopsub --help"
build/bin/loopsub --help || build/bin/loopsub -h
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
vcpkg install glfw3:x64-windows
- name: Build
shell: pwsh
run: |
# Get-Command finds the executable in PATH
$vcpkgExePath = (Get-Command vcpkg -ErrorAction Stop).Source
# Get the directory of the executable
$vcpkgRoot = (Get-Item $vcpkgExePath).DirectoryName
cmake -S . -B build `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="$vcpkgRoot\scripts\buildsystems\vcpkg.cmake"
cmake --build build --config Release --parallel
- name: Verify artifacts
shell: pwsh
run: |
# Verify libraries
Write-Host "Checking for library files..."
$libs = @(
"$pwd\build\lib\Release\qvlib.lib",
"$pwd\build\lib\Release\subdivide.lib",
"$pwd\build\lib\Release\viewer.lib"
)
foreach ($lib in $libs) {
if (-not (Test-Path $lib)) {
Write-Error "Library not found: $lib"
exit 1
}
Write-Host "Found: $lib"
}
# Verify example binaries exist
Write-Host "`nChecking for executable files..."
$bins = @(
"$pwd\build\bin\Release\ccsub.exe",
"$pwd\build\bin\Release\loopsub.exe",
"$pwd\build\bin\Release\subviewer.exe"
)
foreach ($bin in $bins) {
if (-not (Test-Path $bin)) {
Write-Error "Binary not found: $bin"
exit 1
}
Write-Host "Found: $bin"
}
- name: Test CLI help commands
shell: pwsh
run: |
# Test each CLI with help flag
$ErrorActionPreference = 'Stop'
Write-Host "`nTesting ccsub --help"
& "$pwd\build\bin\Release\ccsub.exe" --help
if ($LASTEXITCODE -ne 0) {
& "$pwd\build\bin\Release\ccsub.exe" -h
}
Write-Host "`nTesting loopsub --help"
& "$pwd\build\bin\Release\loopsub.exe" --help
if ($LASTEXITCODE -ne 0) {
& "$pwd\build\bin\Release\loopsub.exe" -h
}