WIP: integrate lqt voting in pcli #10429
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: | |
pull_request: | |
# Don't run Rust tests if only docs changed. | |
paths-ignore: | |
- 'docs/**' | |
# Also support ad-hoc calls for workflow. | |
workflow_call: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: buildjet-16vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: install nix | |
uses: nixbuild/nix-quick-install-action@v28 | |
- name: setup nix cache | |
uses: nix-community/cache-nix-action@v5 | |
with: | |
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }} | |
restore-prefixes-first-match: nix-${{ runner.os }}- | |
backend: buildjet | |
- name: Load rust cache | |
uses: astriaorg/buildjet-rust-cache@v2.5.1 | |
# The `rust-toolchain.toml` file dictates which version of rust to setup. | |
- name: check rust version | |
run: nix develop --command rustc --version | |
# Run `cargo check`, with a custom target dir for caching. | |
- name: run cargo check | |
run: nix develop --command just check | |
# 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 | |
# As of 2025Q1, the "features" job is the slowest in the CI suite. | |
# Consider moving to a scheduled job on main, rather than running on PRs. | |
features: | |
runs-on: buildjet-16vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: install nix | |
uses: nixbuild/nix-quick-install-action@v28 | |
- name: setup nix cache | |
uses: nix-community/cache-nix-action@v5 | |
with: | |
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }} | |
restore-prefixes-first-match: nix-${{ runner.os }}- | |
backend: buildjet | |
- name: Load rust cache | |
uses: astriaorg/buildjet-rust-cache@v2.5.1 | |
# Build each crate separately, to validate that the feature-gating is working. | |
# This is a lighter-weight version of `cargo check-all-features --workspace --release`. | |
- name: check crate features | |
run: nix develop --command ./deployments/scripts/check-crate-feature-sets | |
- name: check wasm compatibility | |
run: nix develop --command ./deployments/scripts/check-wasm-compat.sh | |
test: | |
runs-on: buildjet-16vcpu-ubuntu-2204 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: install nix | |
uses: nixbuild/nix-quick-install-action@v28 | |
- name: setup nix cache | |
uses: nix-community/cache-nix-action@v5 | |
with: | |
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }} | |
restore-prefixes-first-match: nix-${{ runner.os }}- | |
backend: buildjet | |
- name: Load rust cache | |
uses: astriaorg/buildjet-rust-cache@v2.5.1 | |
- name: Run tests with nextest | |
run: nix develop --command just test | |
env: | |
CARGO_TERM_COLOR: always |