Skip to content
Closed
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
31 changes: 28 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ on:
jobs:
# Rust tests
rust-test:
name: Rust Tests
runs-on: ubuntu-latest
name: Rust Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
env:
RUSTFLAGS: -D warnings
steps:
Expand All @@ -23,16 +27,24 @@ jobs:
uses: dtolnay/rust-toolchain@1.96.0

- name: Install Rust formatting toolchain
if: runner.os == 'Linux'
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Install protobuf compiler
- name: Install protobuf compiler (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
protoc --version

- name: Install protobuf compiler (macOS)
if: runner.os == 'macOS'
run: |
brew install protobuf
protoc --version

- name: Cache cargo registry
uses: actions/cache@v4
with:
Expand All @@ -55,6 +67,7 @@ jobs:
run: cargo +1.95.0 fetch --locked

- name: Run cargo fmt check
if: runner.os == 'Linux'
run: cargo +stable fmt --all -- --check

- name: Run cargo check
Expand All @@ -67,19 +80,31 @@ jobs:
run: cargo +1.95.0 check --no-default-features --features onnx-runtime

- name: Run cargo check (TensorRT)
if: runner.os == 'Linux'
run: cargo +1.95.0 check -F trtx-runtime

- name: Run cargo check (LiteRT)
if: runner.os == 'Linux'
run: cargo +1.95.0 check --features litert-runtime

- name: Run cargo check (CoreML)
if: runner.os == 'macOS'
run: cargo +1.95.0 check --features coreml-runtime

- name: Run cargo test (library only)
run: cargo +1.96.0 test --lib

- name: Run cargo test (library only, CoreML)
if: runner.os == 'macOS'
run: cargo +1.96.0 test --lib --features coreml-runtime

- name: Check backend operator report is up to date
if: runner.os == 'Linux'
run: |
python3 scripts/generate_backend_operator_report.py --check

- name: Run backend operator report parser tests
if: runner.os == 'Linux'
run: |
python3 -m unittest scripts/test_generate_backend_operator_report.py

Expand Down
Loading