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: Add rust-toolchain file & adapt nix for changes #2686

Merged
merged 12 commits into from
Sep 18, 2023
12 changes: 6 additions & 6 deletions .github/workflows/abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
- name: Build noirc_abi_wasm
run: |
nix build -L .#noirc_abi_wasm
cp -r ./result/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/web ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm

- name: Export cache from nix store
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
Expand All @@ -63,7 +63,7 @@ jobs:
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
run: echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand All @@ -75,7 +75,7 @@ jobs:
test:
runs-on: ubuntu-latest
needs: [build]

steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -85,7 +85,7 @@ jobs:
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm

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

Expand All @@ -94,7 +94,7 @@ jobs:

- name: Install Playwright
uses: ./.github/actions/install-playwright

- name: Run browser tests
run: yarn workspace @noir-lang/noirc_abi test:browser

2 changes: 1 addition & 1 deletion .github/workflows/publish-abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
nix build -L .#noirc_abi_wasm

- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV

- name: Copy Build Output to Temporary Directory
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:

- name: Build noir_wasm package
run: |
nix build -L .#wasm
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
cp -r ./result/nodejs ./compiler/wasm
cp -r ./result/web ./compiler/wasm
nix build -L .#noir_wasm
echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV
cp -r ./result/noir_wasm/nodejs ./compiler/wasm
cp -r ./result/noir_wasm/web ./compiler/wasm

- name: Upload `noir_wasm` artifact
uses: actions/upload-artifact@v3
Expand All @@ -69,9 +69,9 @@ jobs:
- name: Build noirc_abi_wasm package
run: |
nix build -L .#noirc_abi_wasm
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
cp -r ./result/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/web ./tooling/noirc_abi_wasm
echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm

- name: Upload `noirc_abi_wasm` artifact
uses: actions/upload-artifact@v3
Expand All @@ -90,8 +90,8 @@ jobs:
- name: Run `integration-tests`
run: |
yarn test:integration
- name: Alert on nightly test failure

- name: Alert on nightly test failure
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() && github.event_name == 'schedule' }}
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
target: [x86_64-unknown-linux-gnu]

steps:
- name: Checkout Noir repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

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

- name: Export cache from nix store
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
Expand All @@ -96,7 +96,7 @@ jobs:
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
run: echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions compiler/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The package also handles dependency management like how Nargo (Noir's CLI tool)
Outside of the [noir repo](https://github.com/noir-lang/noir), this package can be built using the command below:

```bash
nix build -L github:noir-lang/noir/master#wasm
nix build -L github:noir-lang/noir/master#noir_wasm
```

If you are within the noir repo and would like to build local changes, you can use:

```bash
nix build -L #wasm
nix build -L #noir_wasm
```
12 changes: 7 additions & 5 deletions compiler/wasm/installPhase.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env bash
export self_path=$(dirname "$(readlink -f "$0")")

mkdir -p $out
cp $self_path/README.md $out/
cp $self_path/package.json $out/
cp -r $self_path/nodejs $out/
cp -r $self_path/web $out/
export out_path=$out/noir_wasm

mkdir -p $out_path
cp $self_path/README.md $out_path/
cp $self_path/package.json $out_path/
cp -r $self_path/nodejs $out_path/
cp -r $self_path/web $out_path/
78 changes: 46 additions & 32 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading