Skip to content

ci: add container build workflow for fork #58

ci: add container build workflow for fork

ci: add container build workflow for fork #58

Workflow file for this run

---
# Rust-specific CI tasks, mostly adapted from Penumbra monorepo.
name: Rust CI
on: pull_request
jobs:
test:
name: Test Suite
runs-on: buildjet-16vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Load rust cache
uses: astriaorg/buildjet-rust-cache@v2.5.1
- name: Run cargo check, failing on warnings
run: cargo check --release --all-targets
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"
# If a dependency was modified, Cargo.lock may flap if not committed.
- name: Check for diffs
shell: bash
run: |
s="$(git status --porcelain)"
if [[ -n "$s" ]]; then
echo "ERROR: found modified files that should be committed:"
echo "$s"
git diff | head -n 128
exit 1
else
echo "OK: no uncommitted changes detected"
fi
# We run only the 'ibc-relayer' tests, because that's where the
# Penumbra-specific changes have been added.
- name: Run tests with nextest
run: cargo nextest run --release -p ibc-relayer
env:
CARGO_TERM_COLOR: always
fmt:
name: Rustfmt
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- 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