Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into kw/semver-compiler-…
Browse files Browse the repository at this point in the history
…version
  • Loading branch information
kevaundray committed Oct 28, 2023
2 parents d66e25c + 778e620 commit 74c19d5
Show file tree
Hide file tree
Showing 441 changed files with 9,997 additions and 2,305 deletions.
4 changes: 2 additions & 2 deletions .github/actions/docs/build-status/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ while [[ "$DEPLOY_STATUS" != "ready" && $COUNT -lt $MAX_RETRIES ]]; do
exit 0
elif [[ "$DEPLOY_STATUS" == "error" ]]; then
echo "deploy_status=failure" >> $GITHUB_OUTPUT
exit 0
exit 1
fi

echo "Deploy still running. Retrying..."
done

echo "deploy_status=failure" >> $GITHUB_OUTPUT
exit 0
exit 1
26 changes: 6 additions & 20 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
# Description

<!-- Thanks for taking the time to improve Noir! -->
<!-- Please fill out all fields marked with an asterisk (*). -->

## Problem\*

<!-- Describe the problem this Pull Request (PR) resolves / link to the GitHub Issue that describes the problem. -->

Resolves <!-- Link to GitHub Issue -->

## Summary\*

<!-- Describe the changes in this PR. -->
<!-- Supplement code examples and highlight breaking changes, if applicable. -->

## Documentation

- [ ] This PR requires documentation updates when merged.

<!-- If checked, check one of the following: -->

- [ ] I will submit a noir-lang/docs PR.

<!-- Submit a PR on https://github.com/noir-lang/docs. Thank you! -->
## Additional Context

- [ ] I will request for and support Dev Rel's help in documenting this PR.

<!-- List / highlight what should be documented. -->
<!-- Dev Rel will reach out for clarifications when needed. Thank you! -->

## Additional Context
## Documentation\*

<!-- Supplement further information if applicable. -->
Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR.

# PR Checklist\*

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/auto-pr-rebuild-script.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
name: Rebuild ACIR artifacts

on:
pull_request:
push:
branches:
- master

jobs:
check-artifacts-requested:
name: Check if artifacts should be published
runs-on: ubuntu-22.04
outputs:
publish: ${{ steps.check.outputs.publish }}

steps:
- name: Check if artifacts should be published
id: check
run: |
if [ ${{ github.ref_name }} == "master" ]; then
# Always publish on master
echo "publish=true" >> "$GITHUB_OUTPUT"
else
# Only publish on PRs if label is set
HAS_ARTIFACT_LABEL=$(gh pr view $PR --repo $REPO_URL --json labels | jq '.labels | any(.name == "publish-acir")')
echo "publish=$HAS_ARTIFACT_LABEL" >> "$GITHUB_OUTPUT"
fi
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.number }}
REPO_URL: ${{ github.repositoryUrl }}

build-nargo:
name: Build nargo binary
runs-on: ubuntu-22.04
needs: [check-artifacts-requested]
if: ${{ needs.check-artifacts-requested.outputs.publish == true }}
strategy:
matrix:
target: [x86_64-unknown-linux-gnu]
Expand Down Expand Up @@ -42,6 +69,7 @@ jobs:
retention-days: 3

auto-pr-rebuild-script:
name: Rebuild ACIR artifacts
needs: [build-nargo]
runs-on: ubuntu-latest

Expand Down Expand Up @@ -71,10 +99,19 @@ jobs:
chmod +x ./rebuild.sh
./rebuild.sh
- name: Upload ACIR artifacts
uses: actions/upload-artifact@v3
with:
name: acir-artifacts
path: ./tooling/nargo_cli/tests/acir_artifacts
retention-days: 10

- name: Check for changes in acir_artifacts directory
id: check_changes
if: ${{ github.ref_name }} == "master"
run: |
git diff --quiet tooling/nargo_cli/tests/acir_artifacts/ || echo "::set-output name=changes::true"
- name: Create or Update PR
if: steps.check_changes.outputs.changes == 'true'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ jobs:
site-id: ${{ secrets.NETLIFY_SITE_ID }}
continue-on-error: true


