-
Notifications
You must be signed in to change notification settings - Fork 0
695 lines (631 loc) · 24.6 KB
/
Copy pathci.yml
File metadata and controls
695 lines (631 loc) · 24.6 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
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
---
name: CI
permissions: {}
on:
pull_request:
push:
branches:
- master
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
env:
OPENCPPCOVERAGE_VERSION: '0.9.9.0'
PYTHON_VERSION: '3.14'
jobs:
setup_release:
name: Setup Release
outputs:
publish_release: ${{ steps.setup_release.outputs.publish_release }}
release_body: ${{ steps.setup_release.outputs.release_body }}
release_commit: ${{ steps.setup_release.outputs.release_commit }}
release_generate_release_notes: ${{ steps.setup_release.outputs.release_generate_release_notes }}
release_tag: ${{ steps.setup_release.outputs.release_tag }}
release_version: ${{ steps.setup_release.outputs.release_version }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Release
id: setup_release
uses: LizardByte/actions/actions/release_setup@a46850981292c4bbc0c41715f286ad95adaaaf4a # v2026.625.20301
with:
dotnet: true
github_token: ${{ secrets.GITHUB_TOKEN }}
build:
name: Build (${{ matrix.name }})
needs: setup_release
permissions:
contents: read
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux-GCC
os: ubuntu-latest
shell: bash
kind: unix
cc: gcc
cxx: g++
gcov_executable: gcov
- name: Linux-Clang
os: ubuntu-latest
shell: bash
kind: unix
cc: clang
cxx: clang++
# Clang writes LLVM coverage notes, so gcovr needs llvm-cov's gcov compatibility mode.
gcov_executable: llvm-cov gcov
- name: macOS
os: macos-latest
shell: bash
kind: unix
cc: clang
cxx: clang++
gcov_executable: gcov
- name: Windows-MinGW-UCRT64
os: windows-latest
shell: msys2 {0}
kind: msys2
cc: gcc
cxx: g++
msystem: ucrt64
toolchain: ucrt-x86_64
gcov_executable: gcov
- name: Windows-MSVC
os: windows-2022
shell: pwsh
kind: msvc
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
submodules: recursive
- name: Setup Dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
clang \
cmake \
libevdev-dev \
libinput-dev \
libsdl2-dev \
libx11-dev \
libxtst-dev \
llvm \
ninja-build \
pkg-config
kernel_modules_package="linux-modules-extra-$(uname -r)"
if apt-cache show "${kernel_modules_package}" >/dev/null 2>&1; then
sudo apt-get install -y "${kernel_modules_package}"
else
echo "::warning::${kernel_modules_package} is unavailable; relying on the runner image kernel modules."
fi
sudo tee /etc/udev/rules.d/99-libvirtualhid-ci.rules >/dev/null <<'EOF'
KERNEL=="hidraw*", ATTRS{name}=="libvirtualhid*", MODE="0666", TAG+="uaccess"
SUBSYSTEMS=="input", ATTRS{name}=="libvirtualhid*", MODE="0666", TAG+="uaccess"
EOF
sudo udevadm control --reload-rules
for module in uhid uinput; do
if ! sudo modprobe "${module}"; then
message="Unable to load ${module}; tests requiring /dev/${module}"
message="${message} will fail unless the device already exists."
echo "::warning::${message}"
fi
done
for node in /dev/uhid /dev/uinput; do
if [[ -e "${node}" ]]; then
sudo chmod a+rw "${node}"
else
echo "::error::${node} does not exist after module setup."
exit 1
fi
done
- name: Setup Dependencies macOS
if: runner.os == 'macOS'
run: |
brew install \
cmake \
ninja
- name: Setup Dependencies Windows MinGW
if: matrix.kind == 'msys2'
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
mingw-w64-${{ matrix.toolchain }}-cmake
mingw-w64-${{ matrix.toolchain }}-ninja
mingw-w64-${{ matrix.toolchain }}-toolchain
- name: Setup Dependencies Windows MSVC
if: matrix.kind == 'msvc'
run: |
choco install opencppcoverage --version=${{ env.OPENCPPCOVERAGE_VERSION }} --yes --no-progress
$openCppCoverageDir = "${env:ProgramFiles}\OpenCppCoverage"
if (!(Test-Path (Join-Path $openCppCoverageDir "OpenCppCoverage.exe"))) {
$openCppCoverageDir = "${env:ProgramFiles(x86)}\OpenCppCoverage"
}
if (!(Test-Path (Join-Path $openCppCoverageDir "OpenCppCoverage.exe"))) {
throw "OpenCppCoverage.exe was not found after Chocolatey install."
}
$openCppCoverageDir | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup python
id: setup-python
if: matrix.kind != 'msvc'
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup uv
if: matrix.kind != 'msvc'
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
- name: Sync Python tools
if: matrix.kind != 'msvc'
env:
MSYS2_PATH_TYPE: inherit
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: |
uv sync --project third-party/lizardbyte-common --locked --only-group test-c \
--no-python-downloads \
--no-install-project
- name: Configure
if: matrix.kind != 'msvc'
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.setup_release.outputs.release_version }}
CC: ${{ matrix.cc }}
COMMIT: ${{ needs.setup_release.outputs.release_commit }}
CXX: ${{ matrix.cxx }}
run: |
cmake \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=ON \
-DBUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-B cmake-build-ci \
-G Ninja \
-S .
- name: Configure MSVC
if: matrix.kind == 'msvc'
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.setup_release.outputs.release_version }}
COMMIT: ${{ needs.setup_release.outputs.release_commit }}
run: |
cmake `
-DBUILD_DOCS=OFF `
-DBUILD_EXAMPLES=ON `
-DBUILD_TESTS=ON `
-A x64 `
-B cmake-build-ci `
-G "Visual Studio 17 2022" `
-S .
- name: Build
if: matrix.kind != 'msvc'
run: cmake --build cmake-build-ci -- -j2
- name: Build MSVC
if: matrix.kind == 'msvc'
run: cmake --build cmake-build-ci --config Debug --parallel 2
- name: Configure Windows test driver package
if: >-
matrix.kind == 'msvc' &&
github.event_name == 'pull_request'
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.setup_release.outputs.release_version }}
COMMIT: ${{ needs.setup_release.outputs.release_commit }}
run: |
$certificatePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver-test\certificates\libvirtualhid-ci-test.cer"
cmake `
-DBUILD_DOCS=OFF `
-DBUILD_EXAMPLES=OFF `
-DBUILD_TESTS=OFF `
-DLIBVIRTUALHID_BUILD_WINDOWS_DRIVER=ON `
-DLIBVIRTUALHID_ENABLE_PACKAGING=OFF `
"-DLIBVIRTUALHID_DRIVER_TEST_CERTIFICATE=$certificatePath" `
-A x64 `
-B cmake-build-driver-test `
-G "Visual Studio 17 2022" `
-S .
- name: Build Windows test driver package
if: >-
matrix.kind == 'msvc' &&
github.event_name == 'pull_request'
run: cmake --build cmake-build-driver-test --config Release --target libvirtualhid_windows_catalog --parallel 2
- name: Sign Windows test driver package
if: >-
matrix.kind == 'msvc' &&
github.event_name == 'pull_request'
run: |
$packagePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver-test\src\platform\windows\driver\package\Release"
$certificatePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver-test\certificates\libvirtualhid-ci-test.cer"
.\scripts\windows\sign-driver-package.ps1 `
-PackagePath $packagePath `
-CertificatePath $certificatePath
- name: Install Windows test driver package
if: >-
matrix.kind == 'msvc' &&
github.event_name == 'pull_request'
run: |
$packagePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver-test\src\platform\windows\driver\package\Release"
$certificatePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver-test\certificates\libvirtualhid-ci-test.cer"
.\scripts\windows\install-driver.ps1 `
-InfPath (Join-Path $packagePath "libvirtualhid.inf") `
-CertificatePath $certificatePath
- name: Prepare report directory
run: cmake -E make_directory cmake-build-ci/reports
- name: Run tests
id: test
if: matrix.kind != 'msvc'
working-directory: cmake-build-ci/tests
run: ./test_libvirtualhid --gtest_color=yes --gtest_output=xml:../reports/junit.xml
- name: Run tests MSVC
id: test_msvc
if: matrix.kind == 'msvc'
run: |
$openCppCoverage = (Get-Command OpenCppCoverage.exe -ErrorAction SilentlyContinue).Source
if (!$openCppCoverage) {
$candidates = @(
"${env:ProgramFiles}\OpenCppCoverage\OpenCppCoverage.exe",
"${env:ProgramFiles(x86)}\OpenCppCoverage\OpenCppCoverage.exe"
)
$openCppCoverage = $candidates | Where-Object { Test-Path $_ } | Select-Object -First 1
}
if (!$openCppCoverage) {
throw "OpenCppCoverage.exe was not found."
}
& $openCppCoverage `
--sources "$env:GITHUB_WORKSPACE\src" `
"--export_type=cobertura:$env:GITHUB_WORKSPACE\cmake-build-ci\reports\coverage.xml" `
--working_dir "$env:GITHUB_WORKSPACE\cmake-build-ci\tests" `
-- `
"$env:GITHUB_WORKSPACE\cmake-build-ci\tests\Debug\test_libvirtualhid.exe" `
--gtest_color=yes `
"--gtest_output=xml:$env:GITHUB_WORKSPACE\cmake-build-ci\reports\junit.xml"
- name: Normalize MSVC coverage paths
if: >-
always() &&
matrix.kind == 'msvc' &&
(steps.test_msvc.outcome == 'success' || steps.test_msvc.outcome == 'failure')
run: |
$coveragePath = Join-Path $env:GITHUB_WORKSPACE "cmake-build-ci\reports\coverage.xml"
if (!(Test-Path $coveragePath)) {
return
}
[xml] $coverage = Get-Content $coveragePath
$workspace = $env:GITHUB_WORKSPACE.Replace('\', '/')
foreach ($node in $coverage.SelectNodes('//*[@filename]')) {
$filename = $node.GetAttribute('filename').Replace('\', '/')
if ($filename.StartsWith("${workspace}/")) {
$filename = $filename.Substring($workspace.Length + 1)
}
$node.SetAttribute('filename', $filename)
}
foreach ($source in $coverage.SelectNodes('//source')) {
$source.InnerText = '.'
}
$coverage.Save($coveragePath)
- name: Generate gcov report
id: test_report
if: >-
always() &&
matrix.kind != 'msvc' &&
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
working-directory: cmake-build-ci
env:
GCOV_EXECUTABLE: ${{ matrix.gcov_executable }}
MSYS2_PATH_TYPE: inherit
run: |
uv run --project ../third-party/lizardbyte-common --locked --no-sync gcovr . -r ../src \
--gcov-executable "${GCOV_EXECUTABLE}" \
--exclude-noncode-lines \
--exclude-throw-branches \
--exclude-unreachable-branches \
--verbose \
--xml-pretty \
-o reports/coverage.xml
- name: Run gamepad adapter example
if: matrix.kind != 'msvc'
run: |
if [[ "${RUNNER_OS}" == "Windows" ]]; then
./cmake-build-ci/examples/gamepad_adapter.exe
else
./cmake-build-ci/examples/gamepad_adapter
fi
- name: Run gamepad adapter example MSVC
if: matrix.kind == 'msvc'
run: .\cmake-build-ci\examples\Debug\gamepad_adapter.exe
- name: Uninstall Windows test driver package
if: >-
always() &&
matrix.kind == 'msvc' &&
github.event_name == 'pull_request'
run: |
.\scripts\windows\uninstall-driver.ps1 `
-OriginalName "libvirtualhid.inf" `
-RemoveCertificateSubject "CN=libvirtualhid CI Test Driver Signing" `
-Force
- name: Install
if: matrix.kind != 'msvc'
run: cmake --install cmake-build-ci --prefix cmake-build-ci/install
- name: Install MSVC
if: matrix.kind == 'msvc'
run: cmake --install cmake-build-ci --config Debug --prefix cmake-build-ci/install
- name: Upload install artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: install-${{ matrix.name }}
path: cmake-build-ci/install
if-no-files-found: error
- name: Upload report artifact
if: >-
always() &&
(
steps.test_report.outcome == 'success' ||
steps.test_msvc.outcome == 'success' ||
steps.test_msvc.outcome == 'failure'
)
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: reports-${{ matrix.name }}
path: cmake-build-ci/reports
if-no-files-found: error
windows_driver:
name: Windows Driver Installer
needs: setup_release
permissions:
contents: read
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
submodules: recursive
- name: Setup dotnet
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
with:
dotnet-version: '10.x'
- name: Configure Windows driver package
shell: pwsh
env:
BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ needs.setup_release.outputs.release_version }}
COMMIT: ${{ needs.setup_release.outputs.release_commit }}
run: |
$certificatePath = Join-Path $env:GITHUB_WORKSPACE "cmake-build-driver\certificates\libvirtualhid-ci-test.cer"
cmake `
-DBUILD_DOCS=OFF `
-DBUILD_EXAMPLES=OFF `
-DBUILD_TESTS=OFF `
-DLIBVIRTUALHID_BUILD_WINDOWS_DRIVER=ON `
-DLIBVIRTUALHID_ENABLE_PACKAGING=ON `
"-DLIBVIRTUALHID_DRIVER_TEST_CERTIFICATE=$certificatePath" `
-A x64 `
-B cmake-build-driver `
-G "Visual Studio 17 2022" `
-S .
- name: Build Windows driver package
shell: pwsh
run: cmake --build cmake-build-driver --config Release --target libvirtualhid_windows_catalog --parallel 2
- name: Validate Azure signing configuration
if: >-
github.event_name == 'push' &&
vars.AZURE_SIGNING_ACCOUNT == ''
shell: pwsh
run: throw "Push builds must use Azure Trusted Signing for the Windows driver package."
- name: Sign Windows driver package with local test certificate
if: github.event_name == 'pull_request'
shell: pwsh
run: |
$packagePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver\src\platform\windows\driver\package\Release"
$certificatePath = Join-Path `
$env:GITHUB_WORKSPACE `
"cmake-build-driver\certificates\libvirtualhid-ci-test.cer"
.\scripts\windows\sign-driver-package.ps1 `
-PackagePath $packagePath `
-CertificatePath $certificatePath
- name: Sign Windows driver package with Azure Trusted Signing
if: >-
github.event_name == 'push' &&
vars.AZURE_SIGNING_ACCOUNT != ''
uses: azure/trusted-signing-action@c7ab2a863ab5f9a846ddb8265964877ef296ee82 # v2.0.0
with:
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
certificate-profile-name: ${{ vars.AZURE_SIGNING_CERT_PROFILE }}
endpoint: ${{ vars.AZURE_SIGNING_ENDPOINT }}
files: |
${{ github.workspace }}/cmake-build-driver/src/platform/windows/driver/package/Release/libvirtualhid.cat
signing-account-name: ${{ vars.AZURE_SIGNING_ACCOUNT }}
- name: Package Windows driver installer
shell: pwsh
run: |
Push-Location .\cmake-build-driver
cpack -G WIX
$packageExitCode = $LASTEXITCODE
Pop-Location
if ($packageExitCode -ne 0) {
exit $packageExitCode
}
New-Item -ItemType Directory -Force -Path artifacts | Out-Null
Copy-Item `
-LiteralPath .\cmake-build-driver\cpack_artifacts\libvirtualhid.msi `
-Destination .\artifacts\libvirtualhid-Windows-Driver-installer.msi
- name: Sign Windows driver installer with Azure Trusted Signing
if: >-
github.event_name == 'push' &&
vars.AZURE_SIGNING_ACCOUNT != ''
uses: azure/trusted-signing-action@c7ab2a863ab5f9a846ddb8265964877ef296ee82 # v2.0.0
with:
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
certificate-profile-name: ${{ vars.AZURE_SIGNING_CERT_PROFILE }}
endpoint: ${{ vars.AZURE_SIGNING_ENDPOINT }}
files-folder: artifacts
files-folder-filter: msi
files-folder-recurse: false
signing-account-name: ${{ vars.AZURE_SIGNING_ACCOUNT }}
- name: Debug wix
if: always()
shell: pwsh
run: |
Get-Content .\cmake-build-driver\cpack_artifacts\_CPack_Packages\win64\WIX\wix.log `
-ErrorAction SilentlyContinue
- name: Upload Windows driver installer artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: windows-driver-installer
path: artifacts
if-no-files-found: error
codecov:
name: Codecov-${{ matrix.flag }}
if: >-
always() &&
(needs.build.result == 'success' || needs.build.result == 'failure') &&
startsWith(github.repository, 'LizardByte/')
needs: build
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- build_name: Linux-GCC
flag: Linux-GCC
has_coverage: true
- build_name: Linux-Clang
flag: Linux-Clang
has_coverage: true
- build_name: macOS
flag: macOS
has_coverage: true
- build_name: Windows-MinGW-UCRT64
flag: Windows-MinGW-UCRT64
has_coverage: true
- build_name: Windows-MSVC
flag: Windows-MSVC
has_coverage: true
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Download report artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: reports-${{ matrix.build_name }}
path: _reports
- name: Debug coverage file
if: matrix.has_coverage
run: cat _reports/coverage.xml
- name: Upload test coverage
if: matrix.has_coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
fail_ci_if_error: true
files: ./_reports/coverage.xml
report_type: coverage
flags: ${{ matrix.flag }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Upload test results
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
fail_ci_if_error: true
files: ./_reports/junit.xml
report_type: test_results
flags: ${{ matrix.flag }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
release:
name: Release
if: >-
always() &&
needs.setup_release.outputs.publish_release == 'true' &&
needs.build.result == 'success' &&
needs.windows_driver.result == 'success' &&
startsWith(github.repository, 'LizardByte/')
needs:
- build
- windows_driver
- setup_release
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Download install artifact (Linux-GCC)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: install-Linux-GCC
path: install-Linux-GCC
- name: Download install artifact (Linux-Clang)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: install-Linux-Clang
path: install-Linux-Clang
- name: Download install artifact (macOS)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: install-macOS
path: install-macOS
- name: Download install artifact (Windows-MinGW-UCRT64)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: install-Windows-MinGW-UCRT64
path: install-Windows-MinGW-UCRT64
- name: Download install artifact (Windows-MSVC)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: install-Windows-MSVC
path: install-Windows-MSVC
- name: Download Windows driver installer artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: windows-driver-installer
path: windows-driver-installer
- name: Package install artifacts
run: |
mkdir -p artifacts
for name in Linux-GCC Linux-Clang macOS Windows-MinGW-UCRT64 Windows-MSVC; do
zip -r \
"artifacts/libvirtualhid-${{ needs.setup_release.outputs.release_tag }}-${name}.zip" \
"install-${name}"
done
cp windows-driver-installer/* artifacts/
- name: Create/Update GitHub Release
if: needs.setup_release.outputs.publish_release == 'true'
uses: LizardByte/actions/actions/release_create@a46850981292c4bbc0c41715f286ad95adaaaf4a # v2026.625.20301
with:
allowUpdates: false
body: ${{ needs.setup_release.outputs.release_body }}
draft: true
generateReleaseNotes: ${{ needs.setup_release.outputs.release_generate_release_notes }}
name: ${{ needs.setup_release.outputs.release_tag }}
prerelease: true
tag: ${{ needs.setup_release.outputs.release_tag }}
token: ${{ secrets.GH_BOT_TOKEN }}
virustotal_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}