Skip to content

Add fixes for feedback from Gnosis #25

Add fixes for feedback from Gnosis

Add fixes for feedback from Gnosis #25

Workflow file for this run

name: Rust
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build-mips:
uses: ./.github/workflows/mips.yml
secrets: inherit
test:
runs-on: ubuntu-latest
needs: build-mips
steps:
- name: Checkout Source
uses: actions/checkout@v3
with:
lfs: true
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install development tools
uses: taiki-e/[email protected]
with:
tool: cargo-nextest,just
- name: Install `rust` toolchain
run: |
rustup toolchain install nightly-2023-05-03 --no-self-update --profile minimal
rustup default nightly-2023-05-03
- name: Setup protoc
uses: arduino/[email protected]
- name: Download consensus-spec-tests
run: just download-integration-tests
- name: Build the zipline tests (slow)
run: just cache-zipline-tests
- uses: actions/download-artifact@v3 # download the cached binary
with:
name: spec_test_out.bin
path: zipline-state-transition-mips/build/
- uses: actions/download-artifact@v3 # download the cached binary
with:
name: mainnet_out.bin
path: zipline-state-transition-mips/build/
- uses: actions-rs/cargo@v1
with:
command: test
args: --release -p crypto -p preimage-oracle -p zipline-finality-client -p zipline-spec -p cannon-emulator
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup protoc
uses: arduino/[email protected]
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all
lints:
name: clippy and fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-03
override: true
components: clippy,rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings