Skip to content

Web3review

Web3review #61

Workflow file for this run

name: Check Set-Up & Build
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Install linux dependencies
run: sudo apt-get update && sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup target add wasm32-unknown-unknown
cargo install cargo-binstall
cargo binstall cargo-risczero -y
cargo risczero install
rustup component add rustfmt
rustup component add clippy
- name: Run tests (with coverage)
run: |
rustup install stable
cargo install cargo-tarpaulin
RUST_BACKTRACE=1 RISC0_DEV_MODE=true cargo +stable build --release
RISC0_SKIP_BUILD=1 RISC0_DEV_MODE=true cargo +stable test
RISC0_SKIP_BUILD=1 RISC0_DEV_MODE=true cargo +stable tarpaulin --verbose --all-features --workspace --timeout 600 --out xml
- name: Run tests in guest module
run: |
(cd methods/guest &&
RUST_BACKTRACE=1 RISC0_DEV_MODE=true cargo test --features debug_mode -- --nocapture)
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run fmt
run: cargo fmt --all -- --check
- name: Run clippy
run: |
RISC0_SKIP_BUILD=true cargo clippy --all-targets
- name: Check Build
run: |
SKIP_WASM_BUILD=1 cargo check --release