Add quantized Gemma 4 GGUF support #9038
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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| name: Continuous integration | |
| env: | |
| # Incremental compilation would just be overhead, so we can disable it entirely. | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| check: | |
| name: Check | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04, windows-latest, macOS-latest, ubuntu-24.04-arm] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Remove cargo config (macOS ring crate fix) | |
| if: runner.os == 'macOS' | |
| run: rm -f .cargo/config.toml | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| key: ${{ matrix.os }} | |
| # Save only from main | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Run macos with metal | |
| if: matrix.os == 'macOS-latest' | |
| run: cargo check --workspace --all-targets --features metal | |
| - name: Run normal cpu | |
| if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest' | |
| run: cargo check --workspace --all-targets | |
| - name: Run with avx2 | |
| if: matrix.os == 'ubuntu-24.04' | |
| run: | | |
| export RUSTFLAGS="-C target-feature=avx2" | |
| cargo check --workspace --all-targets | |
| - name: Run with arm neon | |
| if: matrix.os == 'ubuntu-24.04-arm' | |
| run: | | |
| export RUSTFLAGS="-C target-feature=neon" | |
| cargo check --workspace --all-targets | |
| test: | |
| name: Test Suite | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - name: Free disk space (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo rm -rf /opt/hostedtoolcache | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/ghc | |
| df -h | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Remove cargo config (macOS ring crate fix) | |
| if: runner.os == 'macOS' | |
| run: rm -f .cargo/config.toml | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| key: ${{ matrix.os }} | |
| # Save only from main | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install lld (Linux only) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y lld | |
| - name: Run tests (with lld on Linux) | |
| if: runner.os == 'Linux' | |
| env: | |
| RUSTFLAGS: "-C link-arg=-fuse-ld=lld" | |
| run: | | |
| cargo test --workspace --lib --bins --tests | |
| cargo test --workspace --doc | |
| - name: Run tests (Windows & macOS) | |
| if: runner.os != 'Linux' | |
| run: | | |
| cargo test --workspace --lib --bins --tests | |
| cargo test --workspace --doc | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - run: cargo clippy --workspace --tests --examples --benches -- -D warnings |