Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
10 changes: 5 additions & 5 deletions .github/workflows/publish-abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build noirc_abi_wasm
run: |
nix build -L .#noirc_abi_wasm
run: nix build .#noirc_abi_wasm

- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
Expand All @@ -42,10 +41,11 @@ jobs:
run: |
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock

- name: Publish to npm
- name: Publish to NPM
working-directory: ./temp_publish_dir
run: |
yarn npm publish --tag latest
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

17 changes: 7 additions & 10 deletions .github/workflows/publish-acvm-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish acvm_js
name: Publish acvm-js

on:
workflow_dispatch:
Expand Down Expand Up @@ -33,22 +33,19 @@ jobs:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build acvm-js
working-directory: acvm-repo
run: |
nix build .#
run: nix build .#acvm_js

- name: Discover Build Output Path
working-directory: acvm-repo
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/acvm_js)" >> $GITHUB_ENV

- name: Copy Build Output to Temporary Directory
working-directory: acvm-repo
run: |
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/

touch temp_publish_dir/yarn.lock

- name: Publish to NPM
working-directory: ./acvm-repo/temp_publish_dir
run: npm publish
working-directory: ./temp_publish_dir
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 9 additions & 2 deletions .github/workflows/publish-noir-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release and Publish Noir Js
name: Publish Noir Js

on:
workflow_dispatch:
Expand All @@ -17,9 +17,13 @@ jobs:
- name: Install jq
run: sudo apt-get install jq

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.67.0

- name: Install cargo and wasm-bindgen
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo install -f wasm-bindgen-cli --version 0.2.86

Expand All @@ -34,6 +38,9 @@ jobs:
- name: Build noirc_abi
run: yarn workspace @noir-lang/noirc_abi build

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

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

Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/publish-noir-wasm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Noir Wasm
name: Publish Noir Wasm

on:
workflow_dispatch:
Expand All @@ -21,23 +21,27 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05

- name: Build with Nix
run: |
nix build -L .#wasm
run: nix build .#noir_wasm

- name: Copy output
run: |
cp -r $(readlink result)/* .

- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV

- name: Publish to npm
- name: Copy Build Output to Temporary Directory
run: |
npm publish --access public
mkdir temp_publish_dir
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/
touch temp_publish_dir/yarn.lock

- name: Publish to NPM
working-directory: ./temp_publish_dir
run: yarn npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 6 additions & 0 deletions .github/workflows/publish-source-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
node-version: 18.15

- name: Install dependencies
run: yarn install --immutable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-noir-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Noir JS
name: Test Noir Js

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

rustToolchain = fenix.packages.${system}.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-Zk2rxv6vwKFkTTidgjPm6gDsseVmmljVt201H7zuDkk=";
sha256 = "sha256-riZUc+R9V35c/9e8KJUE+8pzpXyl0lRXt3ZkKlxoY0g=";
};

craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.66.1"
channel = "1.67.0"
components = [ "rust-src" ]
targets = [ "wasm32-unknown-unknown", "wasm32-wasi", "aarch64-apple-darwin" ]
profile = "default"