Skip to content

Commit

Permalink
Merge branch 'master' into tf/function-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Nov 9, 2023
2 parents 091a290 + 52daaec commit 26ff7e1
Show file tree
Hide file tree
Showing 610 changed files with 15,772 additions and 1,166 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/auto-pr-rebuild-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Check if artifacts should be published
runs-on: ubuntu-22.04
outputs:
publish: ${{ steps.check.outputs.publish }}
publish: ${{ steps.check.outputs.result }}

steps:
- name: Check if artifacts should be published
Expand All @@ -22,20 +22,24 @@ jobs:
script: |
const { REF_NAME } = process.env;
if (REF_NAME == "master") {
console.log(`publish = true`)
return true;
}
const labels = context.payload.pull_request.labels.map(label => label.name);
return labels.includes('publish-acir');
const publish = labels.includes('publish-acir');
console.log(`publish = ${publish}`)
return publish;
result-encoding: string
env:
REF_NAME: ${{ github.ref_name }}

build-nargo:
name: Build nargo binary
if: ${{ needs.check-artifacts-requested.outputs.publish == 'true' }}
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 @@ -76,7 +80,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -112,7 +116,6 @@ jobs:
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
112 changes: 112 additions & 0 deletions .github/workflows/docs-new-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Cut a new version of the 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
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}

- name: Create new branch
run: |
git checkout -b new-docs-version-${{ github.event.inputs.tag }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Install wasm-opt
run: |
npm i wasm-opt -g
- name: Install Yarn
run: npm install -g yarn

- name: Install Yarn dependencies
run: yarn

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

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

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

- name: Build barretenberg wrapper
run: yarn workspace @noir-lang/backend_barretenberg build

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

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

- name: Remove pre-releases
id: get_version
run: |
cd docs && yarn setStable
- name: Commit new documentation version
run: |
git config --local user.name 'signorecello'
git config --local user.email '[email protected]'
git add .
git commit -m "chore(docs): cut new docs version for tag ${{ github.event.inputs.tag }}"
- name: Push changes to new branch
run: git push origin new-docs-version-${{ github.event.inputs.tag }}

- name: Create Pull Request
run: |
gh pr create \
--title "chore(docs): docs for ${{ github.event.inputs.tag }}" \
--body "Updates documentation to new version for tag ${{ github.event.inputs.tag }}." \
--base master \
--head new-docs-version-${{ github.event.inputs.tag }} \
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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: 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

36 changes: 31 additions & 5 deletions .github/workflows/build-docs.yml → .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build docs
name: Deploy preview for PR

on:
pull_request:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
})
}
build_and_deploy:
build_and_deploy_preview:
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand All @@ -62,18 +62,44 @@ jobs:
with:
node-version: '18'

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Install wasm-opt
run: |
npm i wasm-opt -g
- name: Install dependencies
run: yarn

- name: Build docs
run: yarn workspace docs build

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

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

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

- name: Build barretenberg wrapper
run: yarn workspace @noir-lang/backend_barretenberg build

- name: Run noir_js
run: |
yarn workspace @noir-lang/noir_js build
- name: Remove pre-releases
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn setStable

- name: Build docs
run:
yarn workspace docs build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Rebuild docs with the latest release

on:
release:
types: [released]
workflow_dispatch:

jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Install wasm-opt
run: |
npm i wasm-opt -g
- name: Install dependencies
run: yarn

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

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

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

- name: Build barretenberg wrapper
run: yarn workspace @noir-lang/backend_barretenberg build

- name: Run noir_js
run: |
yarn workspace @noir-lang/noir_js build
- name: Remove pre-releases
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn setStable

- 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: true
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for release"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
57 changes: 0 additions & 57 deletions .github/workflows/publish-docs.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: ./.github/actions/nix
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache-name: ${{ vars.NIX_CACHE_NAME }}
nix-cache-name: "noir"
cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }}

- name: Enable aztec features
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
uses: ./.github/actions/nix
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache-name: ${{ vars.NIX_CACHE_NAME }}
nix-cache-name: "noir"
cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }}

- name: Build wasm package
Expand All @@ -84,7 +84,7 @@ jobs:
uses: ./.github/actions/nix
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
nix-cache-name: ${{ vars.NIX_CACHE_NAME }}
nix-cache-name: "noir"
cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }}

- name: Build wasm package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Dispatch to publish workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish-docs.yml
workflow: docs-new-version.yml
repo: noir-lang/noir
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 26ff7e1

Please sign in to comment.