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(ci): fix publishing of noir_wasm #4163

Merged
merged 1 commit into from
Jan 25, 2024
Merged
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
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
Loading