This repository was archived by the owner on Aug 17, 2026. It is now read-only.
ci(main): use sccache instead of rust-cache #642
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Toolchain | |
| run: | | |
| rustup update stable && rustup default stable | |
| rustup target add wasm32-unknown-unknown | |
| - uses: taiki-e/install-action@sccache | |
| - uses: taiki-e/install-action@nextest | |
| - uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Build Examples | |
| run: cargo build --examples --target wasm32-unknown-unknown --release | |
| - name: Build and Install zint-cli | |
| run: | | |
| cargo build --release -p zint-cli | |
| cargo install --path zint/cli | |
| - name: Run Tests | |
| run: cargo nextest run --workspace --no-fail-fast --release | |
| - name: Run Example Tests | |
| run: cargo nextest run --workspace --no-fail-fast --release --examples | |
| - name: Test Elko Addition Example | |
| run: | | |
| cargo run -p elko -- new addition | |
| cd addition | |
| cargo run -p elko --manifest-path ../Cargo.toml -- build | |
| cargo test | |
| - name: Test Foundry Integration | |
| run: | | |
| cd zint/storage | |
| forge build | |
| cargo zint new | |
| cargo zint run | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Format | |
| run: cargo fmt --check | |
| - name: Clippy | |
| run: cargo clippy --all -- -D warnings |