feat: ✨ initialize BSPs and Buckets with the root of an empty trie #492
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
# Rust Tests: CI for Rust components (Blockchain & Storage Providers) | |
# | |
# Overview: | |
# 1. Prepare: This job handles the setup phase where the cargo nextest archive is created | |
# and uploaded to the workflow for use in the subsequent jobs | |
# 2. All Rust Tests: Executes the full suite of Rust tests across two partitions to | |
# to reduce total execution time. | |
name: Rust Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
prepare: | |
name: Prepare artifacts | |
runs-on: ubuntu-latest | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
CARGO_INCREMENTAL: "0" | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# By default actions/checkout checks out a merge commit. Check out the PR head instead. | |
# https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions-rust-lang/setup-rust-toolchain@v1.8 | |
with: | |
cache: false | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.4 | |
- uses: rui314/setup-mold@v1 | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Build and archive tests | |
run: cargo nextest archive --archive-file nextest-archive.tar.zst | |
- name: Upload archive to workflow | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nextest-archive | |
path: nextest-archive.tar.zst | |
all-rust-tests: | |
name: Run all tests (/w partitioning) | |
runs-on: ubuntu-latest | |
needs: prepare | |
strategy: | |
fail-fast: false | |
matrix: | |
partition: [1, 2] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Download archive | |
uses: actions/download-artifact@v4 | |
with: | |
name: nextest-archive | |
- name: Run Tests for All Projects! | |
run: | | |
~/.cargo/bin/cargo-nextest nextest run \ | |
--archive-file nextest-archive.tar.zst \ | |
--partition count:${{ matrix.partition }}/2 |