Skip to content

Commit

Permalink
Merge branch 'main' into prof/flamegraph
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpwang committed Jan 6, 2025
2 parents 467555d + 074cb83 commit 6cce0a7
Show file tree
Hide file tree
Showing 29 changed files with 389 additions and 747 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/algebra-extension.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/bigint-extension.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/ecc.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/extension-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Extension Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
paths:
- "crates/circuits/primitives/**"
- "crates/vm/**"
- "extensions/**"
- ".github/workflows/extension-tests.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
OPENVM_FAST_TEST: "1"

jobs:
extension-tests:
strategy:
matrix:
extension:
- { name: "rv32im", path: "rv32im" }
- { name: "native", path: "native" }
- { name: "keccak256", path: "keccak256" }
- { name: "sha256", path: "sha256" }
- { name: "bigint", path: "bigint" }
- { name: "algebra", path: "algebra" }
- { name: "ecc", path: "ecc" }
- { name: "pairing", path: "pairing" }
# Ensure tests run in parallel even if one fails
fail-fast: false

runs-on:
- runs-on=${{ github.run_id }}
- runner=64cpu-linux-arm64
- tag=extension-${{ matrix.extension.name }}

steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
- "crates/circuits/primitives/**"
- "crates/vm/**"
- "extensions/${{ matrix.extensions.path }}/**"
- ".github/workflows/extension-tests.yml"
- name: Skip if no changes
if: steps.filter.outputs.matched == 'false'
run: |
echo "No relevant changes, skipping tests."
exit 0
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@nextest

- name: Run ${{ matrix.extension.name }} circuit crate tests
working-directory: extensions/${{ matrix.extension.path }}/circuit
run: cargo nextest run --cargo-profile=fast

- name: Run ${{ matrix.extension.name }} guest crate tests
if: hashFiles(format('extensions/{0}/guest', matrix.extension.path)) != ''
working-directory: extensions/${{ matrix.extension.path }}/guest
run: |
FEATURE_ARGS=""
if [[ "${{ matrix.extension.name }}" == "pairing" ]]; then
FEATURE_ARGS="--features=bn254,bls12_381,halo2curves"
fi
cargo nextest run --cargo-profile=fast $FEATURE_ARGS --no-tests=pass
- name: Run ${{ matrix.extension.name }} integration tests
if: hashFiles(format('extensions/{0}/tests', matrix.extension.path)) != ''
working-directory: extensions/${{ matrix.extension.path }}/tests
run: |
rustup component add rust-src --toolchain nightly-2024-10-30
cargo nextest run --cargo-profile=fast --no-tests=pass
42 changes: 0 additions & 42 deletions .github/workflows/keccak256-extension.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: eDSL Compiler Tests
name: Native Compiler Tests

on:
push:
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/native-extension.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/rv32im-extension.yml

This file was deleted.

Loading

0 comments on commit 6cce0a7

Please sign in to comment.