-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:noir-lang/noir into jb/update-npm…
…-token
- Loading branch information
Showing
1,122 changed files
with
6,013 additions
and
917 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "nightly test-integration failed" | ||
assignees: kobyhallx, phated, tomafrench, jonybur | ||
labels: bug | ||
--- | ||
|
||
Something broke our nightly integration test. | ||
|
||
Check the [test]({{env.WORKFLOW_URL}}) workflow for details. | ||
|
||
This issue was raised by the workflow `{{env.WORKFLOW_NAME}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Clippy | ||
|
||
on: | ||
pull_request: | ||
merge_group: | ||
push: | ||
branches: | ||
- master | ||
|
||
# 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: | ||
clippy: | ||
name: cargo clippy | ||
runs-on: ${{ matrix.runner }} | ||
timeout-minutes: 30 | ||
env: | ||
CACHED_PATHS: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- runner: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore cargo cache | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
with: | ||
path: ${{ env.CACHED_PATHS }} | ||
key: ${{ matrix.target }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Setup toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable # We do not use MSRV so we can benefit from newer lints | ||
targets: ${{ matrix.target }} | ||
components: clippy, rustfmt | ||
|
||
- name: Run `cargo clippy` | ||
run: cargo clippy --workspace --locked --release | ||
|
||
- name: Run `cargo fmt` | ||
run: cargo fmt --all --check | ||
|
||
- uses: actions/cache/save@v3 | ||
# Write a cache entry even if the tests fail but don't create any for the merge queue. | ||
if: ${{ always() && steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }} | ||
with: | ||
path: ${{ env.CACHED_PATHS }} | ||
key: ${{ steps.cache.outputs.cache-primary-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: test-integration | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 2 * * *" # Run nightly at 2 AM UTC | ||
|
||
jobs: | ||
wasm-packages-build-test: | ||
runs-on: ubuntu-latest | ||
env: | ||
CACHED_PATH: /tmp/nix-cache | ||
|
||
steps: | ||
- name: Checkout noir sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout acvm sources | ||
uses: actions/checkout@v3 # v3 is needed here otherwise this fails in local execution | ||
with: | ||
repository: noir-lang/acvm | ||
path: acvm | ||
|
||
- name: Setup Nix | ||
uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-23.05 | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: barretenberg | ||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
|
||
- name: Restore nix store cache | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
with: | ||
path: ${{ env.CACHED_PATH }} | ||
key: ${{ runner.os }}-flake-wasm-${{ hashFiles('*.lock') }} | ||
|
||
# Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26 | ||
- name: Copy cache into nix store | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
# We don't check the signature because we're the one that created the cache | ||
run: | | ||
for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do | ||
path=$(head -n 1 "$narinfo" | awk '{print $2}') | ||
nix copy --no-check-sigs --from "file://${{ env.CACHED_PATH }}" "$path" | ||
done | ||
- name: Build noir_wasm package | ||
run: | | ||
nix build -L .#wasm | ||
mkdir -p ./.packages/noir_wasm | ||
cp -r ./result/* ./.packages/noir_wasm/ | ||
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV | ||
- name: Upload `noir_wasm` artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: noir_wasm | ||
path: ${{ env.UPLOAD_PATH }} | ||
retention-days: 3 | ||
|
||
- name: Build noirc_abi_wasm package | ||
run: | | ||
nix build -L .#noirc_abi_wasm | ||
mkdir -p ./.packages/noirc_abi_wasm | ||
cp -r ./result/* ./.packages/noirc_abi_wasm/ | ||
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV | ||
- name: Upload `noirc_abi_wasm` artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: noirc_abi_wasm | ||
path: ${{ env.UPLOAD_PATH }} | ||
retention-days: 3 | ||
|
||
- name: Build `acvm_js` package | ||
working-directory: ./acvm | ||
run: | | ||
nix build -L .# | ||
mkdir -p ../.packages/acvm_js | ||
cp -r ./result/* ../.packages/acvm_js/ | ||
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV | ||
- name: Upload `acvm_js` artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: acvm_js | ||
path: ${{ env.UPLOAD_PATH }} | ||
retention-days: 3 | ||
|
||
- name: Install `integration-tests` dependencies | ||
working-directory: ./compiler/integration-tests | ||
run: yarn install | ||
|
||
- name: Run `integration-tests` | ||
working-directory: ./compiler/integration-tests | ||
run: | | ||
yarn test:browser | ||
- name: Alert on nightly test failure | ||
uses: JasonEtco/create-an-issue@v2 | ||
if: ${{ failure() && github.event_name == 'schedule' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WORKFLOW_NAME: ${{ github.workflow }} | ||
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
with: | ||
update_existing: true | ||
filename: .github/NIGHTLY_TEST_FAILURE.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.