Skip to content

Commit b637e08

Browse files
committed
Merge branch 'master' into tf/use-setup-node
* 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)
2 parents ccbf6e0 + 8617008 commit b637e08

142 files changed

Lines changed: 2751 additions & 1622 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
plugins: ["@typescript-eslint", "prettier"],
5+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6+
rules: {
7+
"comma-spacing": ["error", { before: false, after: true }],
8+
"no-unused-vars": "off",
9+
"@typescript-eslint/no-unused-vars": [
10+
"warn", // or "error"
11+
{
12+
argsIgnorePattern: "^_",
13+
varsIgnorePattern: "^_",
14+
caughtErrorsIgnorePattern: "^_",
15+
},
16+
],
17+
"prettier/prettier": "error",
18+
},
19+
};
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Idea Action Plan
2+
description: Outline the scope and steps for implementing an enhancement. Start with "Ideas" instead to request and discuss new features.
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
## Description
9+
Thanks for taking the time to create the Issue, and welcome to the Noirot family!
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem
14+
description: Describe what you feel lacking. Supply code / step-by-step examples if applicable.
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: solution
19+
attributes:
20+
label: Happy Case
21+
description: Describe how you think it should work. Supply pseudocode / step-by-step examples if applicable.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: alternatives
26+
attributes:
27+
label: Alternatives Considered
28+
description: Describe less-happy cases you have considered, if any.
29+
- type: textarea
30+
id: additional
31+
attributes:
32+
label: Additional Context
33+
description: Supplement further information if applicable.
34+
- type: markdown
35+
attributes:
36+
value: |
37+
## Pull Request
38+
- type: dropdown
39+
id: pr-preference
40+
attributes:
41+
label: Would you like to submit a PR for this Issue?
42+
description: Fellow contributors are happy to provide support where applicable.
43+
multiple: false
44+
options:
45+
- "No"
46+
- "Maybe"
47+
- "Yes"
48+
validations:
49+
required: true
50+
- type: textarea
51+
id: pr-support
52+
attributes:
53+
label: Support Needs
54+
description: Support from other contributors you are looking for to create a PR for this Issue.

.github/workflows/abi_wasm.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
- name: Build noirc_abi_wasm
4848
run: |
4949
nix build -L .#noirc_abi_wasm
50-
cp -r ./result/nodejs ./tooling/noirc_abi_wasm
51-
cp -r ./result/web ./tooling/noirc_abi_wasm
50+
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
51+
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm
5252
5353
- name: Export cache from nix store
5454
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
@@ -63,7 +63,7 @@ jobs:
6363
key: ${{ steps.cache.outputs.cache-primary-key }}
6464

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

6868
- name: Upload artifact
6969
uses: actions/upload-artifact@v3
@@ -75,7 +75,7 @@ jobs:
7575
test:
7676
runs-on: ubuntu-latest
7777
needs: [build]
78-
78+
7979
steps:
8080
- name: Checkout sources
8181
uses: actions/checkout@v3
@@ -85,7 +85,7 @@ jobs:
8585
with:
8686
name: noirc_abi_wasm
8787
path: ./tooling/noirc_abi_wasm
88-
88+
8989
- name: Install Yarn dependencies
9090
uses: ./.github/actions/setup
9191

@@ -94,7 +94,7 @@ jobs:
9494

9595
- name: Install Playwright
9696
uses: ./.github/actions/install-playwright
97-
97+
9898
- name: Run browser tests
9999
run: yarn workspace @noir-lang/noirc_abi test:browser
100100

.github/workflows/formatting.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Clippy
1+
name: Formatting
22

33
on:
44
pull_request:
@@ -48,3 +48,18 @@ jobs:
4848

4949
- name: Run `cargo fmt`
5050
run: cargo fmt --all --check
51+
52+
eslint:
53+
name: eslint
54+
runs-on: ubuntu-latest
55+
timeout-minutes: 30
56+
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Install Yarn dependencies
62+
uses: ./.github/actions/setup
63+
64+
- name: Run `yarn lint`
65+
run: yarn lint

.github/workflows/publish-abi_wasm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
nix build -L .#noirc_abi_wasm
3737
3838
- name: Discover Build Output Path
39-
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV
39+
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
4040

4141
- name: Copy Build Output to Temporary Directory
4242
run: |

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,24 @@ jobs:
9595
overwrite: true
9696
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)
9797

