Fix soundness bug in conversion to Halo2 #3499
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: ⚡ Restore rust cache | |
id: cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-pr-tests-${{ hashFiles('**/Cargo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-pr-tests- | |
- name: Install Rust toolchain 1.74 (with clippy and rustfmt) | |
run: rustup toolchain install 1.74-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.74-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.74-x86_64-unknown-linux-gnu | |
- name: Lint | |
run: cargo clippy --all --all-targets --all-features --profile pr-tests -- -D warnings | |
- name: Lint | |
run: cargo clippy --all --all-targets --no-default-features --profile pr-tests -- -D warnings | |
- name: Format | |
run: cargo fmt --all --check --verbose | |
- name: Build | |
run: cargo build --all-targets --all --all-features --profile pr-tests | |
- name: Check without Halo2 | |
run: cargo check --all --no-default-features --profile pr-tests | |
- uses: taiki-e/install-action@nextest | |
- name: Create tests archive | |
run: cargo nextest archive --archive-file tests.tar.zst --cargo-profile pr-tests --workspace --all-features | |
- name: ⚡ Save rust cache | |
if: github.ref == 'refs/heads/main' | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-pr-tests-${{ hashFiles('**/Cargo.toml') }} | |
- name: Upload tests archive | |
uses: actions/upload-artifact@v2 | |
with: | |
name: tests_archive | |
path: tests.tar.zst | |
test_quick: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: tests_archive | |
- name: ⚡ Cache nodejs | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/pilcom/node_modules | |
key: ${{ runner.os }}-pilcom-node-modules | |
- name: Install Rust toolchain 1.74 (with clippy and rustfmt) | |
run: rustup toolchain install 1.74-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.74-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.74-x86_64-unknown-linux-gnu | |
- name: Install nightly | |
run: rustup toolchain install nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install riscv target | |
run: rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install stdlib | |
run: rustup component add rust-src --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install pilcom | |
run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install | |
- uses: taiki-e/install-action@nextest | |
- name: Run default tests | |
run: PILCOM=$(pwd)/pilcom/ cargo nextest run --archive-file tests.tar.zst --verbose | |
test_slow: | |
strategy: | |
matrix: | |
test: | |
- "subset1" | |
- "subset2" | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download build artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: tests_archive | |
- name: ⚡ Cache nodejs | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/pilcom/node_modules | |
key: ${{ runner.os }}-pilcom-node-modules | |
- name: Install Rust toolchain 1.74 (with clippy and rustfmt) | |
run: rustup toolchain install 1.74-x86_64-unknown-linux-gnu && rustup component add clippy --toolchain 1.74-x86_64-unknown-linux-gnu && rustup component add rustfmt --toolchain 1.74-x86_64-unknown-linux-gnu | |
- name: Install nightly | |
run: rustup toolchain install nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install riscv target | |
run: rustup target add riscv32imac-unknown-none-elf --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install stdlib | |
run: rustup component add rust-src --toolchain nightly-2023-01-03-x86_64-unknown-linux-gnu | |
- name: Install pilcom | |
run: git clone https://github.com/0xPolygonHermez/pilcom.git && cd pilcom && npm install | |
- uses: taiki-e/install-action@nextest | |
- name: Run slow tests | |
# Number threads is set to 1 because the runner does not have enough memory for more. | |
run: | | |
if [[ "${{ matrix.test }}" == "subset1" ]]; then | |
TESTS="test(=test_keccak) | test(=test_vec_median) | test(=instruction_tests::addi) | test(=arith_test)" | |
elif [[ "${{ matrix.test }}" == "subset2" ]]; then | |
TESTS="test(=test_many_chunks)" | |
fi | |
PILCOM=$(pwd)/pilcom/ cargo nextest run --archive-file tests.tar.zst --verbose --run-ignored=ignored-only --no-capture -E "$TESTS" | |
shell: bash |