name: CI on: push: workflow_dispatch: jobs: lint: runs-on: ubuntu-latest name: Linting continue-on-error: "${{ github.ref != 'refs/heads/master' }}" steps: - name: Checkout uses: actions/checkout@v7 - name: Set up clang-format uses: egor-tensin/setup-clang@v2 with: # To use the latest clang-format features: version: 22 - name: Run clang-format uses: egor-tensin/clang-format@v1 with: version: 22 build: strategy: matrix: toolset: [vs2022, vs2026] platform: [x64] configuration: [Debug, Release] include: - {toolset: vs2022, os: windows-2022} - {toolset: vs2026, os: windows-2025} runs-on: '${{ matrix.os }}' name: 'Build: ${{ matrix.toolset }} / ${{ matrix.platform }} / ${{ matrix.configuration }}' defaults: run: shell: pwsh steps: - name: Checkout uses: actions/checkout@v7 with: submodules: recursive - name: Set up msbuild uses: microsoft/setup-msbuild@v3 - name: Install NuGet packages # As of June '26, WDK doesn't seem to be included in VS 2026 (windows-2025) images. # The recommended way is to use NuGet: https://github.com/actions/runner-images/issues/13071#issuecomment-3361203846 # How to use it: https://community.osr.com/t/announcing-the-wdk-nuget-a-new-way-to-develop-drivers-on-windows/58887/20 # Also, see Microsoft's driver samples: https://github.com/microsoft/windows-driver-samples run: nuget restore .\packages.config -PackagesDirectory .\packages\ if: matrix.toolset == 'vs2026' - name: Build user-mode code run: | New-Item -Type Directory build\cmake | Out-Null cd build\cmake cmake -A '${{ matrix.platform }}' ` '-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\build\install' ` '${{ github.workspace }}' cmake --build . --target install --config '${{ matrix.configuration }}' - name: Build kernel-mode code run: | .\km\build.ps1 ` -InstallDir build\install ` -Configuration '${{ matrix.configuration }}' ` -Platform '${{ matrix.platform }}' ` -WDK wdk10 - name: Run tests run: | .\km\test.ps1 -InstallDir build\install - name: Publish artifact uses: actions/upload-artifact@v7 with: name: 'windows7-drivers-${{ matrix.platform }}-${{ matrix.configuration }}-Win10-${{ matrix.toolset }}' path: ./build/install/ if-no-files-found: error