Skip to content

Add version field do JsonExport #19060

Add version field do JsonExport

Add version field do JsonExport #19060

Workflow file for this run

name: PR tests
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- main
# cancel any previous running workflows for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always
POWDR_OPENVM_SEGMENT_DELTA: 50000
jobs:
build_cpu:
runs-on: warp-ubuntu-2404-x64-8x
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: ⚡ Restore rust cache
id: cache
uses: WarpBuilds/cache/restore@v1
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
Cargo.lock
key: ${{ runner.os }}-cargo-pr-tests
- name: Date of the restored cache
run: cat target/cache-build-date.txt
continue-on-error: true
- name: Check out cache commit state and update mtime accordingly.
run: git checkout "$(cat target/cache-commit-hash.txt || echo 'f02fd626e2bb9e46a22ea1cda96b4feb5c6bda43')" && git ls-files -z | xargs -0 -n1 touch -d "Fri, 18 Apr 2025 03:30:58 +0000" && git checkout HEAD@{1}
##### The block below is shared between cache build and PR build workflows #####
- name: Install Rust toolchain nightly-2025-10-01 (with clippy and rustfmt)
run: rustup toolchain install nightly-2025-10-01 --component clippy,rustfmt
- name: Install Rust toolchain 1.90 (stable)
run: rustup toolchain install 1.90
- name: Set cargo to perform shallow clones
run: echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
- name: Format
run: cargo fmt --all --check --verbose
- name: Cargo check with Rust 1.90 (default features)
run: cargo +1.90 check --all-targets
- name: Lint no default features
run: cargo clippy --all --all-targets --features metrics --profile pr-tests --verbose -- -D warnings
- name: Build (CPU)
run: cargo build --all-targets --features metrics --all --profile pr-tests --verbose
###############################################################################
- uses: taiki-e/install-action@nextest
- name: Create tests archive (CPU)
run: cargo nextest archive --archive-file tests_cpu.tar.zst --cargo-profile pr-tests --workspace --no-default-features
- name: Upload build artifacts (CPU)
uses: actions/upload-artifact@v4
with:
name: tests_archive_cpu
path: |
tests_cpu.tar.zst
test_quick_cpu:
needs: build_cpu
runs-on: ubuntu-24.04
strategy:
matrix:
test:
- "1"
- "2"
- "3"
- "4"
- "5"
- "6"
- "7"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Init testing instance
uses: ./.github/actions/init-testing-instance
- name: Run default tests
run: cargo nextest run --archive-file tests_cpu.tar.zst --workspace-remap . --verbose --partition count:"${{ matrix.test }}"/7 --no-tests=warn
test_medium_cpu:
needs: build_cpu
runs-on: warp-ubuntu-2404-x64-16x
strategy:
matrix:
test:
- "1"
- "2"
- "3"
- "4"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Init testing instance
uses: ./.github/actions/init-testing-instance
- name: Run medium tests (ignored tests except large ones)
run: cargo nextest run --archive-file tests_cpu.tar.zst --workspace-remap . --verbose --partition count:"${{ matrix.test }}"/7 --test-threads=4 -E 'not (test(_large))' --run-ignored only --no-tests=warn
test_large_cpu:
needs: build_cpu
runs-on: warp-ubuntu-2404-x64-32x
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Init testing instance
uses: ./.github/actions/init-testing-instance
- name: Run large tests
run: cargo nextest run --archive-file tests_cpu.tar.zst --workspace-remap . --verbose -E 'test(_large)' --run-ignored only --no-tests=warn
udeps_cpu:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Install cargo-udeps
run: cargo install cargo-udeps --locked
- name: Run cargo-udeps (CPU)
run: cargo udeps --all-targets
# NOTE: test_apc_reth_compilation has been moved to pr-tests-with-secrets.yml
# This job requires secrets.RPC_1 and uses pull_request_target to work with external PRs
build_gpu:
runs-on: [self-hosted, GPU]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install Rust toolchain nightly-2025-10-01 (with clippy and rustfmt)
run: rustup toolchain install nightly-2025-10-01 --component clippy,rustfmt
- name: Install Rust toolchain 1.90 (stable)
run: rustup toolchain install 1.90
- name: Set cargo to perform shallow clones
run: echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
- name: Format
run: cargo fmt --all --check --verbose
- name: Cargo check with Rust 1.90 (all features)
run: cargo +1.90 check --all-targets
- name: Lint no default features
run: cargo clippy --all --all-targets --features cuda,metrics,aot --profile pr-tests --verbose -- -D warnings
- name: Build (GPU)
run: cargo build --all-targets --features cuda,metrics,aot --all --profile pr-tests --verbose
- uses: taiki-e/install-action@nextest
- name: Create tests archive (GPU, features=cuda)
run: cargo nextest archive --archive-file tests_gpu.tar.zst --cargo-profile pr-tests --workspace --package powdr-openvm --features cuda
- name: Upload build artifacts (GPU)
uses: actions/upload-artifact@v4
with:
name: tests_archive_gpu
path: |
tests_gpu.tar.zst
test_quick_gpu:
needs: build_gpu
runs-on: [self-hosted, GPU]
timeout-minutes: 30
# TODO: we only have one runner on our GPU server, so can't partition yet; uncomment these once we have proper runners
# strategy:
# matrix:
# test:
# - "1"
# - "2"
# - "3"
# - "4"
# - "5"
# - "6"
# - "7"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Init testing instance (GPU)
uses: ./.github/actions/init-testing-instance-gpu
- name: Run quick GPU tests from powdr-openvm only
run: cargo nextest run --archive-file tests_gpu.tar.zst --workspace-remap . --verbose --no-tests=warn
# run: cargo nextest run --archive-file tests_gpu.tar.zst --workspace-remap . --verbose --partition count:"${{ matrix.test }}"/7 --no-tests=warn
# NOTE: test_apc_reth_app_proof has been moved to pr-tests-with-secrets.yml
# This job requires secrets.RPC_1 and uses pull_request_target to work with external PRs