Skip to content

Commit

Permalink
refactor(ci): consolidate extension test workflows into matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
0x471 committed Jan 3, 2025
1 parent 137e42d commit efa9c4e
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/extension-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Extension Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
paths:
- "extensions/**"
# Exclude RISC-V test vectors
- "!extensions/rv32im/**"

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: 'algebra', path: 'algebra'}
- {name: 'bigint', path: 'bigint'}
- {name: 'keccak256', path: 'keccak256'}
- {name: 'native', path: 'native'}
- {name: 'sha256', path: 'sha256'}
# Ensure tests run in parallel even if one fails
fail-fast: false

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

steps:
- uses: actions/checkout@v4
- 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 }} extension crate tests
working-directory: extensions/${{ matrix.extension.path }}/circuit
run: |
cargo nextest run --cargo-profile=fast
- name: Run ${{ matrix.extension.name }} integration tests
if: matrix.extension.name != 'native' # Native doesn't have integration tests
working-directory: extensions/${{ matrix.extension.path }}/tests
run: |
rustup component add rust-src --toolchain nightly-2024-10-30
cargo nextest run --cargo-profile=fast

0 comments on commit efa9c4e

Please sign in to comment.