98+
- name: Get formatted date
99+
id: date
100+
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
101+
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT
102+
103+
- name: Upload binaries to release with date tag
104+
uses: svenstaro/upload-release-action@v2
105+
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
106+
with:
107+
repo_name: noir-lang/noir
108+
repo_token: ${{ secrets.GITHUB_TOKEN }}
109+
file: ./nargo-${{ matrix.target }}.tar.gz
110+
asset_name: nargo-${{ matrix.target }}.tar.gz
111+
prerelease: true
112+
make_latest: false
113+
overwrite: true
114+
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}
115+
98116
build-linux:
99117
runs-on: ubuntu-22.04
100118
env:
@@ -162,3 +180,21 @@ jobs:
162180
asset_name: nargo-${{ matrix.target }}.tar.gz
163181
overwrite: true
164182
tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch)
183+
184+
- name: Get formatted date
185+
id: date
186+
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
187+
run: echo "date=$(date '+%Y-%m-%d')" >> $GITHUB_OUTPUT
188+
189+
- name: Upload binaries to release with date tag
190+
uses: svenstaro/upload-release-action@v2
191+
if: ${{ inputs.tag == '' && inputs.publish || github.event_name == 'schedule' }}
192+
with:
193+
repo_name: noir-lang/noir
194+
repo_token: ${{ secrets.GITHUB_TOKEN }}
195+
file: ./nargo-${{ matrix.target }}.tar.gz
196+
asset_name: nargo-${{ matrix.target }}.tar.gz
197+
prerelease: true
198+
make_latest: false
199+
overwrite: true
200+
tag: ${{ format('{0}-{1}', 'nightly', steps.date.outputs.date) }}

.github/workflows/test-integration.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
5555
- name: Build noir_wasm package
5656
run: |
57-
nix build -L .#wasm
58-
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
59-
cp -r ./result/nodejs ./compiler/wasm
60-
cp -r ./result/web ./compiler/wasm
57+
nix build -L .#noir_wasm
58+
echo "UPLOAD_PATH=$(readlink -f ./result/noir_wasm)" >> $GITHUB_ENV
59+
cp -r ./result/noir_wasm/nodejs ./compiler/wasm
60+
cp -r ./result/noir_wasm/web ./compiler/wasm
6161
6262
- name: Upload `noir_wasm` artifact
6363
uses: actions/upload-artifact@v3
@@ -69,9 +69,9 @@ jobs:
6969
- name: Build noirc_abi_wasm package
7070
run: |
7171
nix build -L .#noirc_abi_wasm
72-
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
73-
cp -r ./result/nodejs ./tooling/noirc_abi_wasm
74-
cp -r ./result/web ./tooling/noirc_abi_wasm
72+
echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
73+
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
74+
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm
7575
7676
- name: Upload `noirc_abi_wasm` artifact
7777
uses: actions/upload-artifact@v3
@@ -85,13 +85,14 @@ jobs:
8585

8686
- name: Setup `integration-tests`
8787
run: |
88-
yarn workspace @noir-lang/noir-source-resolver build
88+
yarn workspace @noir-lang/source-resolver build
89+
yarn workspace @noir-lang/noir_js build
8990
9091
- name: Run `integration-tests`
9192
run: |
9293
yarn test:integration
93-
94-
- name: Alert on nightly test failure
94+
95+
- name: Alert on nightly test failure
9596
uses: JasonEtco/create-an-issue@v2
9697
if: ${{ failure() && github.event_name == 'schedule' }}
9798
env:

.github/workflows/track-acvm.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Track ACVM for Integration Tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "Cargo.lock"
7+
- "yarn.lock"
8+
9+
jobs:
10+
check_matching_version:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Check acvm version change
17+
run: |
18+
# Extract acvm version from the current Cargo.lock
19+
CURRENT_VERSION=$(awk '/name = "acvm"/ {getline; print $3}' Cargo.lock | tr -d '"')
20+
INTEGRATION_TEST_VERSION=$(yarn workspace @noir-lang/noir_js info @noir-lang/acvm_js --json | jq .children.Version | tr -d '"')
21+
22+
echo "Current ACVM Version: $CURRENT_VERSION"
23+
echo "Integration Test ACVM Version (Noir JS): $INTEGRATION_TEST_VERSION"
24+
25+
if [ "$CURRENT_VERSION" != "$INTEGRATION_TEST_VERSION" ]; then
26+
exit 1
27+
else
28+
echo "ACVM version is a match."
29+
fi

.github/workflows/wasm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
target: [x86_64-unknown-linux-gnu]
20-
20+
2121
steps:
2222
- name: Checkout Noir repo
2323
uses: actions/checkout@v4
@@ -81,7 +81,7 @@ jobs:
8181
8282
- name: Build wasm package
8383
run: |
84-
nix build -L .#wasm
84+
nix build -L .#noir_wasm
8585
8686
- name: Export cache from nix store
8787
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }}
@@ -96,7 +96,7 @@ jobs:
9696
key: ${{ steps.cache.outputs.cache-primary-key }}
9797

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

101101
- name: Upload artifact
102102
uses: actions/upload-artifact@v3

Cargo.lock

Lines changed: 30 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)