-
Notifications
You must be signed in to change notification settings - Fork 1.6k
500 lines (489 loc) · 18.7 KB
/
ci.yml
File metadata and controls
500 lines (489 loc) · 18.7 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
name: CI
on:
push:
branches:
- v1.x
- ci-test
pull_request:
branches:
- v1.x
defaults:
run:
shell: bash
jobs:
commit-msg:
name: Commit message check
runs-on: ubuntu-22.04
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Check commit messages (PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
git log --oneline > a
grep -v 7a064ae a > b
head -n 100 b > c
tail -n +2 c > commits
echo "Checking last 100 commits:"
cat commits
cut -d ' ' -f2- commits > commit_msgs
echo ==================
if grep -q '.\{73\}' commit_msgs; then
(echo -n "::error::";
echo "Some commit message summary lines are too long. See CONTRIBUTING.md for more information.";
echo "Invalid commits:";
echo;
grep '.\{73\}' commit_msgs;) | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
exit 1;
fi
- name: Check commit messages (Push)
if: ${{ github.event_name == 'push' }}
run: |
git log --oneline > a
grep -v 7a064ae a > b
head -n 100 b > c
cp c commits
echo "Checking last 100 commits:"
cat commits
cut -d ' ' -f2- commits > commit_msgs
echo ==================
if grep -q '.\{73\}' commit_msgs; then
(echo -n "::error::";
echo "Some commit message summary lines are too long. See CONTRIBUTING.md for more information.";
echo "Invalid commits:";
echo;
grep -q '.\{73\}' commit_msgs;) | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
exit 1;
fi
clang-format:
name: Code formatting check
runs-on: ubuntu-22.04
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Run clang-format
run: |
bash ./util/clang_format_all.sh
git clean -f
- name: Check formatting
run: |
git diff --quiet || (
(echo -n "::error::";
echo "clang-format issues were found. See CONTRIBUTING.md for more information.";
echo;
git diff;) | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
exit 1;
)
cmake-minimum:
name: Baseline cmake check
needs: [commit-msg, clang-format]
runs-on: ubuntu-22.04
env:
QT_SELECT: qt5
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Download minimum supported cmake version
run: |
pushd /tmp
wget https://cmake.org/files/v2.8/cmake-2.8.12.2-Linux-i386.tar.gz
tar -zxvf cmake-2.8.12.2-Linux-i386.tar.gz
popd
- name: Install compilation dependencies
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev mesa-common-dev libgl1-mesa-dev qtbase5-dev libxcb-keysyms1-dev
- name: Configure renderdoc with cmake
run: |
mkdir build
cd build
/tmp/cmake-2.8.12.2-Linux-i386/bin/cmake -DCMAKE_BUILD_TYPE=Debug ..
windows:
name: Windows
needs: [commit-msg, clang-format]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [ VS2015 x86 Development, VS2015 x64 Development, VS2015 x64 Release, VS2022 x64 Development, VS2022 x64 Release ]
include:
- name: VS2015 x86 Development
os: windows-2025
compiler: VS2015
toolset: v140
platform: x86
configuration: Development
- name: VS2015 x64 Development
os: windows-2025
compiler: VS2015
toolset: v140
platform: x64
configuration: Development
- name: VS2015 x64 Release
os: windows-2025
compiler: VS2015
toolset: v140
platform: x64
configuration: Release
- name: VS2022 x64 Development
os: windows-2025
compiler: VS2022
toolset: v143
platform: x64
configuration: Development
- name: VS2022 x64 Release
os: windows-2025
compiler: VS2015
toolset: v143
platform: x64
configuration: Release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Install VSSetup
run: Install-Module VSSetup -Scope CurrentUser
shell: powershell
- name: Show installed toolsets
run: |
echo "--- All:"
Get-VSSetupInstance -All
echo "--- VC140:"
Get-VSSetupInstance -All | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.140
shell: powershell
# try powershell command from https://github.com/actions/runner-images/issues/9873#issuecomment-2139288682
- if: matrix.toolset == 'v140'
name: Install VC.140 components
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.140"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
shell: powershell
- if: matrix.toolset == 'v140'
name: Show installed toolsets
run: |
echo "--- All:"
Get-VSSetupInstance -All
echo "--- VC140:"
Get-VSSetupInstance -All | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.140
shell: powershell
# # try install-vs-components python script
# - if: matrix.toolset == 'v140'
# name: Install missing Visual Studio components
# run: python .github/workflows/install-vs-components.py
#
# - if: matrix.toolset == 'v140'
# name: Show installed toolsets
# run: |
# echo "--- All:"
# Get-VSSetupInstance -All
# echo "--- VC140:"
# Get-VSSetupInstance -All | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.140
# shell: powershell
#
# # try command from https://github.com/actions/runner-images/issues/9873#issuecomment-2833115951
# - if: matrix.toolset == 'v140'
# name: Install missing Visual Studio components
# run: |
# Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
# $VsInstallPath = vswhere.exe -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
# [string]$ComponentsToAdd = @(
# "Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL"
# "Microsoft.VisualStudio.Component.VC.140"
# ) | ForEach-Object {"--add $_"}
# $ArgumentList = ('modify', '--installPath', "`"$VsInstallPath`"", $ComponentsToAdd, '--quiet', '--norestart', '--nocache')
# echo "vs_installer.exe $($ArgumentList -join ' ')"
# # should be run twice for some reason
# Start-Process -FilePath vs_installer.exe -ArgumentList $ArgumentList -Wait -PassThru -WindowStyle Hidden
# Start-Process -FilePath vs_installer.exe -ArgumentList $ArgumentList -Wait -PassThru -WindowStyle Hidden
# shell: powershell
#
# - if: matrix.toolset == 'v140'
# name: Show installed toolsets
# run: |
# echo "--- All:"
# Get-VSSetupInstance -All
# echo "--- VC140:"
# Get-VSSetupInstance -All | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.140
# shell: powershell
#
# # try winget
# - if: matrix.toolset == 'v140'
# name: Show installed toolsets
# run: winget install --accept-package-agreements --accept-source-agreements Microsoft.BuildTools2015
#
# - if: matrix.toolset == 'v140'
# name: Show installed toolsets
# run: |
# echo "--- All:"
# Get-VSSetupInstance -All
# echo "--- VC140:"
# Get-VSSetupInstance -All | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.140
# shell: powershell
#
# # try chocolatey
# - if: matrix.toolset == 'v140'
# name: Show installed toolsets
# run: choco install visualcppbuildtools
#
# - if: matrix.toolset == 'v140'
# name: Show installed toolsets
# run: |
# echo "--- All:"
# Get-VSSetupInstance -All
# echo "--- VC140:"
# Get-VSSetupInstance -All | Select-VSSetupInstance -Latest -Require Microsoft.VisualStudio.Component.VC.140
# shell: powershell
- name: Download optional 3rdparty extras
run: |
curl https://renderdoc.org/qrenderdoc_3rdparty.zip -O
7z x qrenderdoc_3rdparty.zip
- name: Set up Visual Studio tools
uses: microsoft/setup-msbuild@v2
- name: Building solution
run: msbuild.exe renderdoc.sln "/m" "/p:Configuration=${{ matrix.configuration }}" "/p:Platform=${{ matrix.platform }}" "/p:PlatformToolset=${{ matrix.toolset }}"
shell: powershell
- if: matrix.configuration == 'Development'
name: Running core unit tests
run: |
if ! ./*/Development/renderdoccmd.exe test unit -o test.log; then
echo "::error::$(cat test.log)" | tr -d '\r' | tr '\n' '\001' | sed -e 's#\x01#%0D%0A#g';
exit 1;
fi
- if: matrix.configuration == 'Development'
name: Running UI unit tests
run: |
if ! ./*/Development/qrenderdoc.exe --unittest log=test.log; then
echo "::error::$(cat test.log)" | tr -d '\r' | tr '\n' '\001' | sed -e 's#\x01#%0D%0A#g';
exit 1;
fi
docs:
name: Documentation Build
needs: [commit-msg, clang-format]
runs-on: ubuntu-22.04
env:
QT_SELECT: qt5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Install compilation dependencies
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev mesa-common-dev libgl1-mesa-dev qtbase5-dev libxcb-keysyms1-dev
- name: Install sphinx dependencies
run: sudo pip3 install Sphinx
- name: Build cut-down renderdoc for python modules
run: |
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_GL=OFF -DENABLE_GLES=OFF -DENABLE_VULKAN=OFF -DENABLE_RENDERDOCCMD=OFF -DENABLE_QRENDERDOC=OFF ..
make -j2
popd
- name: Build documentation
run: |
cd docs
make html SPHINXOPTS=-W
python3 verify-docstrings.py
linux:
name: Linux
needs: [commit-msg, clang-format]
runs-on: ubuntu-22.04
env:
QT_SELECT: qt5
strategy:
fail-fast: false
matrix:
name: [ GCC 5 Development, Clang 3.8 Development, Clang 3.8 Release, Clang 12 Development ]
include:
- name: GCC 5 Development
cc: gcc-5
cxx: g++-5
type: Debug
- name: Clang 3.8 Development
cc: clang-3.8
cxx: clang++-3.8
type: Debug
- name: Clang 3.8 Release
cc: clang-3.8
cxx: clang++-3.8
type: Release
- name: Clang 12 Development
cc: clang-12
cxx: clang++-12
type: Debug
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Add LLVM apt repository
run: |
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.8 main'
sudo apt-get update
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/universe/i/isl-0.18/libisl15_0.18-4_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/cpp-5_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/gcc-5_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-5/g++-5_5.4.0-6ubuntu1~16.04.12_amd64.deb
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb
sudo apt install ./*.deb
- name: Install compilation dependencies
run: |
sudo apt-get install -y libx11-dev mesa-common-dev libgl1-mesa-dev qtbase5-dev libqt5svg5-dev libqt5x11extras5-dev libxcb-keysyms1-dev libx11-xcb-dev clang-3.8 g++-5 clang-12
- name: Build
run: |
mkdir build
pushd build
CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} ..
make -j2
popd
- if: matrix.type == 'Debug'
name: Run core unit tests
run: |
if ! ./build/bin/renderdoccmd test unit -o test.log; then
echo "::error::$(cat test.log)" | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
exit 1;
fi
- if: matrix.type == 'Debug'
name: Run UI unit tests
run: |
if ! ./build/bin/qrenderdoc --unittest log=test.log; then
echo "::error::$(cat test.log)" | tr '\n' '\001' | sed -e 's#\x01#%0A#g';
exit 1;
fi
android:
name: Android
needs: [commit-msg, clang-format]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
- name: Install Android SDK 3859397 and NDK r14b
run: |
sudo apt-get update
sudo apt-get install -y libncurses5
export ARCH=`uname -m`
wget -q http://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
wget -q http://dl.google.com/android/repository/android-ndk-r14b-linux-${ARCH}.zip
unzip -u -q android-ndk-r14b-linux-${ARCH}.zip -d $GITHUB_WORKSPACE
unzip -u -q sdk-tools-linux-3859397.zip -d $GITHUB_WORKSPACE
echo "ANDROID_NDK=$GITHUB_WORKSPACE/android-ndk-r14b" >> $GITHUB_ENV
echo "ANDROID_HOME=$GITHUB_WORKSPACE/" >> $GITHUB_ENV
# Answer "yes" to any license acceptance requests
pushd $GITHUB_WORKSPACE/tools/bin
(yes 2>/dev/null | ./sdkmanager --sdk_root=$GITHUB_WORKSPACE "build-tools;26.0.1" "platforms;android-23") || echo
popd
sudo rm -rf /usr/local/lib/android
- name: Build
run: |
mkdir build-android-arm32
pushd build-android-arm32
cmake -DBUILD_ANDROID=On -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=23 ..
make -j2
popd
macOS:
name: Mac
needs: [commit-msg, clang-format]
runs-on: macos-14
strategy:
fail-fast: false
matrix:
name: [ Development, Release ]
include:
- name: Development
type: Debug
- name: Release
type: Release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Install Homebrew dependencies
run: |
sudo rm /usr/local/bin/2to3-3.* || true
sudo rm /usr/local/bin/idle3.* || true
sudo rm /usr/local/bin/pydoc3.* || true
sudo rm /usr/local/bin/python3.* || true
sudo rm /usr/local/bin/2to3 || true
sudo rm /usr/local/bin/idle3 || true
sudo rm /usr/local/bin/pydoc3 || true
sudo rm /usr/local/bin/python3 || true
sudo rm /usr/local/bin/python3-config || true
brew update || true
brew unlink python || true
brew link --overwrite --force python || true
brew unlink python@3.12 || true
brew link --overwrite --force python@3.12 || true
brew install --overwrite lftp automake pcre qt@5
brew link --overwrite --force qt@5
- name: Build
run: |
mkdir build
pushd build
cmake -DENABLE_METAL=On -DCMAKE_BUILD_TYPE=${{ matrix.type }} ..
make -j2
popd
- if: matrix.type == 'Debug'
name: Run core unit tests
run: |
if ! ./build/bin/renderdoccmd test unit -o test.log; then
echo "::error::$(cat test.log)" | tr '\n' '\001' | sed -e $'s#\x01#%0A#g';
exit 1;
fi
- if: matrix.type == 'Debug'
name: Run UI unit tests
run: |
if ! ./build/bin/qrenderdoc.app/Contents/MacOS/qrenderdoc --unittest log=test.log; then
echo "::error::$(cat test.log)" | tr '\n' '\001' | sed -e $'s#\x01#%0A#g';
exit 1;
fi
- if: matrix.type == 'Release' && github.event_name == 'push'
name: Preparing for deploy
run: ./util/buildscripts/scripts/prepare_deps_macos.sh ./build/bin/qrenderdoc.app/Contents/MacOS/qrenderdoc
- if: matrix.type == 'Release' && github.event_name == 'push'
name: Packaging artifacts for nightly build
run: |
FNAME="RenderDoc_macOS_"`git rev-parse HEAD`.zip
zip -r "${FNAME}" build/bin
ls -lh "${FNAME}"
echo "FNAME=$FNAME" >> $GITHUB_ENV
- if: matrix.type == 'Release' && github.event_name == 'push'
name: Uploading artifacts for nightly build
env:
UPLOADLOCATION: ${{ secrets.MacUploadLocation }}
run: |
echo '|1|if7jyhkGD/xNbs/bfYSZ4zcgIoo=|gjhyr71exVKt7rNtMly68VccvLk= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPhCdt25vFMUQ63wTBxKLCZY1Ax+F9Y+SSusjuG6b4xtdVQ1lo3FqHnyLtsvYja0R0RiwTEob6TDrr/j7rjR96M=' >> $HOME/.ssh/known_hosts
ls -lR $HOME/.ssh
cat $HOME/.ssh/known_hosts
if [ ! -z "${UPLOADLOCATION}" ]; then lftp sftp://"${UPLOADLOCATION}" -e "cd upload; put ${FNAME}; bye"; fi