Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): consolidate extension test workflows into matrix #1166

Merged
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.

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

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
paths:
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved
- "extensions/**"
- ".github/workflows/extension-tests.yml"
# Exclude RISC-V test vectors
- "!extensions/rv32im/**"
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved

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: 'ecc', path: 'ecc'}
- {name: 'keccak256', path: 'keccak256'}
- {name: 'native', path: 'native'}
- {name: 'pairing', path: 'pairing'}
- {name: 'sha256', path: 'sha256'}
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved
# Ensure tests run in parallel even if one fails
fail-fast: false

runs-on:
- runs-on=${{ github.run_id }}
- runner=64cpu-linux-arm64
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved
- tag=extension-${{ matrix.extension.name }}

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
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved
working-directory: extensions/${{ matrix.extension.path }}/tests
jonathanpwang marked this conversation as resolved.
Show resolved Hide resolved
run: |
rustup component add rust-src --toolchain nightly-2024-10-30
cargo nextest run --cargo-profile=fast
42 changes: 0 additions & 42 deletions .github/workflows/keccak256-extension.yml

This file was deleted.

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.

43 changes: 0 additions & 43 deletions .github/workflows/sha256-extension.yml

This file was deleted.