chore(deps): bump fflate from 0.4.8 to 0.4.9 in /docs #48048
Workflow file for this run
This file contains hidden or 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
| name: Javascript Tests | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - master | |
| permissions: {} | |
| # 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 | |
| # Authenticate cargo-binstall's GitHub API requests (run by `just build-package` | |
| # via install-js-tools). Unauthenticated they hit GitHub's 60 req/hour limit, get | |
| # 403, and binstall falls back to compiling the wasm toolchain from source — | |
| # turning a ~30s step into minutes. A valid token raises the limit to 5000/hour; | |
| # it needs no permission scopes for this (only public release metadata is read). | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| critical-library-list: | |
| name: Load critical library list | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| outputs: | |
| libraries: ${{ steps.get_critical_libraries.outputs.libraries }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Build list of libraries | |
| id: get_critical_libraries | |
| run: | | |
| set -euo pipefail | |
| LIBRARIES=$(yq ./EXTERNAL_NOIR_LIBRARIES.yml -o json | jq -c '.libraries | map({ repo, ref, path: (.path // ""), timeout:(.timeout // 2), nargo_args })') | |
| if [ -z "$LIBRARIES" ] || [ "$LIBRARIES" = "null" ]; then | |
| echo "::error::Failed to parse EXTERNAL_NOIR_LIBRARIES.yml — got empty or null library list" | |
| exit 1 | |
| fi | |
| NUM_LIBS=$(echo "$LIBRARIES" | jq 'length') | |
| if [ "$NUM_LIBS" -eq 0 ]; then | |
| echo "::error::EXTERNAL_NOIR_LIBRARIES.yml parsed successfully but contains no libraries" | |
| exit 1 | |
| fi | |
| echo "Parsed $NUM_LIBS libraries from EXTERNAL_NOIR_LIBRARIES.yml" | |
| echo "libraries=$LIBRARIES" | |
| echo "libraries=$LIBRARIES" >> $GITHUB_OUTPUT | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| yarn-lock: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # Errors if installation would result in modifications to yarn.lock | |
| - name: Install | |
| run: yarn --immutable | |
| shell: bash | |
| build-binaries: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - name: nargo | |
| package: nargo_cli | |
| - name: noir-execute | |
| package: noir_artifact_cli | |
| - name: noir-ssa | |
| package: noir_ssa_cli | |
| - name: noir-profiler | |
| package: noir_profiler | |
| name: Build ${{ matrix.name }} | |
| steps: | |
| - name: Checkout Noir repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@1.89.0 | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| key: x86_64-unknown-linux-gnu | |
| cache-on-failure: true | |
| save-if: ${{ github.event_name != 'merge_group' }} | |
| - name: Build ${{ matrix.name }} | |
| run: cargo build --package ${{ matrix.package }} --release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: ./target/release/${{ matrix.name }} | |
| retention-days: 3 | |
| build-noirc-abi: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout Noir repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@1.89.0 | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| key: noirc-abi | |
| cache-on-failure: true | |
| save-if: ${{ github.event_name != 'merge_group' }} | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - uses: taiki-e/install-action@just | |
| - name: Build noirc_abi | |
| run: just build-package @noir-lang/noirc_abi | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: noirc_abi_wasm | |
| path: | | |
| ./tooling/noirc_abi_wasm/nodejs | |
| ./tooling/noirc_abi_wasm/web | |
| retention-days: 10 | |
| build-noir-wasm: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@1.89.0 | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| key: noir-wasm | |
| cache-on-failure: true | |
| save-if: ${{ github.event_name != 'merge_group' }} | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - uses: taiki-e/install-action@just | |
| - name: Build noir_js_types | |
| run: just build-package @noir-lang/types | |
| - name: Build noir_wasm | |
| run: just build-package @noir-lang/noir_wasm | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: noir_wasm | |
| path: | | |
| ./compiler/wasm/dist | |
| ./compiler/wasm/build | |
| retention-days: 3 | |
| build-acvm-js: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup toolchain | |
| uses: dtolnay/rust-toolchain@1.89.0 | |
| - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2 | |
| with: | |
| key: acvm-js | |
| cache-on-failure: true | |
| save-if: ${{ github.event_name != 'merge_group' }} | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - uses: taiki-e/install-action@just | |
| - name: Build acvm_js | |
| run: just build-package @noir-lang/acvm_js | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: acvm-js | |
| path: | | |
| ./acvm-repo/acvm_js/nodejs | |
| ./acvm-repo/acvm_js/web | |
| retention-days: 3 | |
| test-acvm_js-node: | |
| needs: [build-acvm-js] | |
| name: ACVM JS (Node.js) | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: acvm-js | |
| path: ./acvm-repo/acvm_js | |
| - name: Set up test environment | |
| uses: ./.github/actions/setup | |
| - name: Run node tests | |
| run: yarn workspace @noir-lang/acvm_js test | |
| # Reads the Playwright version out of yarn.lock once for the whole workflow. | |
| # It has to be a separate job rather than a step in each consumer: the | |
| # `test-acvm_js-browser` container image is resolved before any step of that | |
| # job runs, so the version can only reach it as a `needs` output. | |
| playwright-version: | |
| name: Resolve Playwright version | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| outputs: | |
| version: ${{ steps.playwright.outputs.version }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # Resolve into a variable first. Inlining the substitution into the `echo` | |
| # would hand the step `echo`'s exit status, so a failed resolve would | |
| # publish an empty version and let every dependant start. | |
| - name: Resolve Playwright version | |
| id: playwright | |
| run: | | |
| set -euo pipefail | |
| version="$(./scripts/playwright_version.sh)" | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| test-acvm_js-browser: | |
| needs: [build-acvm-js, playwright-version] | |
| name: ACVM JS (Browser) | |
| runs-on: ubuntu-22.04 | |
| # Playwright's WebKit build needs a chunk of Ubuntu system libraries that | |
| # `install-deps` fetches from the Azure apt mirror at job time. Those | |
| # mirrors intermittently fail to fully install (see the | |
| # `##[warning]playwright install-deps failed; continuing` step, followed by | |
| # `browserType.launch: Target page, context or browser has been closed` | |
| # for every WebKit test). Running inside Playwright's official container | |
| # takes the apt round-trip out of the job entirely: the browsers and their | |
| # system libs are already baked into the image, so `install-deps` doesn't | |
| # run and can't flake. Tag tracks the Playwright version yarn.lock resolves | |
| # so the browsers match the driver. | |
| container: | |
| image: mcr.microsoft.com/playwright:v${{ needs.playwright-version.outputs.version }}-jammy | |
| options: --user root | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: acvm-js | |
| path: ./acvm-repo/acvm_js | |
| - name: Set up test environment | |
| uses: ./.github/actions/setup | |
| - name: Run browser tests | |
| uses: ./.github/actions/retry | |
| with: | |
| run: yarn workspace @noir-lang/acvm_js test:browser | |
| test-noirc-abi: | |
| needs: [build-noirc-abi, playwright-version] | |
| name: noirc_abi | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download wasm package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noirc_abi_wasm | |
| path: ./tooling/noirc_abi_wasm | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - name: Run node tests | |
| run: yarn workspace @noir-lang/noirc_abi test | |
| - name: Install Playwright | |
| uses: ./.github/actions/install-playwright | |
| with: | |
| playwright-version: ${{ needs.playwright-version.outputs.version }} | |
| - name: Run browser tests | |
| uses: ./.github/actions/retry | |
| with: | |
| run: yarn workspace @noir-lang/noirc_abi test:browser | |
| test-noir-js: | |
| needs: [build-binaries, build-acvm-js, build-noirc-abi] | |
| name: Noir JS | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: acvm-js | |
| path: ./acvm-repo/acvm_js | |
| - name: Download wasm package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noirc_abi_wasm | |
| path: ./tooling/noirc_abi_wasm | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - uses: taiki-e/install-action@just | |
| - name: Build noir_js_types | |
| run: just build-package @noir-lang/types | |
| - name: Run noir_js tests | |
| run: | | |
| just build-package @noir-lang/noir_js | |
| yarn workspace @noir-lang/noir_js test | |
| test-noir-wasm: | |
| needs: [build-noir-wasm, build-binaries, playwright-version] | |
| name: noir_wasm | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download wasm package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noir_wasm | |
| path: ./compiler/wasm | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Build fixtures | |
| run: yarn workspace @noir-lang/noir_wasm test:build_fixtures | |
| - name: Install Playwright | |
| uses: ./.github/actions/install-playwright | |
| with: | |
| playwright-version: ${{ needs.playwright-version.outputs.version }} | |
| - name: Run node tests | |
| run: yarn workspace @noir-lang/noir_wasm test:node | |
| - name: Run browser tests | |
| uses: ./.github/actions/retry | |
| with: | |
| run: yarn workspace @noir-lang/noir_wasm test:browser | |
| test-noir-codegen: | |
| needs: [build-acvm-js, build-noirc-abi, build-binaries] | |
| name: noir_codegen | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Download acvm_js package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: acvm-js | |
| path: ./acvm-repo/acvm_js | |
| - name: Download noirc_abi package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noirc_abi_wasm | |
| path: ./tooling/noirc_abi_wasm | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - uses: taiki-e/install-action@just | |
| - name: Build noir_js_types | |
| run: just build-package @noir-lang/types | |
| - name: Build noir_js | |
| run: just build-package @noir-lang/noir_js | |
| - name: Run noir_codegen tests | |
| run: yarn workspace @noir-lang/noir_codegen test | |
| test-integration-node: | |
| name: Integration Tests (Node) | |
| runs-on: ubuntu-24.04 | |
| needs: [build-acvm-js, build-noir-wasm, build-binaries, build-noirc-abi] | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install `bb` | |
| run: | | |
| ./scripts/install_bb.sh | |
| echo "$HOME/.bb/" >> $GITHUB_PATH | |
| sudo apt-get install libc6 libstdc++6 -y | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Download acvm_js package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: acvm-js | |
| path: ./acvm-repo/acvm_js | |
| - name: Download noir_wasm package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noir_wasm | |
| path: ./compiler/wasm | |
| - name: Download noirc_abi package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noirc_abi_wasm | |
| path: ./tooling/noirc_abi_wasm | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - name: Setup `integration-tests` | |
| run: | | |
| # Note the lack of spaces between package names. | |
| PACKAGES_TO_BUILD="@noir-lang/types,@noir-lang/noir_js" | |
| yarn workspaces foreach -Wvtp --from "{$PACKAGES_TO_BUILD}" run build | |
| - name: Run `integration-tests` | |
| working-directory: ./compiler/integration-tests | |
| run: | | |
| yarn test:node | |
| # TODO(https://github.com/noir-lang/noir/issues/9935): These tests are currently broken as they are currently written | |
| # We have other browser tests under `examples/browser`, but it would be good to get these working again. | |
| # test-integration-browser: | |
| # name: Integration Tests (Browser) | |
| # runs-on: ubuntu-22.04 | |
| # needs: [build-acvm-js, build-noir-wasm, build-noirc-abi] | |
| # timeout-minutes: 30 | |
| # permissions: | |
| # contents: read | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| # - name: Download acvm_js package artifact | |
| # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| # with: | |
| # name: acvm-js | |
| # path: ./acvm-repo/acvm_js | |
| # - name: Download noir_wasm package artifact | |
| # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| # with: | |
| # name: noir_wasm | |
| # path: ./compiler/wasm | |
| # - name: Download noirc_abi package artifact | |
| # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| # with: | |
| # name: noirc_abi_wasm | |
| # path: ./tooling/noirc_abi_wasm | |
| # - name: Install Yarn dependencies | |
| # uses: ./.github/actions/setup | |
| # - uses: taiki-e/install-action@just | |
| # - name: Install Playwright | |
| # run: just install-playwright | |
| # - name: Setup `integration-tests` | |
| # run: | | |
| # # Note the lack of spaces between package names. | |
| # PACKAGES_TO_BUILD="@noir-lang/types,@noir-lang/noir_js" | |
| # yarn workspaces foreach -Wvtp --from "{$PACKAGES_TO_BUILD}" run build | |
| # - name: Run `integration-tests` | |
| # working-directory: ./compiler/integration-tests | |
| # run: | | |
| # yarn test:browser | |
| test-examples: | |
| name: Example scripts | |
| runs-on: ubuntu-24.04 | |
| needs: [build-binaries, build-acvm-js, build-noirc-abi, playwright-version] | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@908c540300062bd5a7e473851cdb4282204cee09 # v1.9.1 | |
| with: | |
| version: v1.3.3 | |
| - name: Install Yarn dependencies | |
| uses: ./.github/actions/setup | |
| - name: Install Playwright | |
| uses: ./.github/actions/install-playwright | |
| with: | |
| playwright-version: ${{ needs.playwright-version.outputs.version }} | |
| - uses: taiki-e/install-action@just | |
| - name: Install `bb` | |
| run: | | |
| ./scripts/install_bb.sh | |
| echo "$HOME/.bb/" >> $GITHUB_PATH | |
| sudo apt-get install libc6 libstdc++6 -y | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Download noir-execute binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: noir-execute | |
| - name: Download noir-ssa binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: noir-ssa | |
| - name: Download noir-profiler binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: noir-profiler | |
| - name: Download acvm_js package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: acvm-js | |
| path: ./acvm-repo/acvm_js | |
| - name: Download noirc_abi package artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: noirc_abi_wasm | |
| path: ./tooling/noirc_abi_wasm | |
| - name: Build noir_js | |
| # @noir-lang/types and @noir-lang/noir_js are pure TypeScript (tsc) and | |
| # don't need the wasm toolchain that `just build-package` installs via | |
| # install-js-tools; the wasm packages they depend on are downloaded as | |
| # prebuilt artifacts above. Build them directly to skip that install. | |
| run: | | |
| yarn workspace @noir-lang/types build | |
| yarn workspace @noir-lang/noir_js build | |
| - name: Run examples | |
| run: just run-examples | |
| external-repo-checks: | |
| needs: [build-binaries, critical-library-list] | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJson( needs.critical-library-list.outputs.libraries )}} | |
| name: Check external repo - ${{ matrix.repo }}/${{ matrix.path }} | |
| env: | |
| OUTPUT_FILE: ${{ github.workspace }}/.github/critical_libraries_status/${{ matrix.repo }}/${{ matrix.path }}.actual.jsonl | |
| steps: | |
| - name: Matrix Info | |
| run: | | |
| echo "repo: ${{ matrix.repo }}" | |
| echo "ref: ${{ matrix.ref }}" | |
| echo "path: ${{ matrix.path }}" | |
| echo "timeout: ${{ matrix.timeout }}" | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: ${{ matrix.repo }} | |
| path: test-repo | |
| ref: ${{ matrix.ref }} | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Generate paths | |
| id: test_report_name | |
| run: | | |
| # Replace any slashes with underscores | |
| NAME=${NAME//\//_} | |
| TEST_REPORT_NAME=test_report_$NAME | |
| echo "test_report_name=$TEST_REPORT_NAME" >> $GITHUB_OUTPUT | |
| env: | |
| NAME: ${{ matrix.repo }}/${{ matrix.path }} | |
| - name: Run nargo test | |
| run: | | |
| # Github actions seems to not expand "**" in globs by default. | |
| shopt -s globstar | |
| .github/scripts/run-external-repo-tests.sh | |
| env: | |
| REPO_DIR: ./test-repo | |
| PROJECT_PATH: ${{ matrix.path }} | |
| NARGO_IGNORE_TEST_FAILURES_FROM_FOREIGN_CALLS: true | |
| NARGO_ARGS: ${{ matrix.nargo_args }} | |
| NAME: ${{ steps.test_report_name.outputs.test_report_name }} | |
| BENCHMARK_FILE: ${{ steps.test_report_name.outputs.test_report_name }}.json | |
| - name: Compare test results | |
| run: .github/scripts/check_test_results.sh .github/critical_libraries_status/${{ matrix.repo }}/${{ matrix.path }}.failures.jsonl .github/critical_libraries_status/${{ matrix.repo }}/${{ matrix.path }}.actual.jsonl | |
| - name: Upload test report | |
| if: ${{ matrix.timeout > 20 }} # We want to avoid recording benchmarking for a ton of tiny libraries, these should be covered with aggressive timeouts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: ${{ steps.test_report_name.outputs.test_report_name }} | |
| path: ${{ steps.test_report_name.outputs.test_report_name }}.json | |
| retention-days: 3 | |
| overwrite: true | |
| - name: Check test time limit | |
| run: | | |
| TIME=$(jq '.[0].value' ${{ steps.test_report_name.outputs.test_report_name }}.json) | |
| if awk 'BEGIN{exit !(ARGV[1]>ARGV[2])}' "$TIME" "${{ matrix.timeout }}"; then | |
| # Don't bump this timeout without understanding why this has happened and confirming that you're not the cause. | |
| echo "Failing due to test suite exceeding timeout..." | |
| echo "Timeout: ${{ matrix.timeout }}" | |
| echo "Test suite took: $TIME". | |
| exit 1 | |
| fi | |
| compile-noir-contracts: | |
| name: Compile `noir-contracts` zero inliner aggressiveness | |
| needs: [build-binaries] | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| # Note that we are checking out into a sub-directory, which affects action paths. | |
| path: noir-repo | |
| - name: Resolve pinned aztec-packages commit | |
| id: aztec-commit | |
| run: echo "commit=$(yq '.define' ./noir-repo/EXTERNAL_NOIR_LIBRARIES.yml)" >> "$GITHUB_OUTPUT" | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: AztecProtocol/aztec-packages | |
| ref: ${{ steps.aztec-commit.outputs.commit }} | |
| path: test-repo | |
| - name: Download nargo binary | |
| uses: ./noir-repo/.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: Remove requirements on compiler version | |
| working-directory: ./test-repo | |
| run: | | |
| # Github actions seems to not expand "**" in globs by default. | |
| shopt -s globstar | |
| sed -i '/^compiler_version/d' ./**/Nargo.toml | |
| - name: Run nargo compile | |
| working-directory: ./test-repo/noir-projects/labs/noir-contracts | |
| run: nargo compile --inliner-aggressiveness 0 | |
| upload_critical_library_report: | |
| name: Upload critical library report | |
| needs: [external-repo-checks] | |
| # We want this job to run even if one variation of the matrix in `external-repo-checks` fails | |
| if: always() | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| pull-requests: write | |
| # deployments permission to deploy GitHub pages website | |
| deployments: write | |
| # contents permission to update benchmark contents in gh-pages branch | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download matrix test reports | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| pattern: test_report_* | |
| path: ./reports | |
| merge-multiple: true | |
| - name: Merge test reports using jq | |
| run: | | |
| # Github actions seems to not expand "**" in globs by default. | |
| shopt -s globstar | |
| jq --slurp '. | flatten' ./reports/* | tee test_bench.json | |
| - name: Store benchmark result | |
| # We don't run this step on external PRs | |
| if: github.ref == 'refs/heads/master' || github.event.pull_request.head.repo.full_name == github.repository | |
| uses: benchmark-action/github-action-benchmark@52576c92bccf6ac60c8223ec7eb2565637cae9ba | |
| with: | |
| name: "Test Suite Duration" | |
| tool: "customSmallerIsBetter" | |
| output-file-path: ./test_bench.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| # We want this to only run on master to avoid garbage data from PRs being added. | |
| auto-push: ${{ github.ref == 'refs/heads/master' }} | |
| alert-threshold: "120%" | |
| comment-on-alert: false | |
| comment-always: ${{ contains( github.event.pull_request.labels.*.name, 'bench-show') }} | |
| fail-on-alert: false | |
| max-items-in-chart: 50 | |
| test-nargo-doc: | |
| needs: [build-binaries] | |
| name: Nargo doc | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Download nargo binary | |
| uses: ./.github/actions/download-binary | |
| with: | |
| name: nargo | |
| - name: nargo doc on stdlib | |
| working-directory: ./noir_stdlib | |
| run: | | |
| nargo doc | |
| rm -rf ./docs | |
| mv ./target/docs . | |
| if ! git diff --exit-code; then | |
| echo "nargo doc produced changes on noir_stdlib. Please run `just stdlib-doc`, then commit and push any changes." | |
| exit 1 | |
| fi | |
| # This is a job which depends on all test jobs and reports the overall status. | |
| # This allows us to add/remove test jobs without having to update the required workflows. | |
| tests-end: | |
| name: End | |
| runs-on: ubuntu-22.04 | |
| # We want this job to always run (even if the dependant jobs fail) as we want this job to fail rather than skipping. | |
| if: ${{ always() }} | |
| needs: | |
| - yarn-lock | |
| - test-acvm_js-node | |
| - test-acvm_js-browser | |
| - test-noirc-abi | |
| - test-noir-js | |
| - test-noir-wasm | |
| - test-noir-codegen | |
| - test-integration-node | |
| #- test-integration-browser | |
| - test-nargo-doc | |
| - test-examples | |
| # - compile-noir-contracts | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Report overall success | |
| run: | | |
| if [[ $FAIL == true ]]; then | |
| exit 1 | |
| else | |
| exit 0 | |
| fi | |
| env: | |
| # We treat any skipped or failing jobs as a failure for the workflow as a whole. | |
| FAIL: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} |