Skip to content

Commit 14972f0

Browse files
committed
ci
1 parent 4b19222 commit 14972f0

File tree

5 files changed

+183
-34
lines changed

5 files changed

+183
-34
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Noir Nightly Canary
2+
3+
on:
4+
schedule:
5+
# Run a check at 9 AM UTC
6+
- cron: "0 9 * * *"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
permissions:
12+
issues: write
13+
14+
jobs:
15+
test:
16+
name: Test on Nargo Nightly
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout sources
20+
uses: actions/checkout@v4
21+
22+
- name: Install Nargo
23+
uses: noir-lang/[email protected]
24+
with:
25+
toolchain: nightly
26+
27+
- name: Run Noir tests
28+
run: nargo test
29+
30+
- name: Alert on dead links
31+
uses: JasonEtco/create-an-issue@v2
32+
if: ${{ failure() }}
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
WORKFLOW_NAME: ${{ github.workflow }}
36+
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
37+
with:
38+
update_existing: true
39+
filename: .github/NIGHTLY_CANARY_DIED.md
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Pull Request
2+
3+
on:
4+
merge_group:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- reopened
9+
- edited
10+
- synchronize
11+
12+
permissions:
13+
pull-requests: read
14+
15+
jobs:
16+
conventional-title:
17+
name: Validate PR title is Conventional Commit
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check title
21+
if: github.event_name == 'pull_request_target'
22+
uses: amannn/action-semantic-pull-request@v5
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
types: |
27+
fix
28+
feat
29+
chore

.github/workflows/release.yaml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,20 @@
1-
name: Release changesets
1+
name: Release
22

3-
# This workflow will be triggered on push to the main branch
4-
# on:
5-
# push:
6-
# branches:
7-
# - main
8-
# temporarly manual triggers only
93
on:
10-
workflow_dispatch:
11-
12-
concurrency: ${{ github.workflow }}-${{ github.ref }}
4+
push:
5+
branches:
6+
- main
137

148
jobs:
15-
release:
16-
name: Release
9+
release-please:
10+
name: Create Release
11+
outputs:
12+
release-pr: ${{ steps.release.outputs.pr }}
13+
tag-name: ${{ steps.release.outputs.tag_name }}
1714
runs-on: ubuntu-latest
1815
steps:
19-
- name: Checkout Repo
20-
uses: actions/checkout@v3
21-
22-
- name: Setup Node.js 20
23-
uses: actions/setup-node@v3
24-
with:
25-
node-version: 20
26-
27-
- name: Enable Corepack and Install Yarn 4
28-
run: |
29-
corepack enable
30-
yarn set version latest
31-
32-
- name: Install Dependencies
33-
run: yarn install
34-
35-
- name: Create Release Pull Request
36-
uses: changesets/action@v1
16+
- name: Run release-please
17+
id: release
18+
uses: googleapis/release-please-action@v4
3719
with:
38-
version: yarn changeset version
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
token: ${{ secrets.NOIR_RELEASES_TOKEN }}

.github/workflows/test.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Noir tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
MINIMUM_NOIR_VERSION: 1.0.0-beta.16
12+
13+
jobs:
14+
noir-version-list:
15+
name: Query supported Noir versions
16+
runs-on: ubuntu-latest
17+
outputs:
18+
noir_versions: ${{ steps.get_versions.outputs.versions }}
19+
20+
steps:
21+
- name: Checkout sources
22+
id: get_versions
23+
run: |
24+
# gh returns the Noir releases in reverse chronological order so we keep all releases published after the minimum supported version.
25+
VERSIONS=$(gh release list -R noir-lang/noir --exclude-pre-releases --json tagName -q 'map(.tagName) | index(env.MINIMUM_NOIR_VERSION) as $index | if $index then .[0:$index+1] else [env.MINIMUM_NOIR_VERSION] end')
26+
echo "versions=$VERSIONS"
27+
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
28+
env:
29+
GH_TOKEN: ${{ github.token }}
30+
31+
test:
32+
needs: [noir-version-list]
33+
name: Test on Nargo ${{matrix.toolchain}}
34+
runs-on: ubuntu-latest
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
toolchain: ${{ fromJson( needs.noir-version-list.outputs.noir_versions )}}
39+
include:
40+
- toolchain: nightly
41+
steps:
42+
- name: Checkout sources
43+
uses: actions/checkout@v4
44+
45+
- name: Install Nargo
46+
uses: noir-lang/[email protected]
47+
with:
48+
toolchain: ${{ matrix.toolchain }}
49+
50+
- name: Run Noir tests
51+
run: nargo test
52+
53+
rust-equivalence-tests:
54+
name: Test for equivalence against Rust impl
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout sources
58+
uses: actions/checkout@v4
59+
60+
- name: Install Nargo
61+
uses: noir-lang/[email protected]
62+
with:
63+
toolchain: ${{ env.MINIMUM_NOIR_VERSION }}
64+
65+
format:
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Checkout sources
69+
uses: actions/checkout@v4
70+
71+
- name: Install Nargo
72+
uses: noir-lang/[email protected]
73+
with:
74+
toolchain: ${{ env.MINIMUM_NOIR_VERSION }}
75+
76+
- name: Run formatter
77+
run: nargo fmt --check
78+
79+
# This is a job which depends on all test jobs and reports the overall status.
80+
# This allows us to add/remove test jobs without having to update the required workflows.
81+
tests-end:
82+
name: Noir End
83+
runs-on: ubuntu-latest
84+
# We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping.
85+
if: ${{ always() }}
86+
needs:
87+
- test
88+
- rust-equivalence-tests
89+
- format
90+
91+
steps:
92+
- name: Report overall success
93+
run: |
94+
if [[ $FAIL == true ]]; then
95+
exit 1
96+
else
97+
exit 0
98+
fi
99+
env:
100+
# We treat any cancelled, skipped or failing jobs as a failure for the workflow as a whole.
101+
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}

ethereum/circuits/lib/src/serde_test.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ mod nodes {
130130
use crate::merkle_patricia_proofs::proof::MAX_NODE_LEN;
131131
use crate::misc::arrays::sub_array_equals;
132132
use crate::serde::{deserialize_receipt_nodes, serialize_receipt_nodes};
133-
s
133+
134134
#[test]
135135
fn simple() {
136136
let nodes = proof_input.proof.nodes;

0 commit comments

Comments
 (0)