Skip to content

Commit 3d47168

Browse files
committed
ci: add VK-GL-CTS build validation workflow
Add a CI job that clones VK-GL-CTS, replaces the pinned vulkan-video-samples sources with the current PR code, and builds CTS to validate compile-time compatibility on both Linux and Win32. The build can be triggered manually by adding a 'cts-build' label or automatically on '[release]' pattern in the commit message.
1 parent 9893436 commit 3d47168

2 files changed

Lines changed: 105 additions & 1 deletion

File tree

.github/workflows/cts-build.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: "VK-GL-CTS build validation"
2+
run-name: CTS build validation by ${{ github.actor }}
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types: [opened, synchronize, labeled]
8+
9+
jobs:
10+
cts-build-linux:
11+
runs-on: ubuntu-24.04
12+
if: >
13+
contains(github.event.pull_request.title || '', '[release]') ||
14+
github.event.label.name == 'cts-build' ||
15+
contains(github.event.pull_request.labels.*.name, 'cts-build')
16+
env:
17+
TERM: dumb
18+
19+
steps:
20+
- name: Checkout Vulkan-Video-Samples
21+
uses: actions/checkout@v6
22+
with:
23+
path: vulkan-video-samples
24+
25+
- name: Install dependencies
26+
run: |
27+
sudo apt update
28+
sudo apt install --assume-yes --no-install-recommends \
29+
cmake \
30+
ninja-build \
31+
python3 \
32+
python3-lxml \
33+
build-essential \
34+
libx11-dev \
35+
libwayland-dev \
36+
libvulkan-dev \
37+
libxrandr-dev
38+
39+
- name: Clone VK-GL-CTS
40+
run: |
41+
git clone --depth 1 https://github.com/KhronosGroup/VK-GL-CTS.git vk-gl-cts
42+
43+
- name: Fetch CTS external sources
44+
run: |
45+
cd vk-gl-cts
46+
python3 external/fetch_sources.py
47+
48+
- name: Replace vulkan-video-samples sources
49+
run: |
50+
rm -rf vk-gl-cts/external/vulkan-video-samples/src
51+
cp -r vulkan-video-samples vk-gl-cts/external/vulkan-video-samples/src
52+
53+
- name: Build CTS
54+
run: |
55+
cd vk-gl-cts
56+
python3 scripts/check_build_sanity.py --skip-prerequisites -r gcc-64-release -t /tmp/cts-build
57+
58+
cts-build-windows:
59+
runs-on: windows-latest
60+
if: >
61+
contains(github.event.pull_request.title || '', '[release]') ||
62+
github.event.label.name == 'cts-build' ||
63+
contains(github.event.pull_request.labels.*.name, 'cts-build')
64+
65+
steps:
66+
- name: Checkout Vulkan-Video-Samples
67+
uses: actions/checkout@v6
68+
with:
69+
path: vulkan-video-samples
70+
71+
- name: Setup Python
72+
uses: actions/setup-python@v4
73+
with:
74+
python-version: "3.10"
75+
76+
- name: Install lxml
77+
run: pip install lxml
78+
79+
- name: Clone VK-GL-CTS
80+
run: |
81+
git clone --depth=1 https://github.com/KhronosGroup/VK-GL-CTS.git vk-gl-cts
82+
83+
- name: Fetch CTS external sources
84+
run: |
85+
cd vk-gl-cts
86+
python3 external/fetch_sources.py
87+
88+
- name: Replace vulkan-video-samples sources
89+
shell: pwsh
90+
run: |
91+
Remove-Item -Recurse -Force vk-gl-cts/external/vulkan-video-samples/src
92+
Copy-Item -Recurse vulkan-video-samples vk-gl-cts/external/vulkan-video-samples/src
93+
94+
- name: Build CTS
95+
run: |
96+
cd vk-gl-cts
97+
python3 scripts/check_build_sanity.py -r vs-64-debug

CONTRIBUTING

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,20 @@ Use this section for any extra context that doesn't fit elsewhere:
118118

119119
PR titles and bodies are automatically validated via GitHub Actions. The check will fail if required sections are missing or incorrectly formatted.
120120

121+
### CTS Build Validation
122+
123+
A CI job validates that changes compile correctly within the [VK-GL-CTS](https://github.com/KhronosGroup/VK-GL-CTS) (Vulkan Conformance Test Suite). This ensures integration compatibility before changes reach CTS upstream.
124+
125+
The CTS build runs automatically when the PR title contains `[release]`. It can also be triggered manually by adding the `cts-build` label to the pull request. The job clones VK-GL-CTS, replaces the pinned vulkan-video-samples sources with the PR code, and builds CTS on both Linux (GCC 64-bit Release) and Windows (VS 64-bit Debug).
126+
121127
---
122128

123129
## Release Process
124130

125131
1. Update `Changelog.md` with the new version entry
126132
2. Update the version in `common/include/VkVSCommon.h`
127-
3. Create a tag (e.g. `v0.4.0`) and push it — GitHub will automatically create a release
133+
3. Create a PR with `[release]: create vx.x.x` as title to trigger a CTS build
134+
4. When PR has been merged, create a tag (e.g. `v0.4.0`) on this release commit and push it — GitHub will automatically create a release
128135

129136
---
130137

0 commit comments

Comments
 (0)