fix ci #219
Workflow file for this run
This file contains 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 checks | |
on: [pull_request, push] | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }} with ${{ matrix.feature_set }} features | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
override: false | |
- name: Install font kit dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
# https://crates.io/crates/font-kit | |
sudo apt install pkg-config libfreetype6-dev libfontconfig1-dev | |
- name: Run tests with basic features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose --release --workspace --no-default-features --features batch,dev-graph,gadget-traces,circuit-params | |
- name: Get all features | |
id: get-features | |
shell: bash | |
run: | | |
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then | |
echo "features=--all-features" >> $GITHUB_OUTPUT | |
else | |
# Get all features except 'asm' and format them for cargo | |
FEATURES=$(cargo metadata --format-version 1 | \ | |
jq -r '.packages[] | select(.name == "halo2-axiom") | .features | keys - ["asm"] | join(",")') | |
echo "features=--features ${FEATURES}" >> $GITHUB_OUTPUT | |
fi | |
- name: Run tests with all features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --verbose --release --workspace --no-default-features ${{ steps.get-features.outputs.features }} | |
build: | |
name: Build target ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- wasm32-wasi | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
override: false | |
- name: Add target | |
run: rustup target add ${{ matrix.target }} | |
- name: cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --no-default-features --features batch,circuit-params --target ${{ matrix.target }} | |
example: | |
name: Examples on ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
override: false | |
- name: Run examples | |
run: | | |
cargo run --example serialization | |
cargo run --example shuffle | |
fmt: | |
name: Rustfmt | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
override: false | |
- run: rustup component add rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check |