Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ env:

jobs:
test:
name: Test on ${{ matrix.os }}
name: Test (${{ matrix.os }}, minimal=${{ matrix.minimal }})

@theHamsta theHamsta May 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made separate tags to have on env with and one without protoc (needing protoc in CI env is a pitfall for someone trying to use webnn-graph)

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
minimal: [true, false]
env:
CARGO_FLAGS: ${{ matrix.minimal && '--no-default-features' || '' }}

steps:
- name: Checkout code
Expand All @@ -29,42 +32,42 @@ jobs:
components: rustfmt, clippy

- name: Install protoc (Linux)
if: runner.os == 'Linux'
if: ${{ runner.os == 'Linux' && !matrix.minimal }}
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler

- name: Install protoc (macOS)
if: runner.os == 'macOS'
if: ${{ runner.os == 'macOS' && !matrix.minimal }}
run: brew install protobuf

- name: Install protoc (Windows)
if: runner.os == 'Windows'
if: ${{ runner.os == 'Windows' && !matrix.minimal }}
run: choco install protoc

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ matrix.minimal }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
${{ runner.os }}-${{ matrix.minimal }}-cargo-registry-

- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ matrix.minimal }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
${{ runner.os }}-${{ matrix.minimal }}-cargo-git-

- name: Cache target directory
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-${{ matrix.minimal }}-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-target-
${{ runner.os }}-${{ matrix.minimal }}-target-

# Cache the ResNet-50 ONNX model separately so it survives Cargo.lock churn
# and is not evicted as collateral damage when the target/ cache is invalidated.
Expand Down
Loading
Loading