- name: Debugging - print deploy_status
run: echo "${{ steps.check_deploy_status.outputs.deploy_status }}"


- name: Change PR Comment for Successful Deployment
if: steps.check_deploy_status.outputs.deploy_status == 'success'
uses: mshick/add-pr-comment@v2
Expand Down Expand Up @@ -134,3 +136,7 @@ jobs:
Deployment didn't succeed. Please check logs below and resolve the issue 🧐
[![Netlify Status](https://api.netlify.com/api/v1/badges/${{ secrets.NETLIFY_SITE_ID }}/deploy-status?branch=${{ github.head_ref || github.ref }})](https://app.netlify.com/sites/noir-docs-v2/deploys)
- name: Fail the workflow if deployment failed
if: steps.check_deploy_status.outputs.deploy_status == 'failure'
run: exit 1
49 changes: 49 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Docs

on:
workflow_dispatch:
inputs:
tag:
description: The tag to build Docs for
required: false

jobs:
publish-docs:
runs-on: ubuntu-latest
if: ${{ inputs.tag != '' }}
permissions:
pull-requests: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

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

- name: Cut a new version
working-directory: ./docs
run: yarn docusaurus docs:version ${{ inputs.tag }}

- name: Build docs
run: yarn workspace docs build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs/build'
production-branch: master
production-deploy: false # TODO change to true
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for tag ${{ inputs.tag }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
22 changes: 22 additions & 0 deletions .github/workflows/recrawler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# name: Algolia Recrawl
# on:
# push:
# branches: [ master ]
# workflow_dispatch:

# jobs:
# algolia_recrawl:
# name: Algolia Recrawl
# runs-on: ubuntu-latest
# steps:
# - name: Algolia crawler creation and crawl
# uses: algolia/[email protected]
# id: algolia_crawler
# with:
# crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
# crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
# algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
# algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
# site-url: 'https://noir-lang.org/'
# crawler-name: noir-lang
# override-config: false
7 changes: 6 additions & 1 deletion .github/workflows/test-acvm-js.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Test acvm_js

on: [push, pull_request]
on:
pull_request:
merge_group:
push:
branches:
- master

# This will cancel previous runs when a branch or PR is updated
concurrency:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test-noir_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ jobs:
name: nargo
path: ./nargo

- name: Compile test program with Nargo CLI
working-directory: ./compiler/wasm/noir-script
- name: Compile fixtures with Nargo CLI
working-directory: ./compiler/wasm/fixtures
run: |
nargo_binary=${{ github.workspace }}/nargo/nargo
chmod +x $nargo_binary
$nargo_binary compile
for dir in $(ls -d */); do
pushd $dir/noir-script
$nargo_binary compile
popd
done
- name: Install Yarn dependencies
uses: ./.github/actions/setup
Expand Down
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
".": "0.17.0",
"acvm-repo": "0.29.0"
".": "0.18.0",
"acvm-repo": "0.30.0"
}
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [0.18.0](https://github.com/noir-lang/noir/compare/v0.17.0...v0.18.0) (2023-10-25)


### ⚠ BREAKING CHANGES

* expose pedersen hash in acir and bb solver ([#3269](https://github.com/noir-lang/noir/issues/3269))
* Switch to new pedersen implementation ([#3151](https://github.com/noir-lang/noir/issues/3151))

### Features

* Add crate for pub modifier ([#3271](https://github.com/noir-lang/noir/issues/3271)) ([e7a1a1a](https://github.com/noir-lang/noir/commit/e7a1a1a4b42b6b72c16f2204e33af80dbabba6b5))
* Cache debug artifacts ([#3133](https://github.com/noir-lang/noir/issues/3133)) ([c5a6229](https://github.com/noir-lang/noir/commit/c5a622983e4049d82589f185be5e96c63ed6066d))
* **debugger:** Print limited source code context ([#3217](https://github.com/noir-lang/noir/issues/3217)) ([dcda1c7](https://github.com/noir-lang/noir/commit/dcda1c7aed69ae8f55cd3f680e3cc1ece9de7541))
* Expose pedersen hash in acir and bb solver ([#3269](https://github.com/noir-lang/noir/issues/3269)) ([0108b6c](https://github.com/noir-lang/noir/commit/0108b6c1e8dc0dfc766ab3c4944deae9354dec36))
* Implement `bound_constraint_with_offset` in terms of `AcirVar`s ([#3233](https://github.com/noir-lang/noir/issues/3233)) ([8d89cb5](https://github.com/noir-lang/noir/commit/8d89cb59fe710859a96eaed4f988952bd727fb7d))
* Implement euclidean division and signed division in terms of `AcirVar`s ([#3230](https://github.com/noir-lang/noir/issues/3230)) ([b8b7782](https://github.com/noir-lang/noir/commit/b8b77825410c0e1f95549259a51e2c40de1ec342))
* Noir-wasm takes dependency graph ([#3213](https://github.com/noir-lang/noir/issues/3213)) ([a2c8ebd](https://github.com/noir-lang/noir/commit/a2c8ebd4a800d7ef042ac9cbe5ee6a837c715634))
* Replace boolean range constraints with arithmetic opcodes ([#3234](https://github.com/noir-lang/noir/issues/3234)) ([949222c](https://github.com/noir-lang/noir/commit/949222c20d9e65152e3814d02da1c4c41ffc23a5))
* **stdlib:** Optimize constraint counts in sha256/sha512 ([#3253](https://github.com/noir-lang/noir/issues/3253)) ([d3be552](https://github.com/noir-lang/noir/commit/d3be552149ab375b24b509603fcd7237b374ca5a))
* Switch to new pedersen implementation ([#3151](https://github.com/noir-lang/noir/issues/3151)) ([35fb3f7](https://github.com/noir-lang/noir/commit/35fb3f7076d52db7ca3bef0a70a3dbccaf82f58d))


### Bug Fixes

* Add size checks to integer literals ([#3236](https://github.com/noir-lang/noir/issues/3236)) ([7f8fe8c](https://github.com/noir-lang/noir/commit/7f8fe8c88eb2d26ae3a93e2f74430fadc74b4836))
* Fix lexer error formatting ([#3274](https://github.com/noir-lang/noir/issues/3274)) ([74bd517](https://github.com/noir-lang/noir/commit/74bd517fe7839465ff086ffe622462bed5159006))
* Impl methods are no longer placed in contracts ([#3255](https://github.com/noir-lang/noir/issues/3255)) ([b673b07](https://github.com/noir-lang/noir/commit/b673b071663d9756d6346954fce7d4ec6e1577dd))
* Recompile artefacts from a different noir version ([#3248](https://github.com/noir-lang/noir/issues/3248)) ([7347b27](https://github.com/noir-lang/noir/commit/7347b2742a5ad38d3d252e657810d061bab83e24))
* Show println output before an error occurs in `nargo execute` ([#3211](https://github.com/noir-lang/noir/issues/3211)) ([2f0b80d](https://github.com/noir-lang/noir/commit/2f0b80dda8401ce8962c857dbcd9548e7fdde4aa))

## [0.17.0](https://github.com/noir-lang/noir/compare/v0.16.0...v0.17.0) (2023-10-20)


Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ In the docs folder, you'll find the current, unreleased version, which we call `
While the versioning is intended to be managed by the core maintainers, we feel it's important for external contributors to understand why and how is it maintained. To bump to a new version, run the following command, replacing with the intended version:

```bash
npm run docusaurus docs:version <new_version_tag>
yarn docusaurus docs:version <new_version_tag>
```

This should create a new version by copying the docs folder and the sidebars.js file to the relevant folders, as well as adding this version to versions.json.
Expand Down
Loading

0 comments on commit 74c19d5

Please sign in to comment.