diff --git a/.github/workflows/algebra-extension.yml b/.github/workflows/algebra-extension.yml deleted file mode 100644 index 86d0b22365..0000000000 --- a/.github/workflows/algebra-extension.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Algebra Extension Tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["**"] - paths: - - "extensions/algebra/**" - -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: - tests: - 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 algebra extension crate tests - working-directory: extensions/algebra/circuit - run: | - cargo nextest run --cargo-profile=fast - - - name: Run algebra integration tests - working-directory: extensions/algebra/tests - run: | - rustup component add rust-src --toolchain nightly-2024-10-30 - cargo nextest run --cargo-profile=fast diff --git a/.github/workflows/bigint-extension.yml b/.github/workflows/bigint-extension.yml deleted file mode 100644 index d4f11e637d..0000000000 --- a/.github/workflows/bigint-extension.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Bigint Extension Tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["**"] - paths: - - "extensions/bigint/**" - -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: - tests: - 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 bigint extension crate tests - working-directory: extensions/bigint/circuit - run: | - cargo nextest run --cargo-profile=fast - - - name: Run bigint integration tests - working-directory: extensions/bigint/tests - run: | - rustup component add rust-src --toolchain nightly-2024-10-30 - cargo nextest run --cargo-profile=fast diff --git a/.github/workflows/extension-tests.yml b/.github/workflows/extension-tests.yml new file mode 100644 index 0000000000..2e8b405b38 --- /dev/null +++ b/.github/workflows/extension-tests.yml @@ -0,0 +1,59 @@ +name: Extension Tests + +on: + push: + branches: ["main"] + pull_request: + branches: ["**"] + paths: + - "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: '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'} + - {name: 'rv32im', path: 'rv32im'} + # 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: 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: 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 \ No newline at end of file diff --git a/.github/workflows/keccak256-extension.yml b/.github/workflows/keccak256-extension.yml deleted file mode 100644 index 49ebcebbea..0000000000 --- a/.github/workflows/keccak256-extension.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Keccak Extension Tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["**"] - paths: - - "extensions/keccak256/**" - -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: - tests: - 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 keccak256 extension crate tests - working-directory: extensions/keccak256/circuit - run: | - cargo nextest run --cargo-profile=fast - - - name: Run keccak256 integration tests - working-directory: extensions/keccak256/tests - run: | - rustup component add rust-src --toolchain nightly-2024-10-30 - cargo nextest run --cargo-profile=fast diff --git a/.github/workflows/native-extension.yml b/.github/workflows/native-extension.yml deleted file mode 100644 index 3c4379d2c2..0000000000 --- a/.github/workflows/native-extension.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Native Extension Tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["**"] - paths: - - "extensions/native/**" - -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: - tests: - 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 native extension crate tests - working-directory: extensions/native/circuit - run: | - cargo nextest run --cargo-profile=fast diff --git a/.github/workflows/rv32im-extension.yml b/.github/workflows/rv32im-extension.yml deleted file mode 100644 index 8431bf845a..0000000000 --- a/.github/workflows/rv32im-extension.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: rv32im Extension Tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["**"] - paths: - - "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: - tests: - 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 rv32im extension crate tests - working-directory: extensions/rv32im/circuit - run: | - cargo nextest run --cargo-profile=fast - - - name: Run rv32im integration tests - working-directory: extensions/rv32im/tests - run: | - rustup component add rust-src --toolchain nightly-2024-10-30 - cargo nextest run --cargo-profile=fast diff --git a/.github/workflows/sha256-extension.yml b/.github/workflows/sha256-extension.yml deleted file mode 100644 index 73e4e5d39e..0000000000 --- a/.github/workflows/sha256-extension.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: SHA2-256 Extension Tests - -on: - push: - branches: ["main"] - pull_request: - branches: ["**"] - paths: - - "crates/circuits/sha256-air/**" - - "extensions/sha256/**" - -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: - tests: - 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 sha256 extension crate tests - working-directory: extensions/sha256/circuit - run: | - cargo nextest run --cargo-profile=fast - - - name: Run sha256 integration tests - working-directory: extensions/sha256/tests - run: | - rustup component add rust-src --toolchain nightly-2024-10-30 - cargo nextest run --cargo-profile=fast