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

chore: automatically recompile noir_js test case programs #4236

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/scripts/noir-js-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash
set -eu

./scripts/nargo_compile_noir_js_assert_lt.sh
rm -rf /usr/src/noir/tooling/noir_js/test/noir_compiled_examples/assert_lt/target/debug_assert_lt.json
yarn workspace @noir-lang/noir_js test
yarn workspace @noir-lang/noir_js test
16 changes: 15 additions & 1 deletion .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
yarn workspace @noir-lang/backend_barretenberg test

test-noir-js:
needs: [build-acvm-js, build-noirc-abi]
needs: [build-nargo, build-acvm-js, build-noirc-abi]
name: Noir JS
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -256,6 +256,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v3
with:
name: nargo
path: ./nargo

- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -268,6 +274,14 @@ jobs:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V

- name: Install Yarn dependencies
uses: ./.github/actions/setup

Expand Down
4 changes: 0 additions & 4 deletions scripts/nargo_compile_noir_js_assert_lt.sh

This file was deleted.

2 changes: 0 additions & 2 deletions tooling/noir_js/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
crs

!test/noir_compiled_examples/*/target
3 changes: 2 additions & 1 deletion tooling/noir_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"scripts": {
"dev": "tsc-multi --watch",
"build": "tsc-multi",
"test": "yarn test:node:esm && yarn test:node:cjs",
"test": "yarn test:compile_program && yarn test:node:esm && yarn test:node:cjs",
"test:compile_program": "./scripts/compile_test_programs.sh",
"test:node:esm": "mocha --timeout 25000 --exit --config ./.mocharc.json",
"test:node:cjs": "mocha --timeout 25000 --exit --config ./.mocharc.cjs.json",
"prettier": "prettier 'src/**/*.ts'",
Expand Down
5 changes: 5 additions & 0 deletions tooling/noir_js/scripts/compile_test_programs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

rm -rf ./test/noir_compiled_examples/**/target
nargo --program-dir ./test/noir_compiled_examples/assert_lt compile --force
nargo --program-dir ./test/noir_compiled_examples/assert_msg_runtime compile --force

This file was deleted.

This file was deleted.

Loading