forked from noir-lang/acvm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Bring
acvm_js
package into the workspace (noir-lang#459)
Co-authored-by: Tom French <[email protected]> Co-authored-by: Tom French <[email protected]> Co-authored-by: Savio <[email protected]> Co-authored-by: Globallager <[email protected]> Co-authored-by: Álvaro Rodríguez <[email protected]> Co-authored-by: jonybur <[email protected]> Co-authored-by: kevaundray <[email protected]> Co-authored-by: vezenovm <[email protected]> Co-authored-by: Maddiaa <[email protected]>
- Loading branch information
1 parent
0f28784
commit 85b9adc
Showing
59 changed files
with
11,245 additions
and
12 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,20 @@ | ||
# Based on https://github.com/direnv/direnv-vscode/blob/158e8302c2594cc0eaa5f8b4f0cafedd4e1c0315/.envrc | ||
|
||
# You can define your system-specific logic (like Git settings or GH tokens) in .envrc.local | ||
# If that logic is usable by other people and might improve development environment, consider | ||
# contributing it to this file! | ||
|
||
source_env_if_exists .envrc.local | ||
|
||
if [[ -z "${SKIP_NIX:-}" ]] && has nix; then | ||
|
||
if nix flake metadata &>/dev/null && has use_flake; then | ||
# use flakes if possible | ||
use flake | ||
|
||
else | ||
# Otherwise fall back to pure nix | ||
use nix | ||
fi | ||
|
||
fi |
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,22 @@ | ||
name: Yarn Cache and Install | ||
description: Installs dependencies and caches them | ||
|
||
inputs: | ||
working-directory: | ||
default: ./ | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: "**/node_modules" | ||
key: yarn-v1-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install | ||
working-directory: ${{ inputs.working-directory }} | ||
run: 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
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,93 @@ | ||
name: Test acvm_js | ||
|
||
on: [push, pull_request] | ||
|
||
# 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: | ||
build-acvm-js-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-22.11 | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: barretenberg | ||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | ||
|
||
- name: Build acvm-js | ||
run: | | ||
nix build .# | ||
- name: Dereference symlink | ||
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: acvm-js | ||
path: ${{ env.UPLOAD_PATH }} | ||
retention-days: 3 | ||
|
||
test-acvm_js-node: | ||
needs: [build-acvm-js-package] | ||
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: acvm-js | ||
path: ./result | ||
|
||
- name: Set up test environment | ||
uses: ./.github/actions/setup | ||
with: | ||
working-directory: ./acvm_js | ||
|
||
- name: Run node tests | ||
working-directory: ./acvm_js | ||
run: yarn test | ||
|
||
test-acvm_js-browser: | ||
needs: [build-acvm-js-package] | ||
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: acvm-js | ||
path: ./result | ||
|
||
- name: Set up test environment | ||
uses: ./.github/actions/setup | ||
with: | ||
working-directory: ./acvm_js | ||
|
||
- name: Install playwright deps | ||
working-directory: ./acvm_js | ||
run: | | ||
npx playwright install | ||
npx playwright install-deps | ||
- name: Run browser tests | ||
working-directory: ./acvm_js | ||
run: 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: Typescript | ||
|
||
on: [push, pull_request] | ||
|
||
# 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: | ||
eslint: | ||
name: Eslint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
with: | ||
working-directory: ./acvm_js | ||
|
||
- name: Run eslint | ||
working-directory: ./acvm_js | ||
run: yarn lint |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
/target | ||
.DS_Store | ||
.vscode | ||
Cargo.lock | ||
# Cargo.lock | ||
result | ||
outputs/ | ||
.direnv |
Oops, something went wrong.