The CMake workflow has two layers:
- GitHub-hosted runners build the test app, build the driver targets for the architectures supported by each selected toolset, test-sign the drivers, and upload artifacts.
- When
workflow_dispatchis run withrun_driver_load_tests=true, a prepared self-hosted Windows runner downloads those artifacts, loads the signed driver, and runs the x64 test app.
This split keeps the build reproducible on GitHub-hosted runners while keeping kernel driver loading on a machine that was explicitly configured for it.
Prepare a Windows x64 machine or VM with:
- GitHub Actions self-hosted runner registered to this repository.
- Runner labels:
self-hosted,windows,x64,crtsys-driver-test. - The runner process running elevated, or installed as a service account that can create and start kernel driver services.
- Test signing enabled before boot.
- Secure Boot disabled when it prevents enabling test signing.
The self-hosted runner does not need Visual Studio, CMake, or the WDK for the load-test job. The workflow downloads the already-built artifacts from the same run.
The load-test job is x64 because kernel drivers must match the test machine's kernel architecture. Testing ARM or ARM64 drivers requires matching Windows ARM or ARM64 self-hosted runners and matching test app pipelines. Testing x86 drivers requires a 32-bit Windows test machine; x86 kernel drivers cannot be loaded on x64 Windows.
Run these commands from an elevated PowerShell prompt on the runner machine:
bcdedit /set testsigning onReboot the machine, then verify:
bcdedit /enum '{current}'The output should contain testsigning Yes or testsigning on.
Create a new self-hosted runner in GitHub:
Repository -> Settings -> Actions -> Runners -> New self-hosted runner
Use the GitHub-provided commands for Windows. When configuring the runner, add the custom label:
.\config.cmd --url https://github.com/ntoskrnl7/crtsys --token <token> --labels crtsys-driver-testInstall it as a service if you want it to survive reboots:
.\svc install
.\svc startConfirm the runner appears online in GitHub before triggering the load test.
Open the CMake workflow in GitHub Actions, select Run workflow, and set:
run_driver_load_tests = true
The workflow will:
- Run a preflight check for an online runner with the required labels.
- Build and upload
crtsys-test-driver-x64. - Build and upload
crtsys-test-driver-ARMwhen the selected workflow matrix includes that toolset/architecture pair. - Build and upload
crtsys-test-driver-ARM64. - Build and upload
crtsys-test-app-x64. - Download those artifacts on the self-hosted runner.
- Create a temporary
CrtSysTestkernel service. - Start the driver, run
crtsys_test_app.exe, then stop and delete the service.
If the test fails before loading the driver, check that the runner is elevated
and that bcdedit /enum '{current}' reports test signing enabled.