-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (72 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
83 lines (72 loc) · 2.5 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
name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
- name: Fetch tags
run: git fetch --force --tags
- name: Install Linux deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libx11-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
libxext-dev \
libgl1-mesa-dev
- name: Configure (Windows)
if: runner.os == 'Windows'
# Do not pin the Visual Studio generator version: the hosted Windows
# image ships whichever Visual Studio is current (e.g. VS 2022 / 2026),
# so let CMake auto-detect the installed VS and only select the x64
# platform. The default VS generator is multi-config, so the Release
# build and build\Release\ output path below stay valid.
run: cmake -S . -B build -A x64
- name: Build (Windows)
if: runner.os == 'Windows'
run: cmake --build build --config Release --parallel
- name: Smoke test example output (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$out = (& .\build\Release\mads-director.exe --example 2>&1 | Out-String)
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if (($out -notmatch "\[db\]") -or ($out -notmatch "enabled\s*=\s*true")) {
Write-Error "Example output missing expected content"
Write-Host "Captured output:"
Write-Host $out
exit 1
}
- name: Configure (Unix)
if: runner.os != 'Windows'
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
cmake -S . -B build -G Ninja -DGLFW_BUILD_WAYLAND=OFF -DGLFW_BUILD_X11=ON
else
cmake -S . -B build -G Ninja
fi
- name: Build (Unix)
if: runner.os != 'Windows'
run: cmake --build build --parallel
- name: Smoke test example output (Unix)
if: runner.os != 'Windows'
run: |
./build/mads-director --example > /tmp/director-example.txt
grep -q "\[db\]" /tmp/director-example.txt
grep -q "enabled = true" /tmp/director-example.txt