feature gate hotshot trait impls #4285
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: Test | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
tags: | |
# YYYYMMDD | |
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*" | |
schedule: | |
- cron: "0 0 * * 1" | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUST_LOG: info,libp2p=off,node=error | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-test-artifacts: | |
name: Build test artifacts | |
runs-on: buildjet-8vcpu-ubuntu-2204 | |
steps: | |
- uses: rui314/setup-mold@v1 | |
- uses: actions/checkout@v4 | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-all-crates: true | |
cache-provider: buildjet | |
- name: Build and archive tests | |
run: cargo nextest archive --locked --workspace --all-features --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 | |
build-test-bins: | |
name: Build test binaries | |
runs-on: buildjet-8vcpu-ubuntu-2204 | |
steps: | |
- uses: rui314/setup-mold@v1 | |
- uses: actions/checkout@v4 | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
with: | |
cache-all-crates: true | |
cache-provider: buildjet | |
- name: Build Bins | |
run: cargo build --locked --profile test --bins | |
timeout-minutes: 30 | |
- name: Upload archive to workflow | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-binaries | |
path: | | |
target/debug/orchestrator | |
target/debug/cdn-broker | |
target/debug/cdn-marshal | |
target/debug/cdn-whitelist | |
target/debug/state-relay-server | |
target/debug/state-prover | |
target/debug/sequencer | |
target/debug/cli | |
target/debug/submit-transactions | |
target/debug/reset-storage | |
target/debug/utils | |
target/debug/deploy | |
target/debug/keygen | |
target/debug/permissionless-builder | |
target/debug/nasty-client | |
target/debug/espresso-dev-node | |
target/debug/pub-key | |
target/debug/espresso-bridge | |
target/debug/marketplace-solver | |
target/debug/marketplace-builder | |
target/debug/node-metrics | |
target/debug/dev-rollup | |
test: | |
needs: build-test-artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- uses: actions/checkout@v4 | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Download archive | |
uses: actions/download-artifact@v4 | |
with: | |
name: nextest-archive | |
- name: Test | |
run: | | |
cargo nextest run --archive-file nextest-archive.tar.zst --verbose --no-fail-fast \ | |
--workspace-remap $PWD | |
timeout-minutes: 20 | |
test-integration: | |
needs: [build-test-artifacts, build-test-bins] | |
strategy: | |
matrix: | |
version: [02,03] | |
include: | |
- version: 02 | |
compose: "-f process-compose.yaml -D" | |
- version: 03 | |
compose: "-f process-compose.yaml -f process-compose-mp.yml -D" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- name: Configure PATH | |
run: PATH="$PWD/target/debug:$PATH" | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@nextest | |
- name: Download archive | |
uses: actions/download-artifact@v4 | |
- name: Move files | |
run: | | |
mv nextest-archive/* . | |
mkdir -p target/debug | |
mv test-binaries/* target/debug | |
chmod -c +x target/debug/* | |
- name: Install process-compose | |
run: nix profile install nixpkgs#process-compose | |
- name: Pull Docker Images | |
run: docker compose pull || docker-compose pull | |
- name: Run Demo-Native ${{matrix.version}} | |
run: bash -x scripts/demo-native ${{matrix.compose}} | |
- name: Test Integration | |
env: | |
NEXTEST_PROFILE: integration | |
INTEGRATION_TEST_SEQUENCER_VERSION: ${{ matrix.version }} | |
run: | | |
cargo nextest run --archive-file nextest-archive.tar.zst --verbose --no-fail-fast \ | |
--workspace-remap $PWD $(if [ "${{ matrix.version }}" == "2" ]; then echo " smoke"; fi) | |
timeout-minutes: 40 | |
- name: Process Compose Down | |
run: process-compose down | |
demo-native: | |
needs: build-test-bins | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Nix | |
uses: cachix/install-nix-action@v30 | |
- uses: actions/checkout@v4 | |
- name: Download archive | |
uses: actions/download-artifact@v4 | |
with: | |
name: test-binaries | |
path: target/debug | |
- name: chmod +x | |
run: chmod -c +x target/debug/* | |
- name: Install process-compose | |
run: nix profile install nixpkgs#process-compose | |
- name: Test Demo | |
run: | | |
export PATH="$PWD/target/debug:$PATH" | |
set -o pipefail | |
scripts/demo-native --tui=false & | |
timeout -v 600 scripts/smoke-test-demo | sed -e 's/^/smoke-test: /;' | |
- name: Process Compose Down | |
run: process-compose down |