From 3c8a2bb6d93449ec2c136cf87d1bf13fb761c398 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 15:43:11 +0100 Subject: [PATCH 01/28] chore: verbatim copy of `build-nargo` --- .github/Cross.toml | 15 ++ .github/NIGHTLY_BUILD_FAILURE.md | 11 + .github/workflows/publish.yml | 361 ++++++++++++++++++++++++++ release-tests/package.json | 15 ++ release-tests/test/6_array.test.js | 49 ++++ release-tests/test/utils/nargo.js | 3 + release-tests/test/utils/zx.js | 11 + release-tests/test/version.test.js | 32 +++ release-tests/yarn.lock | 398 +++++++++++++++++++++++++++++ 9 files changed, 895 insertions(+) create mode 100644 .github/Cross.toml create mode 100644 .github/NIGHTLY_BUILD_FAILURE.md create mode 100644 .github/workflows/publish.yml create mode 100644 release-tests/package.json create mode 100644 release-tests/test/6_array.test.js create mode 100644 release-tests/test/utils/nargo.js create mode 100644 release-tests/test/utils/zx.js create mode 100644 release-tests/test/version.test.js create mode 100644 release-tests/yarn.lock diff --git a/.github/Cross.toml b/.github/Cross.toml new file mode 100644 index 00000000000..c8db62901e2 --- /dev/null +++ b/.github/Cross.toml @@ -0,0 +1,15 @@ +[build] +# pre-build = [ +# "dpkg --add-architecture $CROSS_DEB_ARCH", +# "apt-get update && apt-get install --assume-yes xz-utils pkgconfig build-essential cmake openssl libssl-dev libomp-dev libssl-dev:$CROSS_DEB_ARCH libomp-dev:$CROSS_DEB_ARCH", +# ] + +[build.env] +passthrough = [ + "HOME", + "RUST_BACKTRACE", + "BARRETENBERG_BIN_DIR" +] +volumes = [ + "HOME", +] diff --git a/.github/NIGHTLY_BUILD_FAILURE.md b/.github/NIGHTLY_BUILD_FAILURE.md new file mode 100644 index 00000000000..d839a72e20e --- /dev/null +++ b/.github/NIGHTLY_BUILD_FAILURE.md @@ -0,0 +1,11 @@ +--- +title: "nightly build failed" +assignees: kobyhallx, phated, tomafrench +labels: bug +--- + +Something broke our nightly builds. + +Check the [build]({{env.WORKFLOW_URL}}) workflow for details. + +This issue was raised by the workflow `{{env.WORKFLOW_NAME}}` diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000000..4ecfb517044 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,361 @@ +name: Publish Nargo + +on: + workflow_dispatch: + inputs: + noir-ref: + description: The noir reference to checkout + required: false + publish: + description: Whether to publish the build artifacts + type: boolean + default: false + schedule: + - cron: "0 2 * * *" # run at 2 AM UTC + push: + +jobs: + build-barretenberg: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Checkout Noir repo + uses: actions/checkout@v3 + with: + repository: noir-lang/noir + path: noir + ref: ${{ inputs.noir-ref || 'master' }} + + - name: Collect locked barretenberg rev + run: | + echo "BB_REV=$(jq -r .nodes.barretenberg.locked.rev ./noir/flake.lock)" >> $GITHUB_ENV + + - 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 }}" + + # Upload does not work with symlinks, using this workaround: + # https://github.com/actions/upload-artifact/issues/92#issuecomment-1080347032 + - name: Build barretenberg as libbarretenberg-wasm32 + run: | + nix build "github:AztecProtocol/barretenberg/${{ env.BB_REV }}#wasm32" + echo "ARTIFACT_UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: libbarretenberg-wasm32 + path: ${{ env.ARTIFACT_UPLOAD_PATH }} + retention-days: 3 + + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build 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_BUILD_FAILURE.md + + build-apple-darwin: + needs: [build-barretenberg] + runs-on: macos-latest + env: + CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml + strategy: + matrix: + target: [x86_64-apple-darwin, aarch64-apple-darwin] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Checkout Noir repo + uses: actions/checkout@v3 + with: + repository: noir-lang/noir + path: noir + ref: ${{ inputs.noir-ref || 'master' }} + + - name: Setup for Apple Silicon + if: matrix.target == 'aarch64-apple-darwin' + run: | + sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer/ + echo "SDKROOT=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-path)" >> $GITHUB_ENV + echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-platform-version)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: libbarretenberg-wasm32 + path: ${{ github.workspace }}/libbarretenberg-wasm32 + + - name: Setup toolchain + uses: dtolnay/rust-toolchain@1.66.0 + with: + targets: ${{ matrix.target }} + + - name: Build environment and Compile + working-directory: noir + env: + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin + run: | + cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm + + - name: Package artifacts + working-directory: noir + run: | + mkdir dist + cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo + 7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-${{ matrix.target }}.tar.gz + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: nargo-${{ matrix.target }} + path: ./noir/dist/* + retention-days: 3 + + - name: Test built artifact + if: matrix.target == 'x86_64-apple-darwin' + run: | + cp ./noir/target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ + npm install + npm test + + - name: Upload binaries to Noir Repo + uses: svenstaro/upload-release-action@v2 + if: ${{ inputs.publish || github.event_name == 'schedule' }} + with: + repo_name: noir-lang/noir + repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + file: ./noir/nargo-${{ matrix.target }}.tar.gz + asset_name: nargo-${{ matrix.target }}.tar.gz + overwrite: true + tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build 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_BUILD_FAILURE.md + + build-linux: + needs: [build-barretenberg] + runs-on: ubuntu-22.04 + env: + CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml + strategy: + fail-fast: false + matrix: + target: + [ + x86_64-unknown-linux-gnu, + x86_64-unknown-linux-musl, + aarch64-unknown-linux-gnu, + aarch64-unknown-linux-musl, + ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Checkout Noir repo + uses: actions/checkout@v3 + with: + repository: noir-lang/noir + path: noir + ref: ${{ inputs.noir-ref || 'master' }} + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: libbarretenberg-wasm32 + path: ${{ github.workspace }}/libbarretenberg-wasm32 + + - name: Setup toolchain + uses: dtolnay/rust-toolchain@1.66.0 + with: + targets: ${{ matrix.target }} + + - name: Build Nargo + working-directory: noir + env: + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin + run: | + cargo install cross --force --git https://github.com/cross-rs/cross + cross build --package nargo_cli --release --target=${{ matrix.target }} --no-default-features --features plonk_bn254_wasm + + - name: Package artifacts + working-directory: noir + run: | + mkdir dist + cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo + 7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-${{ matrix.target }}.tar.gz + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: nargo-${{ matrix.target }} + path: ./noir/dist/* + retention-days: 3 + + - name: Test built artifact + if: startsWith(matrix.target, 'x86_64-unknown-linux') + run: | + cp ./noir/target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ + npm install + npm test + + - name: Upload binaries to Noir Repo + uses: svenstaro/upload-release-action@v2 + if: ${{ inputs.publish || github.event_name == 'schedule' }} + with: + repo_name: noir-lang/noir + repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + file: ./noir/nargo-${{ matrix.target }}.tar.gz + asset_name: nargo-${{ matrix.target }}.tar.gz + overwrite: true + tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build 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_BUILD_FAILURE.md + + build-windows: + needs: [build-barretenberg] + runs-on: windows-2022 + env: + CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml + strategy: + matrix: + target: [x86_64-pc-windows-msvc] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Checkout Noir repo + uses: actions/checkout@v3 + with: + repository: noir-lang/noir + path: noir + ref: ${{ inputs.noir-ref || 'master' }} + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: libbarretenberg-wasm32 + path: ${{ github.workspace }}/libbarretenberg-wasm32 + + - name: Setup toolchain + uses: dtolnay/rust-toolchain@1.66.0 + with: + targets: ${{ matrix.target }} + + - name: Build environment and Compile + working-directory: noir + env: + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin + run: | + cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm + + - name: Package artifacts + working-directory: noir + run: | + mkdir dist + cp ./target/${{ matrix.target }}/release/nargo.exe ./dist/nargo.exe + 7z a -tzip nargo-${{ matrix.target }}.zip ./dist/* + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: nargo-${{ matrix.target }} + path: ./noir/dist/* + retention-days: 3 + + - name: Test built artifact + shell: powershell + run: | + cp ./noir/target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ + + npm install + npm test + + - name: Upload binaries to Noir Repo + uses: svenstaro/upload-release-action@v2 + if: ${{ inputs.publish || github.event_name == 'schedule' }} + with: + repo_name: noir-lang/noir + repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + file: ./noir/nargo-${{ matrix.target }}.zip + asset_name: nargo-${{ matrix.target }}.zip + overwrite: true + tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build 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_BUILD_FAILURE.md diff --git a/release-tests/package.json b/release-tests/package.json new file mode 100644 index 00000000000..10df1f68180 --- /dev/null +++ b/release-tests/package.json @@ -0,0 +1,15 @@ +{ + "name": "@noir-lang/release-tests", + "version": "0.0.0", + "main": "index.js", + "license": "MIT", + "private": true, + "type": "module", + "scripts": { + "test": "node ./node_modules/uvu/bin.js test" + }, + "devDependencies": { + "uvu": "0.5.6", + "zx": "7.1.1" + } +} diff --git a/release-tests/test/6_array.test.js b/release-tests/test/6_array.test.js new file mode 100644 index 00000000000..3638ecb7e3a --- /dev/null +++ b/release-tests/test/6_array.test.js @@ -0,0 +1,49 @@ +import { suite } from "uvu"; +import { cd } from "zx"; +import { NARGO_BIN } from "./utils/nargo.js"; +import "./utils/zx.js"; + +const test = suite("nargo"); + +// Helps detect unresolved ProcessPromise. +let promiseResolved = false; +process.on("exit", () => { + if (!promiseResolved) { + console.error("Error: ProcessPromise never resolved."); + process.exitCode = 1; + } +}); + +test("promise resolved", async () => { + await $`echo PromiseHelper`; + promiseResolved = true; +}); + +test("nargo builds ../crates/nargo_cli/tests/execution_success/6_array sucessfully", async () => { + await within(async () => { + cd("../crates/nargo_cli/tests/execution_success/6_array"); + const command = `${NARGO_BIN} check`; + + await $`${command}`.nothrow(); + }); +}); + +test("nargo creates proof ../crates/nargo_cli/tests/execution_success/6_array sucessfully", async () => { + await within(async () => { + cd("../crates/nargo_cli/tests/execution_success/6_array"); + const command = `${NARGO_BIN} prove 6_array`; + + await $`${command}`.nothrow(); + }); +}); + +test("nargo verifies proof ../crates/nargo_cli/tests/execution_success/6_array sucessfully", async () => { + await within(async () => { + cd("../crates/nargo_cli/tests/execution_success/6_array"); + const command = `${NARGO_BIN} verify 6_array`; + + await $`${command}`.nothrow(); + }); +}); + +test.run(); diff --git a/release-tests/test/utils/nargo.js b/release-tests/test/utils/nargo.js new file mode 100644 index 00000000000..537cdfc8be5 --- /dev/null +++ b/release-tests/test/utils/nargo.js @@ -0,0 +1,3 @@ +import { default as path } from "node:path"; + +export const NARGO_BIN = process.env.NARGO_BIN ? path.resolve(process.env.NARGO_BIN) : "nargo"; diff --git a/release-tests/test/utils/zx.js b/release-tests/test/utils/zx.js new file mode 100644 index 00000000000..a8ab500aec0 --- /dev/null +++ b/release-tests/test/utils/zx.js @@ -0,0 +1,11 @@ +import "zx/globals"; + +// We perform any common setup for zx here to avoid repetition across test files. + +if (process.platform == "win32") { + $.shell = "powershell"; +} + +$.quote = (arg) => arg; + +$.verbose = true; diff --git a/release-tests/test/version.test.js b/release-tests/test/version.test.js new file mode 100644 index 00000000000..07051d1edce --- /dev/null +++ b/release-tests/test/version.test.js @@ -0,0 +1,32 @@ +import { suite } from "uvu"; +import * as assert from "uvu/assert"; +import { NARGO_BIN } from "./utils/nargo.js"; +import "./utils/zx.js"; + +const test = suite("nargo"); + +// Helps detect unresolved ProcessPromise. +let promiseResolved = false; +process.on("exit", () => { + if (!promiseResolved) { + console.error("Error: ProcessPromise never resolved."); + process.exitCode = 1; + } +}); + +test("promise resolved", async () => { + await $`echo PromiseHelper`; + promiseResolved = true; +}); + +test("prints version", async () => { + const processOutput = (await $`${NARGO_BIN} --version`).toString(); + assert.match(processOutput, /nargo\s\d{1,2}.\d{1,2}/); +}); + +test("reports a clean commit", async () => { + const processOutput = (await $`${NARGO_BIN} --version`).toString(); + assert.not.match(processOutput, /is dirty: true/) +}); + +test.run(); diff --git a/release-tests/yarn.lock b/release-tests/yarn.lock new file mode 100644 index 00000000000..6c267639ac0 --- /dev/null +++ b/release-tests/yarn.lock @@ -0,0 +1,398 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@types/fs-extra@^9.0.13": + version "9.0.13" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" + integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== + dependencies: + "@types/node" "*" + +"@types/minimist@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" + integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== + +"@types/node@*": + version "20.4.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.8.tgz#b5dda19adaa473a9bf0ab5cbd8f30ec7d43f5c85" + integrity sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg== + +"@types/node@^18.7.20": + version "18.17.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.3.tgz#409febdc84478b452306a8112c692e800ad9f6fe" + integrity sha512-2x8HWtFk0S99zqVQABU9wTpr8wPoaDHZUcAkoTKH+nL7kPv3WUI9cRi/Kk5Mz4xdqXSqTkKP7IWNoQQYCnDsTA== + +"@types/ps-tree@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@types/ps-tree/-/ps-tree-1.1.2.tgz#5c60773a38ffb1402e049902a7b7a8d3c67cd59a" + integrity sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw== + +"@types/which@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/which/-/which-2.0.2.tgz#54541d02d6b1daee5ec01ac0d1b37cecf37db1ae" + integrity sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw== + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +chalk@^5.0.1: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +data-uri-to-buffer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" + integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== + +dequal@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" + integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== + +diff@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +duplexer@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + +event-stream@=3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + integrity sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g== + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + +fast-glob@^3.3.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +fetch-blob@^3.1.2, fetch-blob@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" + integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== + dependencies: + node-domexception "^1.0.0" + web-streams-polyfill "^3.0.3" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +formdata-polyfill@^4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" + integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== + dependencies: + fetch-blob "^3.1.2" + +from@~0: + version "0.1.7" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" + integrity sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g== + +fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +globby@^13.1.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" + integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.3.0" + ignore "^5.2.4" + merge2 "^1.4.1" + slash "^4.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +ignore@^5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +kleur@^4.0.3: + version "4.1.5" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" + integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== + +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + integrity sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mri@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" + integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== + +node-domexception@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@3.2.10: + version "3.2.10" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.10.tgz#e8347f94b54ae18b57c9c049ef641cef398a85c8" + integrity sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA== + dependencies: + data-uri-to-buffer "^4.0.0" + fetch-blob "^3.1.4" + formdata-polyfill "^4.0.10" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + integrity sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A== + dependencies: + through "~2.3" + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +ps-tree@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" + integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== + dependencies: + event-stream "=3.3.4" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +sade@^1.7.3: + version "1.8.1" + resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" + integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== + dependencies: + mri "^1.1.0" + +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + integrity sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA== + dependencies: + through "2" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + integrity sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw== + dependencies: + duplexer "~0.1.1" + +through@2, through@~2.3, through@~2.3.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +uvu@0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.6.tgz#2754ca20bcb0bb59b64e9985e84d2e81058502df" + integrity sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA== + dependencies: + dequal "^2.0.0" + diff "^5.0.0" + kleur "^4.0.3" + sade "^1.7.3" + +web-streams-polyfill@^3.0.3: + version "3.2.1" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" + integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== + +which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +yaml@^2.1.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b" + integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ== + +zx@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/zx/-/zx-7.1.1.tgz#8dc709fb8acd90ae5f39476145e5a2f3883dca1e" + integrity sha512-5YlTO2AJ+Ku2YuZKSSSqnUKuagcM/f/j4LmHs15O84Ch80Z9gzR09ZK3gR7GV+rc8IFpz2H/XNFtFVmj31yrZA== + dependencies: + "@types/fs-extra" "^9.0.13" + "@types/minimist" "^1.2.2" + "@types/node" "^18.7.20" + "@types/ps-tree" "^1.1.2" + "@types/which" "^2.0.1" + chalk "^5.0.1" + fs-extra "^10.1.0" + globby "^13.1.2" + minimist "^1.2.6" + node-fetch "3.2.10" + ps-tree "^1.2.0" + which "^2.0.2" + yaml "^2.1.1" From 60d35979139850db21f727a281c6a0f6972488ce Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 15:43:28 +0100 Subject: [PATCH 02/28] chore: switch to yarn --- .github/workflows/publish.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ecfb517044..ca633aa0208 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -141,8 +141,8 @@ jobs: if: matrix.target == 'x86_64-apple-darwin' run: | cp ./noir/target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ - npm install - npm test + yarn install + yarn test - name: Upload binaries to Noir Repo uses: svenstaro/upload-release-action@v2 @@ -241,8 +241,8 @@ jobs: if: startsWith(matrix.target, 'x86_64-unknown-linux') run: | cp ./noir/target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ - npm install - npm test + yarn install + yarn test - name: Upload binaries to Noir Repo uses: svenstaro/upload-release-action@v2 @@ -334,8 +334,8 @@ jobs: run: | cp ./noir/target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ - npm install - npm test + yarn install + yarn test - name: Upload binaries to Noir Repo uses: svenstaro/upload-release-action@v2 From 97f088993729155e63cd150713ca4ed367e2dcb2 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 15:46:52 +0100 Subject: [PATCH 03/28] chore: remove unnecessary noir directory --- .github/workflows/publish.yml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ca633aa0208..d24d5f8b2d8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,13 +24,11 @@ jobs: - name: Checkout Noir repo uses: actions/checkout@v3 with: - repository: noir-lang/noir - path: noir ref: ${{ inputs.noir-ref || 'master' }} - name: Collect locked barretenberg rev run: | - echo "BB_REV=$(jq -r .nodes.barretenberg.locked.rev ./noir/flake.lock)" >> $GITHUB_ENV + echo "BB_REV=$(jq -r .nodes.barretenberg.locked.rev ./flake.lock)" >> $GITHUB_ENV - uses: cachix/install-nix-action@v20 with: @@ -84,8 +82,6 @@ jobs: - name: Checkout Noir repo uses: actions/checkout@v3 with: - repository: noir-lang/noir - path: noir ref: ${{ inputs.noir-ref || 'master' }} - name: Setup for Apple Silicon @@ -117,14 +113,12 @@ jobs: targets: ${{ matrix.target }} - name: Build environment and Compile - working-directory: noir env: BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts - working-directory: noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo @@ -134,13 +128,13 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./noir/dist/* + path: ./dist/* retention-days: 3 - name: Test built artifact if: matrix.target == 'x86_64-apple-darwin' run: | - cp ./noir/target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ + cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ yarn install yarn test @@ -150,7 +144,7 @@ jobs: with: repo_name: noir-lang/noir repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./noir/nargo-${{ matrix.target }}.tar.gz + file: ./nargo-${{ matrix.target }}.tar.gz asset_name: nargo-${{ matrix.target }}.tar.gz overwrite: true tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) @@ -190,8 +184,6 @@ jobs: - name: Checkout Noir repo uses: actions/checkout@v3 with: - repository: noir-lang/noir - path: noir ref: ${{ inputs.noir-ref || 'master' }} - uses: actions/cache@v3 @@ -216,7 +208,6 @@ jobs: targets: ${{ matrix.target }} - name: Build Nargo - working-directory: noir env: BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | @@ -224,7 +215,6 @@ jobs: cross build --package nargo_cli --release --target=${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts - working-directory: noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo @@ -234,13 +224,13 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./noir/dist/* + path: ./dist/* retention-days: 3 - name: Test built artifact if: startsWith(matrix.target, 'x86_64-unknown-linux') run: | - cp ./noir/target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ + cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ yarn install yarn test @@ -250,7 +240,7 @@ jobs: with: repo_name: noir-lang/noir repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./noir/nargo-${{ matrix.target }}.tar.gz + file: ./nargo-${{ matrix.target }}.tar.gz asset_name: nargo-${{ matrix.target }}.tar.gz overwrite: true tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) @@ -283,8 +273,6 @@ jobs: - name: Checkout Noir repo uses: actions/checkout@v3 with: - repository: noir-lang/noir - path: noir ref: ${{ inputs.noir-ref || 'master' }} - uses: actions/cache@v3 @@ -309,14 +297,12 @@ jobs: targets: ${{ matrix.target }} - name: Build environment and Compile - working-directory: noir env: BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts - working-directory: noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo.exe ./dist/nargo.exe @@ -326,13 +312,13 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./noir/dist/* + path: ./dist/* retention-days: 3 - name: Test built artifact shell: powershell run: | - cp ./noir/target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ + cp ./target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ yarn install yarn test @@ -343,7 +329,7 @@ jobs: with: repo_name: noir-lang/noir repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./noir/nargo-${{ matrix.target }}.zip + file: ./nargo-${{ matrix.target }}.zip asset_name: nargo-${{ matrix.target }}.zip overwrite: true tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) From 23c1dbdd968a34e93250f52a240b647300078dfc Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 15:47:50 +0100 Subject: [PATCH 04/28] chore: disable publishing and nightly schedule --- .github/workflows/publish.yml | 136 +++++++++++++++++----------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d24d5f8b2d8..d4718424d51 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,8 +10,8 @@ on: description: Whether to publish the build artifacts type: boolean default: false - schedule: - - cron: "0 2 * * *" # run at 2 AM UTC + # schedule: + # - cron: "0 2 * * *" # run at 2 AM UTC push: jobs: @@ -138,28 +138,28 @@ jobs: yarn install yarn test - - name: Upload binaries to Noir Repo - uses: svenstaro/upload-release-action@v2 - if: ${{ inputs.publish || github.event_name == 'schedule' }} - with: - repo_name: noir-lang/noir - repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./nargo-${{ matrix.target }}.tar.gz - asset_name: nargo-${{ matrix.target }}.tar.gz - overwrite: true - tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) - - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build 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_BUILD_FAILURE.md + # - name: Upload binaries to Noir Repo + # uses: svenstaro/upload-release-action@v2 + # if: ${{ inputs.publish || github.event_name == 'schedule' }} + # with: + # repo_name: noir-lang/noir + # repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + # file: ./nargo-${{ matrix.target }}.tar.gz + # asset_name: nargo-${{ matrix.target }}.tar.gz + # overwrite: true + # tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + + # # If we're performing a nightly build and it fails acceptance tests then raise an issue. + # - name: Alert on nightly build 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_BUILD_FAILURE.md build-linux: needs: [build-barretenberg] @@ -234,28 +234,28 @@ jobs: yarn install yarn test - - name: Upload binaries to Noir Repo - uses: svenstaro/upload-release-action@v2 - if: ${{ inputs.publish || github.event_name == 'schedule' }} - with: - repo_name: noir-lang/noir - repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./nargo-${{ matrix.target }}.tar.gz - asset_name: nargo-${{ matrix.target }}.tar.gz - overwrite: true - tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) - - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build 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_BUILD_FAILURE.md + # - name: Upload binaries to Noir Repo + # uses: svenstaro/upload-release-action@v2 + # if: ${{ inputs.publish || github.event_name == 'schedule' }} + # with: + # repo_name: noir-lang/noir + # repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + # file: ./nargo-${{ matrix.target }}.tar.gz + # asset_name: nargo-${{ matrix.target }}.tar.gz + # overwrite: true + # tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + + # # If we're performing a nightly build and it fails acceptance tests then raise an issue. + # - name: Alert on nightly build 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_BUILD_FAILURE.md build-windows: needs: [build-barretenberg] @@ -323,25 +323,25 @@ jobs: yarn install yarn test - - name: Upload binaries to Noir Repo - uses: svenstaro/upload-release-action@v2 - if: ${{ inputs.publish || github.event_name == 'schedule' }} - with: - repo_name: noir-lang/noir - repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./nargo-${{ matrix.target }}.zip - asset_name: nargo-${{ matrix.target }}.zip - overwrite: true - tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) - - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build 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_BUILD_FAILURE.md + # - name: Upload binaries to Noir Repo + # uses: svenstaro/upload-release-action@v2 + # if: ${{ inputs.publish || github.event_name == 'schedule' }} + # with: + # repo_name: noir-lang/noir + # repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + # file: ./nargo-${{ matrix.target }}.zip + # asset_name: nargo-${{ matrix.target }}.zip + # overwrite: true + # tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + + # # If we're performing a nightly build and it fails acceptance tests then raise an issue. + # - name: Alert on nightly build 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_BUILD_FAILURE.md From 439ced2aae29ded7156741ddece493fa48cf1fa8 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 15:49:08 +0100 Subject: [PATCH 05/28] chore: run release tests from correct directory --- .github/workflows/publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d4718424d51..62e09e3ea90 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -135,6 +135,8 @@ jobs: if: matrix.target == 'x86_64-apple-darwin' run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ + + cd release-tests yarn install yarn test @@ -231,6 +233,8 @@ jobs: if: startsWith(matrix.target, 'x86_64-unknown-linux') run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ + + cd release-tests yarn install yarn test @@ -320,6 +324,7 @@ jobs: run: | cp ./target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ + cd release-tests yarn install yarn test From f2c9b898eb401ddf2a743a1e7e9ab2748c9ed408 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 16:20:37 +0100 Subject: [PATCH 06/28] chore: remove double checkout --- .github/workflows/publish.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 62e09e3ea90..bfcfc21f830 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,9 +3,6 @@ name: Publish Nargo on: workflow_dispatch: inputs: - noir-ref: - description: The noir reference to checkout - required: false publish: description: Whether to publish the build artifacts type: boolean @@ -21,11 +18,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Checkout Noir repo - uses: actions/checkout@v3 - with: - ref: ${{ inputs.noir-ref || 'master' }} - - name: Collect locked barretenberg rev run: | echo "BB_REV=$(jq -r .nodes.barretenberg.locked.rev ./flake.lock)" >> $GITHUB_ENV @@ -79,11 +71,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Checkout Noir repo - uses: actions/checkout@v3 - with: - ref: ${{ inputs.noir-ref || 'master' }} - - name: Setup for Apple Silicon if: matrix.target == 'aarch64-apple-darwin' run: | @@ -183,11 +170,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Checkout Noir repo - uses: actions/checkout@v3 - with: - ref: ${{ inputs.noir-ref || 'master' }} - - uses: actions/cache@v3 with: path: | @@ -274,11 +256,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Checkout Noir repo - uses: actions/checkout@v3 - with: - ref: ${{ inputs.noir-ref || 'master' }} - - uses: actions/cache@v3 with: path: | From 15e9f938b4af5c6516454331ecd193ff2cf391a6 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 16:39:13 +0100 Subject: [PATCH 07/28] chore: checkout noir repo into `./noir` repository --- .github/workflows/publish.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bfcfc21f830..356851736a9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -70,6 +70,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + path: ./noir - name: Setup for Apple Silicon if: matrix.target == 'aarch64-apple-darwin' @@ -100,12 +102,14 @@ jobs: targets: ${{ matrix.target }} - name: Build environment and Compile + working-directory: ./noir env: BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts + working-directory: ./noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo @@ -115,11 +119,12 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./dist/* + path: ./noir/dist/* retention-days: 3 - name: Test built artifact if: matrix.target == 'x86_64-apple-darwin' + working-directory: ./noir run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ @@ -169,6 +174,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + path: ./noir - uses: actions/cache@v3 with: @@ -192,6 +199,7 @@ jobs: targets: ${{ matrix.target }} - name: Build Nargo + working-directory: ./noir env: BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | @@ -199,6 +207,7 @@ jobs: cross build --package nargo_cli --release --target=${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts + working-directory: ./noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo @@ -208,11 +217,12 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./dist/* + path: ./noir/dist/* retention-days: 3 - name: Test built artifact if: startsWith(matrix.target, 'x86_64-unknown-linux') + working-directory: ./noir run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ @@ -255,6 +265,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + path: ./noir - uses: actions/cache@v3 with: @@ -278,12 +290,14 @@ jobs: targets: ${{ matrix.target }} - name: Build environment and Compile + working-directory: ./noir env: BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts + working-directory: ./noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo.exe ./dist/nargo.exe @@ -293,10 +307,11 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./dist/* + path: ./noir/dist/* retention-days: 3 - name: Test built artifact + working-directory: ./noir shell: powershell run: | cp ./target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ From 3faff533d8d2e361d6eab356239a6a9e1159e732 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 17:21:00 +0100 Subject: [PATCH 08/28] chore: update path to cross config --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 356851736a9..b7775e22c27 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -159,7 +159,7 @@ jobs: needs: [build-barretenberg] runs-on: ubuntu-22.04 env: - CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml + CROSS_CONFIG: ${{ github.workspace }}/noir/.github/Cross.toml strategy: fail-fast: false matrix: From a280b912af88597b61b53f92365cdbbbbb9c7cdc Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 17:54:46 +0100 Subject: [PATCH 09/28] chore: re-enable publishing nightly releases --- .github/workflows/publish.yml | 75 +++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b7775e22c27..bc393be9bde 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,9 @@ name: Publish Nargo on: workflow_dispatch: inputs: + tag: + description: The tag to build Nargo from + required: false publish: description: Whether to publish the build artifacts type: boolean @@ -17,6 +20,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + ref: ${{ inputs.tag || $GITHUB_REF }} - name: Collect locked barretenberg rev run: | @@ -71,6 +76,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: + ref: ${{ inputs.tag || $GITHUB_REF }} path: ./noir - name: Setup for Apple Silicon @@ -132,28 +138,27 @@ jobs: yarn install yarn test - # - name: Upload binaries to Noir Repo - # uses: svenstaro/upload-release-action@v2 - # if: ${{ inputs.publish || github.event_name == 'schedule' }} - # with: - # repo_name: noir-lang/noir - # repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - # file: ./nargo-${{ matrix.target }}.tar.gz - # asset_name: nargo-${{ matrix.target }}.tar.gz - # overwrite: true - # tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + - name: Upload binaries to release tag + uses: svenstaro/upload-release-action@v2 + if: ${{ inputs.publish || github.event_name == 'schedule' }} + with: + repo_name: noir-lang/noir + repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + file: ./noir/nargo-${{ matrix.target }}.tar.gz + asset_name: nargo-${{ matrix.target }}.tar.gz + overwrite: true + tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) # # If we're performing a nightly build and it fails acceptance tests then raise an issue. # - name: Alert on nightly build 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_BUILD_FAILURE.md + # filename: ./noir/.github/NIGHTLY_BUILD_FAILURE.md build-linux: needs: [build-barretenberg] @@ -175,6 +180,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: + ref: ${{ inputs.tag || $GITHUB_REF }} path: ./noir - uses: actions/cache@v3 @@ -230,16 +236,16 @@ jobs: yarn install yarn test - # - name: Upload binaries to Noir Repo - # uses: svenstaro/upload-release-action@v2 - # if: ${{ inputs.publish || github.event_name == 'schedule' }} - # with: - # repo_name: noir-lang/noir - # repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - # file: ./nargo-${{ matrix.target }}.tar.gz - # asset_name: nargo-${{ matrix.target }}.tar.gz - # overwrite: true - # tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + - name: Upload binaries to release tag + uses: svenstaro/upload-release-action@v2 + if: ${{ inputs.publish || github.event_name == 'schedule' }} + with: + repo_name: noir-lang/noir + repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + file: ./noir/nargo-${{ matrix.target }}.tar.gz + asset_name: nargo-${{ matrix.target }}.tar.gz + overwrite: true + tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) # # If we're performing a nightly build and it fails acceptance tests then raise an issue. # - name: Alert on nightly build failure @@ -251,7 +257,7 @@ jobs: # WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} # with: # update_existing: true - # filename: .github/NIGHTLY_BUILD_FAILURE.md + # filename: ./noir/.github/NIGHTLY_BUILD_FAILURE.md build-windows: needs: [build-barretenberg] @@ -266,6 +272,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: + ref: ${{ inputs.tag || $GITHUB_REF }} path: ./noir - uses: actions/cache@v3 @@ -320,16 +327,16 @@ jobs: yarn install yarn test - # - name: Upload binaries to Noir Repo - # uses: svenstaro/upload-release-action@v2 - # if: ${{ inputs.publish || github.event_name == 'schedule' }} - # with: - # repo_name: noir-lang/noir - # repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - # file: ./nargo-${{ matrix.target }}.zip - # asset_name: nargo-${{ matrix.target }}.zip - # overwrite: true - # tag: ${{ inputs.noir-ref || 'nightly' }} # This will fail if noir-ref is not a tag (e.g. testing a branch) + - name: Upload binaries to release tag + uses: svenstaro/upload-release-action@v2 + if: ${{ inputs.publish || github.event_name == 'schedule' }} + with: + repo_name: noir-lang/noir + repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + file: ./noir/nargo-${{ matrix.target }}.zip + asset_name: nargo-${{ matrix.target }}.zip + overwrite: true + tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) # # If we're performing a nightly build and it fails acceptance tests then raise an issue. # - name: Alert on nightly build failure @@ -341,4 +348,4 @@ jobs: # WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} # with: # update_existing: true - # filename: .github/NIGHTLY_BUILD_FAILURE.md + # filename: ./noir/.github/NIGHTLY_BUILD_FAILURE.md From a2a55eb30c240367a2dd76a785280815403b64ee Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 17:58:03 +0100 Subject: [PATCH 10/28] chore: read GITHUB_REF properly --- .github/workflows/publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bc393be9bde..df4d59104f0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ inputs.tag || $GITHUB_REF }} + ref: ${{ inputs.tag || env.GITHUB_REF }} - name: Collect locked barretenberg rev run: | @@ -76,7 +76,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ inputs.tag || $GITHUB_REF }} + ref: ${{ inputs.tag || env.GITHUB_REF }} path: ./noir - name: Setup for Apple Silicon @@ -180,7 +180,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ inputs.tag || $GITHUB_REF }} + ref: ${{ inputs.tag || env.GITHUB_REF }} path: ./noir - uses: actions/cache@v3 @@ -272,7 +272,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ inputs.tag || $GITHUB_REF }} + ref: ${{ inputs.tag || env.GITHUB_REF }} path: ./noir - uses: actions/cache@v3 From b9dab0a0b4e70add21627e10ab72485fd1d81d8e Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 18:19:55 +0100 Subject: [PATCH 11/28] chore: set up triggers for publishing --- .github/workflows/publish.yml | 11 ++++++++--- .github/workflows/release.yml | 14 ++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index df4d59104f0..37446c1fa47 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,17 +2,22 @@ name: Publish Nargo on: workflow_dispatch: + # Allow pushing a manual nightly release inputs: tag: - description: The tag to build Nargo from + description: The tag to build Nargo from (leave empty to build a nightly release from master) required: false publish: description: Whether to publish the build artifacts type: boolean default: false - # schedule: - # - cron: "0 2 * * *" # run at 2 AM UTC + schedule: + # Run a nightly release at 2 AM UTC + - cron: "0 2 * * *" push: + # release-please staging branch builds binaries as dry-run for release + branches: + - "release-please--branches--master--components--noir" jobs: build-barretenberg: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 660cd7e4888..250a16e640c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,16 +54,10 @@ jobs: name: Build binaries needs: [release-please] if: ${{ needs.release-please.outputs.tag-name }} - runs-on: ubuntu-latest - steps: - - name: Dispatch to build-nargo - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: publish.yml - repo: noir-lang/build-nargo - ref: master - token: ${{ secrets.NOIR_REPO_TOKEN }} - inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}", "publish": true }' + uses: ./.github/workflows/workflow-2.yml + with: + tag: ${{ needs.release-please.outputs.tag-name }} + publish: true publish-wasm: name: Publish noir_wasm package From 149a8c1891f617606f5abf838ecdcca0a0a969ee Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 18:20:41 +0100 Subject: [PATCH 12/28] chore: add kev to assignees --- .github/NIGHTLY_BUILD_FAILURE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/NIGHTLY_BUILD_FAILURE.md b/.github/NIGHTLY_BUILD_FAILURE.md index d839a72e20e..89357b63b5a 100644 --- a/.github/NIGHTLY_BUILD_FAILURE.md +++ b/.github/NIGHTLY_BUILD_FAILURE.md @@ -1,6 +1,6 @@ --- title: "nightly build failed" -assignees: kobyhallx, phated, tomafrench +assignees: kobyhallx, phated, tomafrench, kevaundray labels: bug --- From 410b0b05448fe44d167adf8bbd377d2b4aeea00f Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 18:22:01 +0100 Subject: [PATCH 13/28] chore: use actual workflow path --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 250a16e640c..398429b6ecd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,7 @@ jobs: name: Build binaries needs: [release-please] if: ${{ needs.release-please.outputs.tag-name }} - uses: ./.github/workflows/workflow-2.yml + uses: ./.github/workflows/publish.yml with: tag: ${{ needs.release-please.outputs.tag-name }} publish: true From dccf5f6b13b265868cebb9383f04de314e312aa7 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 18:23:15 +0100 Subject: [PATCH 14/28] chore: reenable reporting of nightly failures --- .github/workflows/publish.yml | 64 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 37446c1fa47..bbdbde06ef8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -154,16 +154,16 @@ jobs: overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) - # # If we're performing a nightly build and it fails acceptance tests then raise an issue. - # - name: Alert on nightly build failure - # uses: JasonEtco/create-an-issue@v2 - # 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build failure + uses: JasonEtco/create-an-issue@v2 + 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md build-linux: needs: [build-barretenberg] @@ -252,17 +252,17 @@ jobs: overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) - # # If we're performing a nightly build and it fails acceptance tests then raise an issue. - # - name: Alert on nightly build 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md build-windows: needs: [build-barretenberg] @@ -343,14 +343,14 @@ jobs: overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) - # # If we're performing a nightly build and it fails acceptance tests then raise an issue. - # - name: Alert on nightly build 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md + # If we're performing a nightly build and it fails acceptance tests then raise an issue. + - name: Alert on nightly build 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md From cece5d3e6fee7097bb236500c374e5922afe89b2 Mon Sep 17 00:00:00 2001 From: Tom French Date: Tue, 8 Aug 2023 19:36:55 +0100 Subject: [PATCH 15/28] chore: remove commented toml --- .github/Cross.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/Cross.toml b/.github/Cross.toml index c8db62901e2..09e6316a59c 100644 --- a/.github/Cross.toml +++ b/.github/Cross.toml @@ -1,9 +1,3 @@ -[build] -# pre-build = [ -# "dpkg --add-architecture $CROSS_DEB_ARCH", -# "apt-get update && apt-get install --assume-yes xz-utils pkgconfig build-essential cmake openssl libssl-dev libomp-dev libssl-dev:$CROSS_DEB_ARCH libomp-dev:$CROSS_DEB_ARCH", -# ] - [build.env] passthrough = [ "HOME", From 33d55c756b71d1c511fd58366ae82eb441f17039 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 08:48:55 +0100 Subject: [PATCH 16/28] chore: run workflow on merge queue --- .github/NIGHTLY_BUILD_FAILURE.md | 11 ------- .github/workflows/publish.yml | 53 ++------------------------------ 2 files changed, 2 insertions(+), 62 deletions(-) delete mode 100644 .github/NIGHTLY_BUILD_FAILURE.md diff --git a/.github/NIGHTLY_BUILD_FAILURE.md b/.github/NIGHTLY_BUILD_FAILURE.md deleted file mode 100644 index 89357b63b5a..00000000000 --- a/.github/NIGHTLY_BUILD_FAILURE.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "nightly build failed" -assignees: kobyhallx, phated, tomafrench, kevaundray -labels: bug ---- - -Something broke our nightly builds. - -Check the [build]({{env.WORKFLOW_URL}}) workflow for details. - -This issue was raised by the workflow `{{env.WORKFLOW_NAME}}` diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bbdbde06ef8..37e9511196e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,10 +14,8 @@ on: schedule: # Run a nightly release at 2 AM UTC - cron: "0 2 * * *" - push: - # release-please staging branch builds binaries as dry-run for release - branches: - - "release-please--branches--master--components--noir" + merge_group: + jobs: build-barretenberg: @@ -56,18 +54,6 @@ jobs: path: ${{ env.ARTIFACT_UPLOAD_PATH }} retention-days: 3 - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build 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_BUILD_FAILURE.md - build-apple-darwin: needs: [build-barretenberg] runs-on: macos-latest @@ -154,17 +140,6 @@ jobs: overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build failure - uses: JasonEtco/create-an-issue@v2 - 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md - build-linux: needs: [build-barretenberg] runs-on: ubuntu-22.04 @@ -252,18 +227,6 @@ jobs: overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md - build-windows: needs: [build-barretenberg] runs-on: windows-2022 @@ -342,15 +305,3 @@ jobs: asset_name: nargo-${{ matrix.target }}.zip overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) - - # If we're performing a nightly build and it fails acceptance tests then raise an issue. - - name: Alert on nightly build 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: ./noir/.github/NIGHTLY_BUILD_FAILURE.md From c656cda7d5eadc0fe092c9341a382ff79a815e9a Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 08:56:49 +0100 Subject: [PATCH 17/28] chore: remove `./noir` subdirectory --- .github/workflows/publish.yml | 38 ++++++++++++----------------------- .gitignore | 4 ++++ 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 37e9511196e..3a2ef6adfa4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -68,7 +68,6 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.tag || env.GITHUB_REF }} - path: ./noir - name: Setup for Apple Silicon if: matrix.target == 'aarch64-apple-darwin' @@ -91,7 +90,7 @@ jobs: uses: actions/download-artifact@v3 with: name: libbarretenberg-wasm32 - path: ${{ github.workspace }}/libbarretenberg-wasm32 + path: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32 - name: Setup toolchain uses: dtolnay/rust-toolchain@1.66.0 @@ -99,14 +98,12 @@ jobs: targets: ${{ matrix.target }} - name: Build environment and Compile - working-directory: ./noir env: - BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts - working-directory: ./noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo @@ -116,12 +113,11 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./noir/dist/* + path: ./dist/* retention-days: 3 - name: Test built artifact if: matrix.target == 'x86_64-apple-darwin' - working-directory: ./noir run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ @@ -135,7 +131,7 @@ jobs: with: repo_name: noir-lang/noir repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./noir/nargo-${{ matrix.target }}.tar.gz + file: ./nargo-${{ matrix.target }}.tar.gz asset_name: nargo-${{ matrix.target }}.tar.gz overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) @@ -144,7 +140,7 @@ jobs: needs: [build-barretenberg] runs-on: ubuntu-22.04 env: - CROSS_CONFIG: ${{ github.workspace }}/noir/.github/Cross.toml + CROSS_CONFIG: ${{ github.workspace }}/.github/Cross.toml strategy: fail-fast: false matrix: @@ -161,7 +157,6 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.tag || env.GITHUB_REF }} - path: ./noir - uses: actions/cache@v3 with: @@ -177,7 +172,7 @@ jobs: uses: actions/download-artifact@v3 with: name: libbarretenberg-wasm32 - path: ${{ github.workspace }}/libbarretenberg-wasm32 + path: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32 - name: Setup toolchain uses: dtolnay/rust-toolchain@1.66.0 @@ -185,15 +180,13 @@ jobs: targets: ${{ matrix.target }} - name: Build Nargo - working-directory: ./noir env: - BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32/bin run: | cargo install cross --force --git https://github.com/cross-rs/cross cross build --package nargo_cli --release --target=${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts - working-directory: ./noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo ./dist/nargo @@ -203,12 +196,11 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./noir/dist/* + path: ./dist/* retention-days: 3 - name: Test built artifact if: startsWith(matrix.target, 'x86_64-unknown-linux') - working-directory: ./noir run: | cp ./target/${{ matrix.target }}/release/nargo ~/.cargo/bin/ @@ -222,7 +214,7 @@ jobs: with: repo_name: noir-lang/noir repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./noir/nargo-${{ matrix.target }}.tar.gz + file: ./nargo-${{ matrix.target }}.tar.gz asset_name: nargo-${{ matrix.target }}.tar.gz overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) @@ -241,7 +233,6 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.tag || env.GITHUB_REF }} - path: ./noir - uses: actions/cache@v3 with: @@ -257,7 +248,7 @@ jobs: uses: actions/download-artifact@v3 with: name: libbarretenberg-wasm32 - path: ${{ github.workspace }}/libbarretenberg-wasm32 + path: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32 - name: Setup toolchain uses: dtolnay/rust-toolchain@1.66.0 @@ -265,14 +256,12 @@ jobs: targets: ${{ matrix.target }} - name: Build environment and Compile - working-directory: ./noir env: - BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm - name: Package artifacts - working-directory: ./noir run: | mkdir dist cp ./target/${{ matrix.target }}/release/nargo.exe ./dist/nargo.exe @@ -282,11 +271,10 @@ jobs: uses: actions/upload-artifact@v3 with: name: nargo-${{ matrix.target }} - path: ./noir/dist/* + path: ./dist/* retention-days: 3 - name: Test built artifact - working-directory: ./noir shell: powershell run: | cp ./target/${{ matrix.target }}/release/nargo.exe ~/.cargo/bin/ @@ -301,7 +289,7 @@ jobs: with: repo_name: noir-lang/noir repo_token: ${{ secrets.NOIR_REPO_TOKEN }} - file: ./noir/nargo-${{ matrix.target }}.zip + file: ./nargo-${{ matrix.target }}.zip asset_name: nargo-${{ matrix.target }}.zip overwrite: true tag: ${{ inputs.tag || 'nightly' }} # This will fail if `inputs.tag` is not a tag (e.g. testing a branch) diff --git a/.gitignore b/.gitignore index 39f4fbe1266..6b6b3693cf1 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,7 @@ result **/target !crates/nargo_cli/tests/execution_success/*/target !crates/nargo_cli/tests/execution_success/*/target/witness.tr + +# Github Actions scratch space +# This gives a location to download artifacts into the repository in CI without making git dirty. +.github/temp From 7c6c84ac8121565b75266991edfd84013a10ed6b Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 09:03:16 +0100 Subject: [PATCH 18/28] chore: run build to check that it's working --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3a2ef6adfa4..5066602fdd7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,8 @@ on: # Run a nightly release at 2 AM UTC - cron: "0 2 * * *" merge_group: + # Remove me + push: jobs: From 3f3ea926c891b8a9ce43e5f16686e5376fe59b49 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 09:11:47 +0100 Subject: [PATCH 19/28] chore: replace `NOIR_REPO_TOKEN` with `GITHUB_TOKEN` --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5066602fdd7..b237c0034d5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -132,7 +132,7 @@ jobs: if: ${{ inputs.publish || github.event_name == 'schedule' }} with: repo_name: noir-lang/noir - repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./nargo-${{ matrix.target }}.tar.gz asset_name: nargo-${{ matrix.target }}.tar.gz overwrite: true @@ -215,7 +215,7 @@ jobs: if: ${{ inputs.publish || github.event_name == 'schedule' }} with: repo_name: noir-lang/noir - repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./nargo-${{ matrix.target }}.tar.gz asset_name: nargo-${{ matrix.target }}.tar.gz overwrite: true @@ -290,7 +290,7 @@ jobs: if: ${{ inputs.publish || github.event_name == 'schedule' }} with: repo_name: noir-lang/noir - repo_token: ${{ secrets.NOIR_REPO_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./nargo-${{ matrix.target }}.zip asset_name: nargo-${{ matrix.target }}.zip overwrite: true From 1b0a067e817c512ed1b78b9b3fcd97cc46ed0e43 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 14:36:12 +0100 Subject: [PATCH 20/28] chore: move ignored directory to repo root --- .github/workflows/publish.yml | 12 ++++++------ .gitignore | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b237c0034d5..d40f20c02ed 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -92,7 +92,7 @@ jobs: uses: actions/download-artifact@v3 with: name: libbarretenberg-wasm32 - path: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32 + path: ${{ github.workspace }}/libbarretenberg-wasm32 - name: Setup toolchain uses: dtolnay/rust-toolchain@1.66.0 @@ -101,7 +101,7 @@ jobs: - name: Build environment and Compile env: - BARRETENBERG_BIN_DIR: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32/bin + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm @@ -174,7 +174,7 @@ jobs: uses: actions/download-artifact@v3 with: name: libbarretenberg-wasm32 - path: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32 + path: ${{ github.workspace }}/libbarretenberg-wasm32 - name: Setup toolchain uses: dtolnay/rust-toolchain@1.66.0 @@ -183,7 +183,7 @@ jobs: - name: Build Nargo env: - BARRETENBERG_BIN_DIR: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32/bin + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo install cross --force --git https://github.com/cross-rs/cross cross build --package nargo_cli --release --target=${{ matrix.target }} --no-default-features --features plonk_bn254_wasm @@ -250,7 +250,7 @@ jobs: uses: actions/download-artifact@v3 with: name: libbarretenberg-wasm32 - path: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32 + path: ${{ github.workspace }}/libbarretenberg-wasm32 - name: Setup toolchain uses: dtolnay/rust-toolchain@1.66.0 @@ -259,7 +259,7 @@ jobs: - name: Build environment and Compile env: - BARRETENBERG_BIN_DIR: ${{ github.workspace }}/.github/temp/libbarretenberg-wasm32/bin + BARRETENBERG_BIN_DIR: ${{ github.workspace }}/libbarretenberg-wasm32/bin run: | cargo build --package nargo_cli --release --target ${{ matrix.target }} --no-default-features --features plonk_bn254_wasm diff --git a/.gitignore b/.gitignore index 6b6b3693cf1..d339e5b9d3b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,4 @@ result # Github Actions scratch space # This gives a location to download artifacts into the repository in CI without making git dirty. -.github/temp +libbarretenberg-wasm32 From 92d7d00e1d0a6692b8be6d70b42821df8118525b Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 15:10:27 +0100 Subject: [PATCH 21/28] chore: revert to using `workflow_dispatch` --- .github/workflows/release.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 398429b6ecd..38b6303b279 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,10 +54,17 @@ jobs: name: Build binaries needs: [release-please] if: ${{ needs.release-please.outputs.tag-name }} - uses: ./.github/workflows/publish.yml - with: - tag: ${{ needs.release-please.outputs.tag-name }} - publish: true + runs-on: ubuntu-latest + # TODO: Switch to use `workflow_call`? + steps: + - name: Dispatch to publish workflow + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: publish.yml + repo: noir-lang/noir + ref: master + token: ${{ secrets.GITHUB_TOKEN }} + inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}", "publish": true }' publish-wasm: name: Publish noir_wasm package From 4134588903c5f2ec8802c4c71b81e402d20a8a05 Mon Sep 17 00:00:00 2001 From: Tom French Date: Wed, 9 Aug 2023 15:24:35 +0100 Subject: [PATCH 22/28] chore: remove push trigger --- .github/workflows/publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d40f20c02ed..dc091fa8ab7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,8 +15,6 @@ on: # Run a nightly release at 2 AM UTC - cron: "0 2 * * *" merge_group: - # Remove me - push: jobs: From 1b4f0b10a95cd4660315b2e14aac73664e4f5257 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 10 Aug 2023 11:34:38 +0100 Subject: [PATCH 23/28] chore: add `permissions` section --- .github/workflows/publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dc091fa8ab7..dcada4222e9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,10 @@ on: # Run a nightly release at 2 AM UTC - cron: "0 2 * * *" merge_group: + +permissions: + # Necessary to upload new release artifacts + contents: write jobs: From 0d543e96a27236b9560a7df08c6096a80c6491b1 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 10 Aug 2023 11:37:27 +0100 Subject: [PATCH 24/28] chore: remove auth token from cachix --- .github/workflows/publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dcada4222e9..532d5275c49 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,6 @@ jobs: - uses: cachix/cachix-action@v12 with: name: barretenberg - authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" # Upload does not work with symlinks, using this workaround: # https://github.com/actions/upload-artifact/issues/92#issuecomment-1080347032 From 543f77a248698f769106b65518eb290715681b1d Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 10 Aug 2023 11:37:56 +0100 Subject: [PATCH 25/28] temp --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 532d5275c49..b6e7a31efa5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,7 @@ on: # Run a nightly release at 2 AM UTC - cron: "0 2 * * *" merge_group: + push: permissions: # Necessary to upload new release artifacts From 68186fc298c36c41bca7acecf810f9b98bdfb880 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 10 Aug 2023 19:52:47 +0100 Subject: [PATCH 26/28] chore: list dual license in `package.json`s --- crates/wasm/package.json | 2 +- release-tests/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/wasm/package.json b/crates/wasm/package.json index ed58aac65f3..a44e0c1a3f4 100644 --- a/crates/wasm/package.json +++ b/crates/wasm/package.json @@ -4,7 +4,7 @@ "The Noir Team " ], "version": "0.9.0", - "license": "MIT", + "license": "(MIT OR Apache-2.0)", "main": "./nodejs/noir_wasm.js", "types": "./web/noir_wasm.d.ts", "module": "./web/noir_wasm.js", diff --git a/release-tests/package.json b/release-tests/package.json index 10df1f68180..ba61fcb27d3 100644 --- a/release-tests/package.json +++ b/release-tests/package.json @@ -2,7 +2,7 @@ "name": "@noir-lang/release-tests", "version": "0.0.0", "main": "index.js", - "license": "MIT", + "license": "(MIT OR Apache-2.0)", "private": true, "type": "module", "scripts": { From 66008aea0cf2e22a6124310acb6f4f6ee1f213f5 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 10 Aug 2023 19:53:15 +0100 Subject: [PATCH 27/28] chore: remove todo --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38b6303b279..8c99a6e3603 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,6 @@ jobs: needs: [release-please] if: ${{ needs.release-please.outputs.tag-name }} runs-on: ubuntu-latest - # TODO: Switch to use `workflow_call`? steps: - name: Dispatch to publish workflow uses: benc-uk/workflow-dispatch@v1 From e458fd18eea5026fad0fd8ec2e697b616e3d1c77 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 10 Aug 2023 19:53:47 +0100 Subject: [PATCH 28/28] chore: remove `push:` trigger --- .github/workflows/publish.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b6e7a31efa5..3dee7dae265 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,13 +15,11 @@ on: # Run a nightly release at 2 AM UTC - cron: "0 2 * * *" merge_group: - push: permissions: # Necessary to upload new release artifacts contents: write - jobs: build-barretenberg: runs-on: ubuntu-latest