Lock rust nightly versions #18
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: Rust | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
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 | |
- 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 | |
- 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: 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 |