Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into retain-brillig-st…
Browse files Browse the repository at this point in the history
…ate-in-acvm
  • Loading branch information
ggiraldez committed Oct 11, 2023
2 parents 8567062 + b3a9c34 commit 4f77ff2
Show file tree
Hide file tree
Showing 332 changed files with 3,299 additions and 2,186 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lockfile check

on:
pull_request:

# 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:
yarn-lock:
runs-on: ubuntu-latest
timeout-minutes: 30

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

# Errors if installation would result in modifications to yarn.lock
- name: Install
run: yarn --immutable
shell: bash
51 changes: 0 additions & 51 deletions .github/workflows/publish-abi_wasm.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/publish-acvm-js.yml

This file was deleted.

43 changes: 40 additions & 3 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@ name: Publish Noir ES Packages

on:
workflow_dispatch:

inputs:
noir-ref:
description: The noir reference to checkout
required: false
npm-tag:
description: Repository Tag to publish under
required: false
default: 'nightly'

run-name: Publish ES Packages from ${{ inputs.noir-ref }} under @${{ inputs.npm-tag }} tag.

jobs:
build-noir_wasm:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.noir-ref || 'master' }}

- name: Setup Nix
uses: ./.github/actions/nix
Expand All @@ -17,6 +29,11 @@ jobs:
nix-cache-name: ${{ vars.NIX_CACHE_NAME }}
cachix-auth-token: ${{ secrets.CACHIXAUTHTOKEN }}

- name: Enable aztec features
if: ${{ inputs.npm-tag == 'aztec' }}
run: |
echo "\ndefault = [\"aztec\"]" >> compiler/noirc_frontend/Cargo.toml
- name: Build wasm package
run: |
nix build -L .#noir_wasm
Expand All @@ -26,6 +43,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.noir-ref || 'master' }}

- name: Setup Nix
uses: ./.github/actions/nix
Expand All @@ -43,6 +62,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.noir-ref || 'master' }}

- name: Setup Nix
uses: ./.github/actions/nix
Expand All @@ -61,6 +82,8 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.noir-ref || 'master' }}

- name: Setup Nix
uses: ./.github/actions/nix
Expand All @@ -72,11 +95,25 @@ jobs:
- name: Install Yarn dependencies
run: yarn install

- name: Enable aztec features
if: ${{ inputs.npm-tag == 'aztec' }}
run: |
echo "\ndefault = [\"aztec\"]" >> compiler/noirc_frontend/Cargo.toml
- name: Build ES Packages
run: yarn prepare:publish

- name: Prepare nightly version
if: ${{ inputs.npm-tag != 'latest' }}
run: |
yarn nightly:version
- name: Update Version as specific tag
run: |
jq '.version = .version + "-${{ inputs.npm-tag }}"' package.json > package-tmp.json && mv package-tmp.json package.json
- name: Authenticate with npm
run: "echo npmAuthToken: ${{ secrets.NPM_TOKEN }} > ~/.yarnrc.yml"

- name: Publish ES Packages
run: yarn publish:all --access public
run: yarn publish:all --access public --tag ${{ inputs.npm-tag }}
13 changes: 7 additions & 6 deletions .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ on:
description: Whether to publish the build artifacts
type: boolean
default: false
schedule:
# Run a nightly release at 2 AM UTC
- cron: "0 2 * * *"
merge_group:
pull_request:

Expand All @@ -29,6 +26,7 @@ jobs:
runs-on: macos-latest
env:
CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml
NIGHTLY_RELEASE: ${{ inputs.tag == '' }}
strategy:
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
Expand Down Expand Up @@ -117,6 +115,7 @@ jobs:
runs-on: ubuntu-22.04
env:
CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml
NIGHTLY_RELEASE: ${{ inputs.tag == '' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -172,7 +171,7 @@ jobs:
- name: Upload binaries to release tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.publish || github.event_name == 'schedule' }}
if: ${{ inputs.publish }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -183,12 +182,12 @@ jobs:

- name: Get formatted date
id: date
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
if: ${{ env.NIGHTLY_RELEASE && inputs.publish }}
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Upload binaries to release with date tag
uses: svenstaro/upload-release-action@v2
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
if: ${{ env.NIGHTLY_RELEASE && inputs.publish }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -198,3 +197,5 @@ jobs:
make_latest: false
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}


26 changes: 26 additions & 0 deletions .github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish Nightly release
on:
workflow_dispatch:
schedule:
# Run a nightly release at 2 AM UTC
- cron: "0 2 * * *"

jobs:
dispatch-publish-es:
runs-on: ubuntu-latest
steps:
- name: Dispatch to publish-nargo
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish-nargo.yml
token: ${{ secrets.NOIR_REPO_TOKEN }}
# Omitting a tag results in a nightly
inputs: "{ \"publish\": true }"


- name: Dispatch to publish-es-packages
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish-es-packages.yml
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: "{ \"noir-ref\": \"${{ env.GITHUB_REF }}\", \"npm-tag\": \"nightly\" }"
52 changes: 0 additions & 52 deletions .github/workflows/publish-noir-js.yml

This file was deleted.

Loading

0 comments on commit 4f77ff2

Please sign in to comment.