feat: NVIDIA Linux accelerated OSR support #607
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: Test | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CEF_PATH: ${{ github.workspace }}/cef | |
| SCCACHE_GHA_ENABLED: "true" | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| cef_cache_key: macos-arm64 | |
| can_run_tests: true | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| cef_cache_key: windows-x64 | |
| can_run_tests: true | |
| msvc_arch: x64 | |
| - target: aarch64-pc-windows-msvc | |
| os: windows-latest | |
| cef_cache_key: windows-arm64 | |
| can_run_tests: false | |
| msvc_arch: amd64_arm64 | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| cef_cache_key: linux-x64 | |
| can_run_tests: true | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| cef_cache_key: linux-arm64 | |
| can_run_tests: false | |
| runs-on: ${{ matrix.os }} | |
| name: Test (${{ matrix.target }}) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust and CEF | |
| uses: ./.github/actions/setup-rust-cef | |
| with: | |
| target: ${{ matrix.target }} | |
| cef-cache-key: ${{ matrix.cef_cache_key }} | |
| cargo-cache-prefix: ${{ runner.os }} | |
| msvc-arch: ${{ matrix.msvc_arch }} | |
| install-linux-deps: "true" | |
| - name: Run tests (Linux/macOS) | |
| shell: bash | |
| if: matrix.can_run_tests && (runner.os == 'Linux' || runner.os == 'macOS') | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: | | |
| export LD_LIBRARY_PATH="${CEF_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | |
| export DYLD_LIBRARY_PATH="${CEF_PATH}${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" | |
| mise exec -- cargo test --workspace --all-features --target "${{ matrix.target }}" | |
| - name: Check cross target (Linux/macOS) | |
| shell: bash | |
| if: ${{ !matrix.can_run_tests && runner.os != 'Windows' }} | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: | | |
| export LD_LIBRARY_PATH="${CEF_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | |
| export DYLD_LIBRARY_PATH="${CEF_PATH}${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" | |
| mise exec -- cargo check --workspace --all-features --target "${{ matrix.target }}" | |
| - name: Run tests (Windows) | |
| shell: pwsh | |
| if: matrix.can_run_tests && runner.os == 'Windows' | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: | | |
| $env:PATH = "${{ env.CEF_PATH }};$env:PATH" | |
| mise exec -- cargo test --workspace --all-features --target "${{ matrix.target }}" | |
| - name: Check cross target (Windows) | |
| shell: pwsh | |
| if: ${{ !matrix.can_run_tests && runner.os == 'Windows' }} | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: | | |
| $env:PATH = "${{ env.CEF_PATH }};$env:PATH" | |
| mise exec -- cargo check --workspace --all-features --target "${{ matrix.target }}" | |
| clippy: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| name: macOS ARM64 | |
| cef_cache_key: macos-arm64 | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| name: Windows x64 | |
| cef_cache_key: windows-x64 | |
| msvc_arch: x64 | |
| - os: windows-latest | |
| target: aarch64-pc-windows-msvc | |
| name: Windows ARM64 | |
| cef_cache_key: windows-arm64 | |
| msvc_arch: amd64_arm64 | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| name: Linux x64 | |
| cef_cache_key: linux-x64 | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| name: Linux ARM64 | |
| cef_cache_key: linux-arm64 | |
| runs-on: ${{ matrix.os }} | |
| name: Clippy (${{ matrix.name }}) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust and CEF | |
| uses: ./.github/actions/setup-rust-cef | |
| with: | |
| target: ${{ matrix.target }} | |
| cef-cache-key: ${{ matrix.cef_cache_key }} | |
| cargo-cache-prefix: ${{ runner.os }} | |
| msvc-arch: ${{ matrix.msvc_arch }} | |
| install-clippy: "true" | |
| install-linux-deps: "true" | |
| - name: Run Clippy | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: mise exec -- cargo clippy --workspace --all-features --target ${{ matrix.target }} -- -D warnings | |
| fmt: | |
| runs-on: ubuntu-latest | |
| name: Format | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup mise toolchain | |
| uses: jdx/mise-action@v2 | |
| with: | |
| cache: true | |
| - name: Install Rustfmt component | |
| run: mise exec -- rustup component add rustfmt | |
| - name: Check formatting | |
| run: mise exec -- cargo fmt --all -- --check | |
| validate-versions: | |
| runs-on: ubuntu-latest | |
| name: Validate Versions | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup mise toolchain | |
| uses: jdx/mise-action@v2 | |
| with: | |
| cache: true | |
| - name: Validate version pins | |
| run: mise exec -- cargo xtask validate-versions |