forked from noir-lang/noir
-
Notifications
You must be signed in to change notification settings - Fork 0
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' into save_nightly_releases
- Loading branch information
Showing
1,491 changed files
with
46,188 additions
and
21,353 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,4 @@ | ||
contact_links: | ||
- name: Ideas | ||
url: https://github.com/orgs/noir-lang/discussions/new?category=ideas | ||
about: Share ideas for new features |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Setup | ||
|
||
inputs: | ||
working-directory: | ||
default: ./ | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.15 | ||
- name: Cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: "**/node_modules" | ||
key: yarn-v1-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install | ||
run: | | ||
cd ${{ inputs.working-directory }} | ||
yarn --immutable | ||
shell: bash | ||
if: steps.cache.outputs.cache-hit != 'true' |
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,138 @@ | ||
name: ABI Wasm test | ||
|
||
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: | ||
noirc-abi-wasm-build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CACHED_PATH: /tmp/nix-cache | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-23.05 | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Restore nix store cache | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
with: | ||
path: ${{ env.CACHED_PATH }} | ||
key: ${{ runner.os }}-flake-abi-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 noirc_abi_wasm | ||
run: | | ||
nix build -L .#noirc_abi_wasm | ||
- name: Export cache from nix store | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }} | ||
run: | | ||
nix copy --to "file://${{ env.CACHED_PATH }}?compression=zstd¶llel-compression=true" .#noirc-abi-wasm-cargo-artifacts | ||
- uses: actions/cache/save@v3 | ||
# Don't create cache entries for the merge queue. | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' && github.event_name != 'merge_group' }} | ||
with: | ||
path: ${{ env.CACHED_PATH }} | ||
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
|
||
- name: Dereference symlink | ||
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: noirc_abi_wasm | ||
path: ${{ env.UPLOAD_PATH }} | ||
retention-days: 10 | ||
|
||
noirc-abi-wasm-test-node: | ||
needs: [noirc-abi-wasm-build] | ||
name: Node.js Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: noirc_abi_wasm | ||
path: ./result | ||
|
||
- name: Set up test environment | ||
uses: ./.github/actions/setup | ||
with: | ||
working-directory: ./tooling/noirc_abi_wasm | ||
|
||
- name: Run node tests | ||
working-directory: ./tooling/noirc_abi_wasm | ||
run: yarn install && yarn test | ||
|
||
noirc-abi-wasm-test-browser: | ||
needs: [noirc-abi-wasm-build] | ||
name: Browser Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: noirc_abi_wasm | ||
path: ./result | ||
|
||
- name: Query playwright version | ||
working-directory: ./tooling/noirc_abi_wasm | ||
run: echo "PLAYWRIGHT_VERSION=$(yarn info @web/test-runner-playwright --json | jq .children.Version)" >> $GITHUB_ENV | ||
|
||
- name: Cache playwright binaries | ||
uses: actions/cache@v3 | ||
id: playwright-cache | ||
with: | ||
path: | | ||
~/.cache/ms-playwright | ||
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | ||
|
||
- name: Set up test environment | ||
uses: ./.github/actions/setup | ||
with: | ||
working-directory: ./tooling/noirc_abi_wasm | ||
|
||
- name: Install playwright deps | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
working-directory: ./tooling/noirc_abi_wasm | ||
run: | | ||
npx playwright install | ||
npx playwright install-deps | ||
- name: Run browser tests | ||
working-directory: ./tooling/noirc_abi_wasm | ||
run: yarn install && yarn test:browser |
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,26 @@ | ||
name: deny | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: [Cargo.lock] | ||
pull_request: | ||
branches: [master] | ||
paths: [Cargo.lock] | ||
merge_group: | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
CARGO_TERM_COLOR: always | ||
|
||
concurrency: deny-${{ github.head_ref || github.run_id }} | ||
|
||
jobs: | ||
deny: | ||
name: deny | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check all |
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,49 @@ | ||
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 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- runner: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- 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 | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: ${{ matrix.target }} | ||
cache-on-failure: true | ||
save-if: ${{ github.event_name != 'merge_group' }} | ||
|
||
- name: Run `cargo clippy` | ||
run: cargo clippy --workspace --locked --release | ||
|
||
- name: Run `cargo fmt` | ||
run: cargo fmt --all --check |
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,46 @@ | ||
name: Publish ABI Wasm | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
noirc-abi-wasm-build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CACHED_PATH: /tmp/nix-cache | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
registry-url: "https://registry.npmjs.org" | ||
node-version: 18.15 | ||
|
||
- uses: cachix/install-nix-action@v22 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-23.05 | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build noirc_abi_wasm | ||
run: | | ||
nix build -L .#noirc_abi_wasm | ||
- name: Discover Build Output Path | ||
run: echo "BUILD_OUTPUT_PATH=$(readlink -f ./result)" >> $GITHUB_ENV | ||
|
||
- name: Copy Build Output to Temporary Directory | ||
run: | | ||
mkdir temp_publish_dir | ||
cp -r ${{ env.BUILD_OUTPUT_PATH }}/* temp_publish_dir/ | ||
- name: Publish to NPM | ||
working-directory: ./temp_publish_dir | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |
Oops, something went wrong.