Skip to content

Commit

Permalink
chore(ci): fix publishing of noir_wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jan 25, 2024
1 parent a66e372 commit fffc246
Showing 1 changed file with 32 additions and 19 deletions.
51 changes: 32 additions & 19 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
run-name: Publish ES Packages from ${{ inputs.noir-ref }} under @${{ inputs.npm-tag }} tag.

jobs:
build-noir_wasm:
build-noirc_abi_wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -32,40 +32,52 @@ jobs:

- name: Build wasm package
run: |
nix build -L .#noir_wasm
nix build -L .#noirc_abi_wasm
- uses: actions/upload-artifact@v3
with:
name: noir_wasm
name: noirc_abi_wasm
path: |
result/noir_wasm/nodejs
result/noir_wasm/web
result/noirc_abi_wasm/nodejs
result/noirc_abi_wasm/web
build-noirc_abi_wasm:
build-noir_wasm:
needs: [build-noirc-abi]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.noir-ref }}

- name: Setup Nix
uses: ./.github/actions/nix
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1

- uses: Swatinem/rust-cache@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache-name: "noir"
cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }}

- name: Build wasm package
run: |
nix build -L .#noirc_abi_wasm
key: noir-wasm
save-if: false

- uses: actions/upload-artifact@v3
- name: Download noirc_abi_wasm package artifact
uses: actions/download-artifact@v3
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm

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

- name: Build noir_wasm
run: yarn workspace @noir-lang/noir_wasm build

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: noir_wasm
path: |
result/noirc_abi_wasm/nodejs
result/noirc_abi_wasm/web
./compiler/wasm/dist
./compiler/wasm/build
retention-days: 3

build-acvm_js:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -97,7 +109,6 @@ jobs:
runs-on: ubuntu-latest
needs: [build-acvm_js, build-noirc_abi_wasm, build-noir_wasm]
steps:

- name: Checkout sources
uses: actions/checkout@v4
with:
Expand All @@ -107,10 +118,12 @@ jobs:
with:
name: acvm_js
path: acvm-repo/acvm_js

- uses: actions/download-artifact@v3
with:
name: noir_wasm
path: compiler/wasm

- uses: actions/download-artifact@v3
with:
name: noirc_abi_wasm
Expand Down

0 comments on commit fffc246

Please sign in to comment.