Skip to content

Commit

Permalink
Merge branch 'mv/slice-struct-fields' into mv/fill-slices-pass
Browse files Browse the repository at this point in the history
* mv/slice-struct-fields: (112 commits)
  chore: Add a workflow to build with feature flag (#3378)
  chore: fix for-loop in aztec-library (#3377)
  feat!: return Pedersen structure in stdlib (#3190)
  feat: Manage breakpoints and allow restarting a debugging session (#3325)
  chore: small driver refactors (#3375)
  fix: fixing versioning workflow (#3296)
  feat!: noir-wasm outputs debug symbols (#3317)
  chore: build acvm_js for integration tests in parallel (#3368)
  chore: replace bash with `@actions/github-script` (#3369)
  feat(noir_js): allow providing foreign call handlers in noirJS (#3294)
  feat: Allow traits to have generic functions (#3365)
  chore(ci): ensure that acir artifacts are published on master (#3367)
  chore: cleanup CI workflows to be more consistent (#3366)
  fix: Use pedersen_hash for merkle tree (#3357)
  chore: format `for` stmt (#3333)
  fix!: move mimc to hash submodule (#3361)
  fix: remove sha2_block test (#3360)
  chore: deduplicate dependencies across the workspace (#3356)
  chore: Add links to complete NoirJS app code to the guide (#3359)
  chore: clippy fixes (#3358)
  ...
  • Loading branch information
TomAFrench committed Oct 31, 2023
2 parents 3b664a4 + e58dbba commit 0036938
Show file tree
Hide file tree
Showing 873 changed files with 13,982 additions and 3,990 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
40 changes: 39 additions & 1 deletion .github/workflows/auto-pr-rebuild-script.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
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
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { REF_NAME } = process.env;
if (REF_NAME == "master") {
return true;
}
const labels = context.payload.pull_request.labels.map(label => label.name);
return labels.includes('publish-acir');
result-encoding: string
env:
REF_NAME: ${{ github.ref_name }}

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 All @@ -17,7 +45,7 @@ jobs:
uses: actions/checkout@v4

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

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -42,6 +70,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 +100,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
45 changes: 45 additions & 0 deletions .github/workflows/build-aztec-feature-flag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build with aztec feature flag

on:
pull_request:
merge_group:
push:
branches:
- master

# This will cancel previous runs when a branch or PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build-aztec-feature-flag:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu

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

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

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

- name: Build with feature flag
run: cargo build --features="noirc_frontend/aztec"
149 changes: 70 additions & 79 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,86 @@ name: Build docs

on:
pull_request:
paths:
- 'docs/**'
types:
- opened
- synchronize
- labeled
push:
paths:
- 'docs/**'

jobs:

add_label:
runs-on: ubuntu-latest
outputs:
has_label: ${{ steps.check-labels.outputs.result }}
steps:
- name: Check if label is present
id: check-labels
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (labels.includes('documentation')) {
return true;
}
// Fetch the list of files changed in the PR
const { data: files } = await github.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
// Check if any file is within the 'docs' folder
const docsChanged = files.some(file => file.filename.startsWith('docs/'));
return docsChanged;
- name: Add label if not present
if: steps.check-labels.outputs.result == 'true'
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (!labels.includes('documentation')) {
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['documentation']
})
}
build_and_deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: contains(github.event.pull_request.labels.*.name, 'documentation')
needs: add_label
if: needs.add_label.outputs.has_label == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Netlify deploy
run: |
BRANCH_NAME=$(echo "${{ github.head_ref || github.ref }}" | sed -e "s#refs/[^/]*/##")
curl -X POST -d {} "https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_BUILD_HOOK }}?trigger_branch=$BRANCH_NAME"
- name: Get deploy preview
id: get_deploy_preview
run: |
BRANCH_NAME=$(echo "${{ github.head_ref || github.ref }}" | sed -e "s#refs/[^/]*/##")
curl -X GET "https://api.netlify.com/api/v1/sites/${{ secrets.NETLIFY_SITE_ID }}/deploys?branch=$BRANCH_NAME" > deploy.json
echo "::set-output name=deploy_url::$(cat deploy.json | jq -r '.[0].deploy_ssl_url')"
- name: Add PR Comment
uses: mshick/add-pr-comment@v2
with:
message: |
Hey @${{ github.event.pull_request.user.login }}! 🙌
I'm the deployment bot for Noir Docs, and I've got some updates for you:
## Deployment Status
Your latest changes are being deployed for preview! 🚀
Click the badge to see logs 🧐
[![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)
If you have any questions about this process, refer to our contribution guide or feel free to ask around.
- name: Check on deploy status
uses: ./.github/actions/docs/build-status
id: check_deploy_status
with:
branch-name: ${{ github.head_ref || github.ref }}
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

- name: Setup Node.js
uses: actions/setup-node@v2
with:
message-success: |
![It's Alive!](https://i.imgflip.com/82hw5n.jpg)
I'm a bot, beep boop 🤖
## Deployment Status: Success!
[![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)
## Preview
node-version: '18'

🌐 [View Deployment Preview](${{ steps.get_deploy_preview.outputs.deploy_url }})
- name: Install dependencies
run: yarn

- name: Build docs
run: yarn workspace docs build

- name: Change PR Comment for Failed Deployment
if: steps.check_deploy_status.outputs.deploy_status == 'failure'
uses: mshick/add-pr-comment@v2
- name: Remove pre-releases
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn setStable

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.1
with:
message: |
![docs CI troll](https://i.imgflip.com/82ht8f.jpg)
I'm a bot, beep boop 🤖
## Deployment Status: Failed ❌
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)
publish-dir: './docs/build'
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for PR ${{ github.event.number }}"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
2 changes: 1 addition & 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.66.0
uses: dtolnay/rust-toolchain@1.71.1
with:
targets: ${{ matrix.target }}
components: clippy, rustfmt
Expand Down
Loading

0 comments on commit 0036938

Please sign in to comment.