Skip to content

Commit 0b45d24

Browse files
authored
chore: add CI (#1)
1 parent 2a4b49c commit 0b45d24

File tree

10 files changed

+98
-12
lines changed

10 files changed

+98
-12
lines changed

.github/NIGHTLY_CANARY_DIED.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Tests fail on latest Nargo nightly release"
3+
assignees: TomAFrench
4+
---
5+
6+
The tests on this Noir project have started failing when using the latest nightly release of the Noir compiler. This likely means that there have been breaking changes for which this project needs to be updated to take into account.
7+
8+
Check the [{{env.WORKFLOW_NAME}}]({{env.WORKFLOW_URL}}) workflow for details.

.github/workflows/nightly-canary.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 ${{matrix.toolchain}}
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: Run formatter
31+
run: nargo fmt --check
32+
33+
- name: Alert on dead links
34+
uses: JasonEtco/create-an-issue@v2
35+
if: ${{ failure() }}
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
WORKFLOW_NAME: ${{ github.workflow }}
39+
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
40+
with:
41+
update_existing: true
42+
filename: .github/NIGHTLY_CANARY_DIED.md
43+

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
12+
jobs:
13+
test:
14+
name: Test on Nargo ${{matrix.toolchain}}
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
toolchain: [nightly, 0.32.0]
20+
steps:
21+
- name: Checkout sources
22+
uses: actions/checkout@v4
23+
24+
- name: Install Nargo
25+
uses: noir-lang/[email protected]
26+
with:
27+
toolchain: ${{ matrix.toolchain }}
28+
29+
- name: Run Noir tests
30+
run: nargo test
31+
32+
format:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout sources
36+
uses: actions/checkout@v4
37+
38+
- name: Install Nargo
39+
uses: noir-lang/[email protected]
40+
with:
41+
toolchain: 0.32.0
42+
43+
- name: Run formatter
44+
run: nargo fmt --check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

info.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

out.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/_string_tools/slice_packed_field.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ global PATH_LOOKUP: [[bool; 5]; 32] = [
372372
unconstrained fn __slice_field(f: Field, num_bytes: Field) -> [Field; 5] {
373373
let head_path = PATH_LOOKUP[num_bytes];
374374
let bytes = f.to_be_bytes(32);
375-
let bytes = bytes.map(|b| b as Field);
375+
let bytes = bytes.map(|b: u8| b as Field);
376376

377377
let mut chunks: [Field; 5] = [0; 5];
378378
let mut head_ptr = 1;

src/lib.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,4 +1020,4 @@ mod JSON16kb {
10201020
self.inner.get_keys_at_root()
10211021
}
10221022
}
1023-
}
1023+
}

target/json_parser.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

target/noir_json.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)