Skip to content

rework transaction EffectHash #6612

rework transaction EffectHash

rework transaction EffectHash #6612

Workflow file for this run

name: Rust CI
on: pull_request
jobs:
test:
name: Test Suite
runs-on: buildjet-16vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- name: Run tests with nextest
run: cargo nextest run --release
env:
CARGO_TERM_COLOR: always
fmt:
name: Rustfmt
runs-on: buildjet-16vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- run: cargo fmt --all -- --check
check:
name: Check for warnings
runs-on: buildjet-16vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- name: Run cargo check, failing on warnings
run: cargo check --release
env:
# The `-D warnings` option causes an error on warnings;
# we must duplicate the rustflags from `.cargo/config.toml`.
RUSTFLAGS: "-D warnings --cfg tokio_unstable"
docs:
# We use a custom script to generate the index page for https://rustdoc.penumbra.zone,
# and refactors to rust deps can break that generation. Let's ensure this script exits 0
# on PRs, but we'll still only deploy after merge into main.
name: Check that rustdocs build OK
runs-on: buildjet-16vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Install rust toolchain
# The script for rustdoc build requires nightly toolchain.
uses: dtolnay/rust-toolchain@nightly
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- name: Build rustdocs
run: ./deployments/scripts/rust-docs
wasm:
name: Build WASM
runs-on: buildjet-16vcpu-ubuntu-2004
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- name: build wasm32 target
run: cargo build --release --target wasm32-unknown-unknown
# TODO: consider failing on warnings here. A few dead-code
# warnings, leaving as-is because wasm is undergoing rapid dev
# in support of web extension.
working-directory: crates/wasm
# Download prebuilt binary for wasm-pack; faster than `cargo install`.
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
# `wasm-pack build` will automatically compile to target wasm32-unknown-unknown,
# but we run it as a separate task to isolate potential failures in the build pipeline.
- name: run wasm-pack build
run: wasm-pack build
working-directory: crates/wasm
# Always show the results of `cargo tree`, even if the tests failed, since that
# output will be immediately useful in debugging.
- name: display mio deps
run: cargo tree --invert mio --edges features
if: always()