This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Feature: GitHub Actions-based CI #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Windows | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-windows: | |
| name: '${{ matrix.os }} (msvc)' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - windows-2022 | |
| - windows-2025 | |
| fail-fast: false | |
| steps: | |
| - name: Runtime environment | |
| env: | |
| WORKSPACE: ${{ github.workspace }} | |
| run: | | |
| echo "$env:HOMEDRIVE$env:HOMEPATH\\.local\\bin" >> $env:GITHUB_PATH | |
| echo "$env:HOMEDRIVE$env:HOMEPATH\\.cargo\\bin" >> $env:GITHUB_PATH | |
| echo "GITHUB_WORKSPACE=$(pwd)" >> $env:GITHUB_ENV | |
| - name: Install WDK redist components | |
| run: | | |
| Invoke-WebRequest https://go.microsoft.com/fwlink/p/?LinkID=253170 -OutFile wdk-redist.msi | |
| Start-Process -FilePath msiexec -Verb Runas -Wait -ArgumentList "/i","$PWD\wdk-redist.msi","/passive","/qn","LicenseAccepted=1" | |
| working-directory: ${{ runner.temp }} | |
| - name: Checkout wdi-rs | |
| uses: actions/checkout@v5 | |
| with: | |
| lfs: true | |
| submodules: true | |
| - name: Setup Rust | |
| run: | | |
| rustup toolchain install stable-x86_64-pc-windows-msvc | |
| rustup toolchain install stable-aarch64-pc-windows-msvc | |
| rustup default stable-x86_64-pc-windows-msvc | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Version tools | |
| run: | | |
| cargo --version | |
| rustc --version | |
| cargo llvm-cov --version | |
| - name: Setup libusb0 driver dependency | |
| shell: bash | |
| run: | | |
| curl -Lo libusb-win32.zip https://github.com/mcuee/libusb-win32/releases/download/snapshot_1.4.0.1/libusb-win32-bin-1.4.0.1.zip | |
| unzip libusb-win32.zip | |
| mv libusb-win32-bin-1.4.0.1 libusb-win32 | |
| echo "LIBUSB0_DIR=${{ runner.temp }}/libusb-win32" >> $GITHUB_ENV | |
| working-directory: ${{ runner.temp }} | |
| - name: Build | |
| run: cargo b | |
| - name: Test | |
| run: cargo t | |
| - name: Collect code coverage | |
| run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json | |
| - name: Codecov | |
| if: success() && github.repository == 'blackmagic-debug/wdi-rs' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: codecov.json | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} |