Skip to content

Commit

Permalink
Merge branch 'master' into aztec-packages
Browse files Browse the repository at this point in the history
* master: (45 commits)
  chore(docs): correct 'Edit this page' URL for dev docs (#4433)
  feat: Sync from aztec-packages (#4390)
  chore(docs): fix external contributor force push workflow (#4437)
  chore!: Remove empty value from bounded vec (#4431)
  chore: nargo fmt (#4434)
  feat: add poseidon2 opcode implementation for acvm/brillig, and Noir (#4398)
  fix: remove panic when generic array length is not resolvable (#4408)
  chore(ci): enforce formatting of noir code in CI (#4422)
  fix: correct formatting for databus visibility types (#4423)
  chore: remove duplicate `parse_all` function in wasm compiler (#4411)
  chore(ci): prevent msrv checks from blocking PRs (#4414)
  feat: expose separate functions to compile programs vs contracts in `noir_wasm` (#4413)
  chore: do not panic when dividing by zero (#4424)
  chore: remove unwanted prints (#4419)
  fix: remove print from monomorphization pass (#4417)
  chore(ssa): Remove mem2reg run before flattening (#4415)
  feat: Add HashMap to the stdlib (#4242)
  fix!: Ban Fields in for loop indices and bitwise ops (#4376)
  chore: Add #[recursive] Explainer to Documentation (#4399)
  feat(ci): Use wasm-opt when compiling wasm packages (#4334)
  ...
  • Loading branch information
TomAFrench committed Feb 27, 2024
2 parents c82a9c9 + e80c5f7 commit 58a0bfc
Show file tree
Hide file tree
Showing 197 changed files with 5,269 additions and 1,557 deletions.
13 changes: 13 additions & 0 deletions .github/ACVM_NOT_PUBLISHABLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: "ACVM crates are not publishable"
assignees: TomAFrench kevaundray savio-sou
---


The ACVM crates are currently unpublishable, making a release will NOT push our crates to crates.io.

This is likely due to a crate we depend on bumping its MSRV above our own. Our lockfile is not taken into account when publishing to crates.io (as people downloading our crate don't use it) so we need to be able to use the most up to date versions of our dependencies (including transient dependencies) specified.

Check the [MSRV check]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
10 changes: 10 additions & 0 deletions .github/CRATES_IO_PUBLISH_FAILED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "ACVM crates failed to publish"
assignees: TomAFrench kevaundray savio-sou
---

The {{env.CRATE_VERSION}} release of the ACVM crates failed.

Check the [Publish ACVM]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
11 changes: 11 additions & 0 deletions .github/JS_PUBLISH_FAILED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "JS packages failed to publish"
assignees: TomAFrench kevaundray savio-sou
labels: js
---

The {{env.NPM_TAG}} release of the JS packages failed.

Check the [Publish JS packages]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
2 changes: 1 addition & 1 deletion .github/scripts/integration-test-browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -eu

./.github/scripts/playwright-install.sh
yarn workspace integration-tests test
yarn workspace integration-tests test:browser
2 changes: 1 addition & 1 deletion .github/scripts/integration-test-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -eu

apt-get install libc++-dev -y
yarn workspace integration-tests test
yarn workspace integration-tests test:node
8 changes: 8 additions & 0 deletions .github/scripts/wasm-opt-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -eu

cd $(dirname "$0")

./cargo-binstall-install.sh

cargo-binstall wasm-opt --version 0.116.0 -y
15 changes: 14 additions & 1 deletion .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -114,3 +114,16 @@ jobs:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

add_comment:
needs: [deploy_preview]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Tag dev rel in comment
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
FYI @noir-lang/developerrelations on Noir doc changes.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67 changes: 66 additions & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0
with:
targets: ${{ matrix.target }}
components: clippy, rustfmt
Expand Down Expand Up @@ -63,3 +63,68 @@ jobs:

- name: Run `yarn lint`
run: yarn lint

build-nargo:
runs-on: ubuntu-22.04
timeout-minutes: 30

steps:
- name: Checkout Noir repo
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
cache-on-failure: true
save-if: ${{ github.event_name != 'merge_group' }}

- name: Build Nargo
run: cargo build --package nargo_cli --release

- name: Package artifacts
run: |
mkdir dist
cp ./target/release/nargo ./dist/nargo
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-x86_64-unknown-linux-gnu.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nargo
path: ./dist/*
retention-days: 3

nargo_fmt:
needs: [build-nargo]
name: Nargo fmt
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo

- name: Set nargo on PATH
run: |
nargo_binary="${{ github.workspace }}/nargo/nargo"
chmod +x $nargo_binary
echo "$(dirname $nargo_binary)" >> $GITHUB_PATH
export PATH="$PATH:$(dirname $nargo_binary)"
nargo -V
- name: Format stdlib
working-directory: ./noir_stdlib
run: nargo fmt --check

- name: Format test suite
working-directory: ./test_programs
run: ./format.sh check
2 changes: 1 addition & 1 deletion .github/workflows/gates_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

# These steps are in a specific order so crate dependencies are updated first
- name: Publish acir_field
Expand Down Expand Up @@ -62,3 +62,16 @@ jobs:
cargo publish --package acvm
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}

# Raise an issue if any package failed to publish
- name: Alert on failed publish
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CRATE_VERSION: ${{ inputs.noir-ref }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/JS_PUBLISH_FAILED.md
30 changes: 26 additions & 4 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -32,6 +32,9 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build noirc_abi
run: ./.github/scripts/noirc-abi-build.sh

Expand All @@ -51,7 +54,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -61,6 +64,9 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

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

Expand All @@ -83,7 +89,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -93,6 +99,9 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build acvm_js
run: ./.github/scripts/acvm_js-build.sh

Expand All @@ -114,7 +123,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: acvm_js
name: acvm-js
path: acvm-repo/acvm_js

- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -143,3 +152,16 @@ jobs:

- name: Publish ES Packages
run: yarn publish:all --access public --tag ${{ inputs.npm-tag }}

# Raise an issue if any package failed to publish
- name: Alert on failed publish
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TAG: ${{ inputs.npm-tag }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/JS_PUBLISH_FAILED.md
4 changes: 2 additions & 2 deletions .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0
with:
targets: ${{ matrix.target }}

Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0
with:
targets: ${{ matrix.target }}

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,22 @@ jobs:
fix
feat
chore
force-push-comment:
name: Warn external contributors about force-pushing
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != 'noir-lang/noir' }}
permissions:
pull-requests: write

steps:
- name: Post comment on force pushes
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
Thank you for your contribution to the Noir language.
Please **do not force push to this branch** after the Noir team have started review of this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.
Thanks for your understanding.
17 changes: 13 additions & 4 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -66,6 +66,9 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build noirc_abi
run: ./.github/scripts/noirc-abi-build.sh

Expand All @@ -86,7 +89,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -97,6 +100,9 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

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

Expand All @@ -121,7 +127,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1
uses: dtolnay/rust-toolchain@1.73.0

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -132,6 +138,9 @@ jobs:
- name: Install Yarn dependencies
uses: ./.github/actions/setup

- name: Install wasm-opt
run: ./.github/scripts/wasm-opt-install.sh

- name: Build acvm_js
run: ./.github/scripts/acvm_js-build.sh

Expand Down
Loading

0 comments on commit 58a0bfc

Please sign in to comment.