Skip to content

Commit

Permalink
Merge branch 'master' into tf/use-setup-node
Browse files Browse the repository at this point in the history
* master:
  feat(traits): Type checking for Trait impl method signatures  (#2652)
  chore: split 9_conditional test case and remove 8_integration (#2751)
  chore(github): Add "Idea Action Plan" Issue template (#2736)
  feat(aztec-noir): abstract storage (#2750)
  feat: signed arithmetic (#2748)
  chore: encapsulate abstraction leaks from `bb` into new crate (#2747)
  feat: Variable liveness analysis for brillig (#2715)
  chore: noirjs integration testing (#2744)
  chore: Add rust-toolchain file & adapt nix for changes (#2686)
  chore: wrap backend info response in a struct instead of boxed closure (#2737)
  fix: check for literal overflows in expressions (#2742)
  fix: nightly js test (#2740)
  fix: keep the correct type for bitshift (#2739)
  chore: Make new daily nightly releases be pre-releases and non latest (#2735)
  chore: disabling display location section  (#2118)
  chore: add a workflow that tracks acvm version for integration tests (#2700)
  feat: Save nightly build in github releases with date tags (#2416)
  chore: Add unified linting setup for JS code and enforce in CI (#2728)
  • Loading branch information
TomAFrench committed Sep 20, 2023
2 parents ccbf6e0 + 8617008 commit b637e08
Show file tree
Hide file tree
Showing 142 changed files with 2,751 additions and 1,622 deletions.
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "prettier"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
rules: {
"comma-spacing": ["error", { before: false, after: true }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn", // or "error"
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"prettier/prettier": "error",
},
};
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/idea_action_plan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Idea Action Plan
description: Outline the scope and steps for implementing an enhancement. Start with "Ideas" instead to request and discuss new features.
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
## Description
Thanks for taking the time to create the Issue, and welcome to the Noirot family!
- type: textarea
id: problem
attributes:
label: Problem
description: Describe what you feel lacking. Supply code / step-by-step examples if applicable.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Happy Case
description: Describe how you think it should work. Supply pseudocode / step-by-step examples if applicable.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe less-happy cases you have considered, if any.
- type: textarea
id: additional
attributes:
label: Additional Context
description: Supplement further information if applicable.
- type: markdown
attributes:
value: |
## Pull Request
- type: dropdown
id: pr-preference
attributes:
label: Would you like to submit a PR for this Issue?
description: Fellow contributors are happy to provide support where applicable.
multiple: false
options:
- "No"
- "Maybe"
- "Yes"
validations:
required: true
- type: textarea
id: pr-support
attributes:
label: Support Needs
description: Support from other contributors you are looking for to create a PR for this Issue.
12 changes: 6 additions & 6 deletions .github/workflows/abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
- name: Build noirc_abi_wasm
run: |
nix build -L .#noirc_abi_wasm
cp -r ./result/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/web ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm
- name: Export cache from nix store
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
Expand All @@ -63,7 +63,7 @@ jobs:
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
run: echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand All @@ -75,7 +75,7 @@ jobs:
test:
runs-on: ubuntu-latest
needs: [build]

steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand All @@ -85,7 +85,7 @@ jobs:
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm

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

Expand All @@ -94,7 +94,7 @@ jobs:

- name: Install Playwright
uses: ./.github/actions/install-playwright

- name: Run browser tests
run: yarn workspace @noir-lang/noirc_abi test:browser

17 changes: 16 additions & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Clippy
name: Formatting

on:
pull_request:
Expand Down Expand Up @@ -48,3 +48,18 @@ jobs:

- name: Run `cargo fmt`
run: cargo fmt --all --check

eslint:
name: eslint
runs-on: ubuntu-latest
timeout-minutes: 30

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

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

- name: Run `yarn lint`
run: yarn lint
2 changes: 1 addition & 1 deletion .github/workflows/publish-abi_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
nix build -L .#noirc_abi_wasm
- name: Discover Build Output Path
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV

- name: Copy Build Output to Temporary Directory
run: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ jobs:
overwrite: true
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)

- name: Get formatted date
id: date
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
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' }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.tar.gz
asset_name: nargo-${{ matrix.target }}.tar.gz
prerelease: true
make_latest: false
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}

build-linux:
runs-on: ubuntu-22.04
env:
Expand Down Expand Up @@ -162,3 +180,21 @@ jobs:
asset_name: nargo-${{ matrix.target }}.tar.gz
overwrite: true
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)

- name: Get formatted date
id: date
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
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' }}
with:
repo_name: noir-lang/noir
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./nargo-${{ matrix.target }}.tar.gz
asset_name: nargo-${{ matrix.target }}.tar.gz
prerelease: true
make_latest: false
overwrite: true
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}
21 changes: 11 additions & 10 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
- name: Build noir_wasm package
run: |
nix build -L .#wasm
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
cp -r ./result/nodejs ./compiler/wasm
cp -r ./result/web ./compiler/wasm
nix build -L .#noir_wasm
echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV
cp -r ./result/noir_wasm/nodejs ./compiler/wasm
cp -r ./result/noir_wasm/web ./compiler/wasm
- name: Upload `noir_wasm` artifact
uses: actions/upload-artifact@v3
Expand All @@ -69,9 +69,9 @@ jobs:
- name: Build noirc_abi_wasm package
run: |
nix build -L .#noirc_abi_wasm
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
cp -r ./result/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/web ./tooling/noirc_abi_wasm
echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm
- name: Upload `noirc_abi_wasm` artifact
uses: actions/upload-artifact@v3
Expand All @@ -85,13 +85,14 @@ jobs:

- name: Setup `integration-tests`
run: |
yarn workspace @noir-lang/noir-source-resolver build
yarn workspace @noir-lang/source-resolver build
yarn workspace @noir-lang/noir_js build
- name: Run `integration-tests`
run: |
yarn test:integration
- name: Alert on nightly test failure
- name: Alert on nightly test failure
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() && github.event_name == 'schedule' }}
env:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/track-acvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Track ACVM for Integration Tests

on:
pull_request:
paths:
- "Cargo.lock"
- "yarn.lock"

jobs:
check_matching_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check acvm version change
run: |
# Extract acvm version from the current Cargo.lock
CURRENT_VERSION=$(awk '/name = "acvm"/ {getline; print $3}' Cargo.lock | tr -d '"')
INTEGRATION_TEST_VERSION=$(yarn workspace @noir-lang/noir_js info @noir-lang/acvm_js --json | jq .children.Version | tr -d '"')
echo "Current ACVM Version: $CURRENT_VERSION"
echo "Integration Test ACVM Version (Noir JS): $INTEGRATION_TEST_VERSION"
if [ "$CURRENT_VERSION" != "$INTEGRATION_TEST_VERSION" ]; then
exit 1
else
echo "ACVM version is a match."
fi
6 changes: 3 additions & 3 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
target: [x86_64-unknown-linux-gnu]

steps:
- name: Checkout Noir repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Build wasm package
run: |
nix build -L .#wasm
nix build -L .#noir_wasm
- name: Export cache from nix store
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
Expand All @@ -96,7 +96,7 @@ jobs:
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
run: echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
49 changes: 30 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b637e08

Please sign in to comment.