Skip to content

Commit

Permalink
fix: workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalakkal committed Nov 28, 2023
1 parent 8af1e62 commit a665098
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/halo2-browser-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: halo2-browser Tests
on: push

jobs:
halo2-wasm-tests:
runs-on: ubuntu-latest-64core-256ram
steps:
- uses: actions/checkout@v3
- name: Build halo2-wasm
working-directory: halo2-wasm
run: |
rustup toolchain install nightly-2023-08-12-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2023-08-12-x86_64-unknown-linux-gnu
cargo build --target=x86_64-unknown-linux-gnu --verbose
- name: Test halo2-wasm
working-directory: halo2-wasm
run: cargo test --target=x86_64-unknown-linux-gnu
# halo2-wasm-tests:
# runs-on: ubuntu-latest-64core-256ram
# steps:
# - uses: actions/checkout@v3
# - name: Build halo2-wasm
# working-directory: halo2-wasm
# run: |
# rustup toolchain install nightly-2023-08-12-x86_64-unknown-linux-gnu
# rustup component add rust-src --toolchain nightly-2023-08-12-x86_64-unknown-linux-gnu
# cargo build --target=x86_64-unknown-linux-gnu --verbose
# - name: Test halo2-wasm
# working-directory: halo2-wasm
# run: cargo test --target=x86_64-unknown-linux-gnu
halo2-lib-js-tests:
runs-on: ubuntu-latest-64core-256ram
steps:
Expand All @@ -29,9 +29,6 @@ jobs:
rustup toolchain install nightly-2023-08-12-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2023-08-12-x86_64-unknown-linux-gnu
cargo build --target=x86_64-unknown-linux-gnu --verbose
- name: Test halo2-wasm
working-directory: halo2-wasm
run: cargo test --target=x86_64-unknown-linux-gnu
- name: Build halo2-lib-js
working-directory: halo2-lib-js
run: |
Expand Down
6 changes: 4 additions & 2 deletions halo2-lib-js/tests/test_vk.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ def test_vk(filename):
test_type = filename.split('.')[-2]
rust_test = "tests::" + test_type + "::test_" + test_name
print("Testing " + test_name)
subprocess.run(["npx", 'halo2-wasm', 'keygen', file_path, "-c", "./tests/run.ts"], capture_output=True)
subprocess.run(['cargo', 'test', rust_test, "--quiet", "--", "--exact"], capture_output=True)
subprocess.run(["npx", 'halo2-wasm', 'keygen', file_path, "-c", "./tests/run.ts"])
subprocess.run(['cargo', 'test', rust_test, "--quiet", "--", "--exact"])
result = subprocess.run(['diff', './data/vk.bin', '../halo2-wasm/vk.bin'], capture_output=True)
if result.returncode != 0:
print(result.stderr)
print(result.stdout)
return (test_name, False)
return (test_name, True)

Expand Down

0 comments on commit a665098

Please sign in to comment.