Skip to content

Fix CI (#3)

Fix CI (#3) #8

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# this is needed to gain access via OIDC to the S3 bucket for caching
permissions:
id-token: write
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Full history is required by license-check.py
fetch-depth: 0
- uses: risc0/risc0/.github/actions/rustup@4ab1f0bba1b0515819221bebc59f95aad0a6a3a9
- name: Install cargo-sort
uses: risc0/cargo-install@v1
with:
crate: cargo-sort
version: "1.0"
- run: cargo fmt --all -- --check
- run: cargo fmt --manifest-path zirgen/bootstrap/Cargo.toml -- --check
- run: cargo sort --workspace --check
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: python license-check.py
bazel:
runs-on: [self-hosted, prod, cpu, "${{ matrix.os }}"]
strategy:
fail-fast: false
matrix:
os: [Linux, macOS]
include:
- os: Linux
config: --config=ci
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/bazelisk
- name: Build & test
env:
CONFIG: ${{ matrix.config }}
run: bazelisk test //... $CONFIG
test:
runs-on: [self-hosted, prod, "${{ matrix.os }}", cpu]
strategy:
fail-fast: false
matrix:
os: [Linux, macOS]
env:
RUST_BACKTRACE: full
RISC0_BUILD_LOCKED: 1
steps:
- uses: actions/checkout@v3
with:
lfs: true
- run: git lfs pull
- uses: risc0/risc0/.github/actions/rustup@4ab1f0bba1b0515819221bebc59f95aad0a6a3a9
- uses: risc0/risc0/.github/actions/sccache@1a373c71585766e4f6985b96c48389daaf69d528
- uses: risc0/cargo-install@b9307573043522ab0d3e3be64a51763b765b52a4
with:
crate: cargo-binstall
version: "1.4"
locked: false
- run: cargo binstall -y --force cargo-risczero
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo risczero install
- run: cargo test
- run: cargo test --tests -- --ignored
- run: cargo check --benches
- run: cargo check --manifest-path zirgen/bootstrap/Cargo.toml
- run: sccache --show-stats
doc:
runs-on: [self-hosted, prod, Linux, cpu]
env:
RUST_BACKTRACE: full
RISC0_BUILD_LOCKED: 1
steps:
- uses: actions/checkout@v3
- uses: risc0/risc0/.github/actions/rustup@4ab1f0bba1b0515819221bebc59f95aad0a6a3a9
- uses: risc0/risc0/.github/actions/sccache@1a373c71585766e4f6985b96c48389daaf69d528
- run: cargo doc --no-deps --exclude=bigint-test-methods --workspace
- run: sccache --show-stats