Feat/support zkm builder #183
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: Cargo Build & Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: Rust project - latest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- nightly | |
steps: | |
- uses: actions/checkout@v2 | |
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- name: Install Dependencies | |
run: sudo apt install protobuf-compiler | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.22' | |
- name: Build Go library | |
run: | | |
chmod +x ./sdk/src/local/libsnark/compile.sh | |
./sdk/src/local/libsnark/compile.sh | |
- name: Cargo build | |
run: cargo build --verbose --release | |
- name: Cargo test | |
run: cargo test --release --verbose | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly-2024-07-20 | |
override: true | |
- run: rustup component add rustfmt | |
- run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly-2024-07-20 | |
override: true | |
- name: Install Dependencies | |
run: sudo apt install protobuf-compiler | |
- run: rustup component add clippy | |
- run: cargo clippy --all-targets -- -D warnings | |