diff --git a/.github/scripts/build-noir-js-types.sh b/.github/scripts/build-noir-js-types.sh new file mode 100755 index 00000000000..5b0c0416e2b --- /dev/null +++ b/.github/scripts/build-noir-js-types.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -eu + +cd /usr/src/noir +yarn workspace @noir-lang/types build \ No newline at end of file diff --git a/.github/workflows/docker-test-flow.yml b/.github/workflows/docker-test-flow.yml index 0cb61bde88a..c702a6cc786 100644 --- a/.github/workflows/docker-test-flow.yml +++ b/.github/workflows/docker-test-flow.yml @@ -141,6 +141,35 @@ jobs: /usr/src/noir/compiler/source-resolver/types if-no-files-found: error + build-noir-js-types: + name: build noir types + runs-on: ubuntu-latest + needs: [build-base-js, test-noirc-abi] + container: + image: ghcr.io/noir-lang/noir:${{ github.sha }}-js + credentials: + username: ${{ github.actor }} + password: ${{ secrets.github_token }} + steps: + - name: download artifact + uses: actions/download-artifact@v4 + with: + name: noirc-abi-wasm + path: | + /usr/src/noir/tooling/noirc_abi_wasm + - name: build + run: | + /usr/src/noir/.github/scripts/build-noir-js-types.sh + - name: artifact + uses: actions/upload-artifact@v4 + with: + name: noir-js-types + path: | + /usr/src/noir/tooling/noir_js_types/lib/cjs + /usr/src/noir/tooling/noir_js_types/lib/esm + if-no-files-found: error + compression-level: 0 + test-noir-wasm: name: test noir wasm runs-on: ubuntu-latest @@ -195,17 +224,35 @@ jobs: - name: test run: | /usr/src/noir/.github/scripts/test-noirc-abi.sh + - name: artifact + uses: actions/upload-artifact@v4 + with: + name: noirc-abi-wasm + path: | + /usr/src/noir/tooling/noirc_abi_wasm/nodejs + /usr/src/noir/tooling/noirc_abi_wasm/web + /usr/src/noir/tooling/noirc_abi_wasm/target + /usr/src/noir/tooling/noirc_abi_wasm/outputs + /usr/src/noir/tooling/noirc_abi_wasm/result + if-no-files-found: error + compression-level: 0 test-barretenberg-backend: name: test barretenberg backend runs-on: ubuntu-latest - needs: [build-base-js, test-noirc-abi] + # needs: [build-base-js, test-noirc-abi] + needs: [build-base-js] container: image: ghcr.io/noir-lang/noir:${{ github.sha }}-js credentials: username: ${{ github.actor }} password: ${{ secrets.github_token }} steps: + - name: download source-resolver + uses: actions/download-artifact@v4 + with: + name: noir-js-types + path: /usr/src/noir/tooling/noir_js_types/lib/ - name: test run: | /usr/src/noir/.github/scripts/test-backend-barretenberg.sh diff --git a/Dockerfile.ci b/Dockerfile.ci index 45e74015898..87b1c97b29c 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -26,15 +26,11 @@ COPY ./tooling/noirc_abi_wasm/package.json ./tooling/noirc_abi_wasm/ COPY ./compiler/wasm/package.json ./compiler/wasm/ # source resolver COPY ./compiler/source-resolver/package.json ./compiler/source-resolver/ - #! Things rely on this COPY ./tooling/noir_js_types/package.json ./tooling/noir_js_types/ - #backend barretenberg COPY ./tooling/noir_js_backend_barretenberg/package.json ./tooling/noir_js_backend_barretenberg/ - COPY ./tooling/noir_js/package.json ./tooling/noir_js/ - COPY ./tooling/noir_codegen/package.json ./tooling/noir_codegen/ ### NEW ADDED