From 08946b08772348f5fe82ee1a6287d487381b3ca7 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 19:32:53 +0000 Subject: [PATCH 01/24] add logic for handling noir-profiler in noirup --- noirup | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/noirup b/noirup index 52eb9ca..6ed67fd 100755 --- a/noirup +++ b/noirup @@ -63,9 +63,11 @@ main() { # Remove prior installations if they exist rm -f "$NARGO_BIN_DIR/nargo" + rm -f "$NARGO_BIN_DIR/noir-profiler" - # Move the binary into the `nargo/bin` directory + # Move binaries into the `.nargo/bin` directory ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" + ensure mv "$PWD/target/release/noir-profiler" "$NARGO_BIN_DIR/noir-profiler" say "done" exit 0 @@ -121,14 +123,14 @@ main() { NOIRUP_TAG="${NOIRUP_VERSION}" fi - say "installing nargo (version ${NOIRUP_VERSION} with tag ${NOIRUP_TAG})" + say "installing Noir binaries (version ${NOIRUP_VERSION} with tag ${NOIRUP_TAG})" RELEASE_URL="https://github.com/${NOIRUP_REPO}/releases/download/${NOIRUP_TAG}" fi - BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" + BIN_TARBALL_URL="${RELEASE_URL}/noir-${ARCHITECTURE}-${PLATFORM}.tar.gz" # Download the binaries tarball and unpack it into the .nargo bin directory. - say "downloading latest nargo to '$NARGO_BIN_DIR'" + say "downloading latest Noir binaries to '$NARGO_BIN_DIR'" ensure curl -# -L $BIN_TARBALL_URL | tar -xzC $NARGO_BIN_DIR # Prior to v0.3.0, Nargo and the std lib were distributed separated. @@ -165,10 +167,11 @@ main() { # Remove prior installations if they exist rm -f "$NARGO_BIN_DIR/nargo" + rm -f "$NARGO_BIN_DIR/noir-profiler" - # Move the binary into the `nargo/bin` directory + # Move binaries into the `.nargo/bin` directory ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" - + ensure mv "$PWD/target/release/noir-profiler" "$NARGO_BIN_DIR/noir-profiler" fi if [[ $(which nargo) =~ "cargo" ]]; then From 2c2e79ace00da5b8b6d742d6c426473a4dadd7cb Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 19:51:33 +0000 Subject: [PATCH 02/24] handle noir-profiler in CI and legacy naming in script --- .github/workflows/ci.yml | 4 ++++ noirup | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5470aeb..011541e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,8 @@ jobs: run: noirup ${{steps.parse.outputs.toolchain}} - name: Check nargo installation run: nargo --version + - name: Check noir-profiler installation + run: noir-profiler --version install-source: name: Noir ${{matrix.version}} (from source) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} @@ -116,6 +118,8 @@ jobs: toolchain: -b tags/${{matrix.version}} - name: Check nargo installation run: nargo --version + - name: Check noir-profiler installation + run: noir-profiler --version install-action: name: Noir ${{matrix.toolchain}} (GH action) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} diff --git a/noirup b/noirup index 6ed67fd..8d2d93f 100755 --- a/noirup +++ b/noirup @@ -127,7 +127,14 @@ main() { RELEASE_URL="https://github.com/${NOIRUP_REPO}/releases/download/${NOIRUP_TAG}" fi + # Current name for the binary tarball created by Noir. BIN_TARBALL_URL="${RELEASE_URL}/noir-${ARCHITECTURE}-${PLATFORM}.tar.gz" + + # Legacy naming uses the `nargo-` for when noir-lang/noir used to only release a single nargo binary + # Use the legacy naming if `noir-` does not exist + if ! curl --head --fail "$BIN_TARBALL_URL"; then + BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" + fi # Download the binaries tarball and unpack it into the .nargo bin directory. say "downloading latest Noir binaries to '$NARGO_BIN_DIR'" From 60e842551c2c4ae768700647b46709e5aa76ef46 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 20:04:44 +0000 Subject: [PATCH 03/24] redirect stderr to /dev/null --- noirup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noirup b/noirup index 8d2d93f..eba8c12 100755 --- a/noirup +++ b/noirup @@ -132,7 +132,7 @@ main() { # Legacy naming uses the `nargo-` for when noir-lang/noir used to only release a single nargo binary # Use the legacy naming if `noir-` does not exist - if ! curl --head --fail "$BIN_TARBALL_URL"; then + if ! curl --head --fail "$BIN_TARBALL_URL" >/dev/null 2>&1; then BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" fi From 0c953947c850ecc63bd62002f2ceaf126036aeda Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 20:10:51 +0000 Subject: [PATCH 04/24] check version --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 011541e..fc72755 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,8 +79,6 @@ jobs: run: noirup ${{steps.parse.outputs.toolchain}} - name: Check nargo installation run: nargo --version - - name: Check noir-profiler installation - run: noir-profiler --version install-source: name: Noir ${{matrix.version}} (from source) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} @@ -119,7 +117,9 @@ jobs: - name: Check nargo installation run: nargo --version - name: Check noir-profiler installation - run: noir-profiler --version + run: | + echo ${{matrix.version}} + noir-profiler --version install-action: name: Noir ${{matrix.toolchain}} (GH action) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} From 9c3767afb08953713a41775aacfef0359120fe33 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 20:27:43 +0000 Subject: [PATCH 05/24] check if binary exists before moving --- noirup | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/noirup b/noirup index eba8c12..aa7de33 100755 --- a/noirup +++ b/noirup @@ -4,6 +4,8 @@ set -e NARGO_HOME=${NARGO_HOME-"$HOME/.nargo"} NARGO_BIN_DIR="$NARGO_HOME/bin" +BINARIES=("nargo" "noir-profiler") + main() { need_cmd git need_cmd curl @@ -62,12 +64,19 @@ main() { RUSTFLAGS="-C target-cpu=native" ensure cargo build --release $FEATURES # need 4 speed # Remove prior installations if they exist - rm -f "$NARGO_BIN_DIR/nargo" - rm -f "$NARGO_BIN_DIR/noir-profiler" + for bin in "${BINARIES[@]}"; do + rm -f "$NARGO_BIN_DIR/$bin" + done # Move binaries into the `.nargo/bin` directory - ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" - ensure mv "$PWD/target/release/noir-profiler" "$NARGO_BIN_DIR/noir-profiler" + for bin in "${BINARIES[@]}"; do + # Move the binary only if it exists. + # This ensures compatibility with older versions of Noir, + # which may not include all binaries listed. + if [ -f "$PWD/target/release/$bin" ]; then + ensure mv "$PWD/target/release/$bin" "$NARGO_BIN_DIR/$bin" + fi + done say "done" exit 0 @@ -172,13 +181,22 @@ main() { RUSTFLAGS="-C target-cpu=native" ensure cargo build --release $FEATURES + # Remove prior installations if they exist - rm -f "$NARGO_BIN_DIR/nargo" - rm -f "$NARGO_BIN_DIR/noir-profiler" + for bin in "${BINARIES[@]}"; do + rm -f "$NARGO_BIN_DIR/$bin" + done # Move binaries into the `.nargo/bin` directory - ensure mv "$PWD/target/release/nargo" "$NARGO_BIN_DIR/nargo" - ensure mv "$PWD/target/release/noir-profiler" "$NARGO_BIN_DIR/noir-profiler" + for bin in "${BINARIES[@]}"; do + # Move the binary only if it exists. + # This ensures compatibility with older versions of Noir, + # which may not include all binaries listed. + if [ -f "$PWD/target/release/$bin" ]; then + ensure mv "$PWD/target/release/$bin" "$NARGO_BIN_DIR/$bin" + fi + done + fi if [[ $(which nargo) =~ "cargo" ]]; then From f7b750fc2a18eef320cd86d8e96b2c75352a6643 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 20:36:46 +0000 Subject: [PATCH 06/24] check noir-profiler exists in CI --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc72755..572bada 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,10 @@ jobs: run: noirup ${{steps.parse.outputs.toolchain}} - name: Check nargo installation run: nargo --version + - name: Check noir-profiler installation + # This check ensures compatibility with older versions of Noir + if: fileExists('${HOME}/.nargo/bin/noir-profiler') + run: noir-profiler --version install-source: name: Noir ${{matrix.version}} (from source) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} @@ -117,9 +121,9 @@ jobs: - name: Check nargo installation run: nargo --version - name: Check noir-profiler installation - run: | - echo ${{matrix.version}} - noir-profiler --version + # This check ensures compatibility with older versions of Noir + if: fileExists('${HOME}/.nargo/bin/noir-profiler') + run: noir-profiler --version install-action: name: Noir ${{matrix.toolchain}} (GH action) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} From 05c03346cc53aa975b4f7b6ca70e833c4efea4ef Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 20:39:47 +0000 Subject: [PATCH 07/24] empty From d7e075589035ade2b8500f6c59ac01074058c3c4 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 20:43:27 +0000 Subject: [PATCH 08/24] check in bash whether file exists --- .github/workflows/ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 572bada..5f5f190 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,9 +80,11 @@ jobs: - name: Check nargo installation run: nargo --version - name: Check noir-profiler installation - # This check ensures compatibility with older versions of Noir - if: fileExists('${HOME}/.nargo/bin/noir-profiler') - run: noir-profiler --version + run: | + # This check ensures compatibility with older versions of Noir + if [ -f "${HOME}/.nargo/bin/noir-profiler" ]; then + noir-profiler --version + fi install-source: name: Noir ${{matrix.version}} (from source) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} @@ -121,9 +123,11 @@ jobs: - name: Check nargo installation run: nargo --version - name: Check noir-profiler installation - # This check ensures compatibility with older versions of Noir - if: fileExists('${HOME}/.nargo/bin/noir-profiler') - run: noir-profiler --version + run: | + # This check ensures compatibility with older versions of Noir + if [ -f "${HOME}/.nargo/bin/noir-profiler" ]; then + noir-profiler --version + fi install-action: name: Noir ${{matrix.toolchain}} (GH action) on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} From d37e906b30699b220483b5c25f8ca8e1300577b1 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 21:26:21 +0000 Subject: [PATCH 09/24] force curl to follow redirects --- noirup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/noirup b/noirup index aa7de33..1a0ba6b 100755 --- a/noirup +++ b/noirup @@ -141,7 +141,8 @@ main() { # Legacy naming uses the `nargo-` for when noir-lang/noir used to only release a single nargo binary # Use the legacy naming if `noir-` does not exist - if ! curl --head --fail "$BIN_TARBALL_URL" >/dev/null 2>&1; then + # Force curl to follow redirects with `-L` + if ! curl --head --fail --silent -L "$BIN_TARBALL_URL" >/dev/null 2>&1; then BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" fi From f8dfc2ddab31542bb8e46fdbefd9b9204c16daf6 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 21:33:53 +0000 Subject: [PATCH 10/24] be verbose about last failing case --- noirup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/noirup b/noirup index 1a0ba6b..801f65d 100755 --- a/noirup +++ b/noirup @@ -142,7 +142,8 @@ main() { # Legacy naming uses the `nargo-` for when noir-lang/noir used to only release a single nargo binary # Use the legacy naming if `noir-` does not exist # Force curl to follow redirects with `-L` - if ! curl --head --fail --silent -L "$BIN_TARBALL_URL" >/dev/null 2>&1; then + if ! curl -v -L --head --fail --silent "$BIN_TARBALL_URL" >/dev/null 2>&1; then + echo "got here" BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" fi From c59d7b152f53db33d39dfb8f50f49c726c2e8e81 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 21:38:41 +0000 Subject: [PATCH 11/24] remove -v on curl --- noirup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noirup b/noirup index 801f65d..e8296bf 100755 --- a/noirup +++ b/noirup @@ -142,7 +142,7 @@ main() { # Legacy naming uses the `nargo-` for when noir-lang/noir used to only release a single nargo binary # Use the legacy naming if `noir-` does not exist # Force curl to follow redirects with `-L` - if ! curl -v -L --head --fail --silent "$BIN_TARBALL_URL" >/dev/null 2>&1; then + if ! curl -L --head --fail --silent "$BIN_TARBALL_URL" >/dev/null 2>&1; then echo "got here" BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" fi From 189b1165bd58f46b5c0c68effda90a073f510d3b Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 16:52:37 -0500 Subject: [PATCH 12/24] Update noirup --- noirup | 1 - 1 file changed, 1 deletion(-) diff --git a/noirup b/noirup index e8296bf..ce53c7c 100755 --- a/noirup +++ b/noirup @@ -143,7 +143,6 @@ main() { # Use the legacy naming if `noir-` does not exist # Force curl to follow redirects with `-L` if ! curl -L --head --fail --silent "$BIN_TARBALL_URL" >/dev/null 2>&1; then - echo "got here" BIN_TARBALL_URL="${RELEASE_URL}/nargo-${ARCHITECTURE}-${PLATFORM}.tar.gz" fi From 17231f9a81ce3168f1a9c94339ed05bb85b58ac9 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 22:57:06 +0000 Subject: [PATCH 13/24] empty From 59a471b80be71abf575c7d9e1d050bf53572e33e Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Wed, 19 Feb 2025 18:33:05 -0500 Subject: [PATCH 14/24] Apply suggestions from code review --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f5f190..6191be3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,6 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - # This check ensures compatibility with older versions of Noir if [ -f "${HOME}/.nargo/bin/noir-profiler" ]; then noir-profiler --version fi @@ -124,7 +123,6 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - # This check ensures compatibility with older versions of Noir if [ -f "${HOME}/.nargo/bin/noir-profiler" ]; then noir-profiler --version fi From eb0b350136863938bdcbf412564ba90ffb57c933 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 15:20:00 +0000 Subject: [PATCH 15/24] switch to checking the version when checking noir-profiler in the CI job --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6191be3..30db255 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,15 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - if [ -f "${HOME}/.nargo/bin/noir-profiler" ]; then + VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') + # Minimum version which began releasing binaries for the `noir-profiler`. + MIN_VERSION="1.0.0-beta.3" + + version_gte() { + [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] + } + + if version_gte "$VERSION" "$MIN_VERSION"; then noir-profiler --version fi @@ -123,7 +131,14 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - if [ -f "${HOME}/.nargo/bin/noir-profiler" ]; then + # Minimum version which began releasing binaries for the `noir-profiler`. + MIN_VERSION="1.0.0-beta.3" + + version_gte() { + [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] + } + + if version_gte "${{matrix.version}}" "$MIN_VERSION"; then noir-profiler --version fi @@ -161,3 +176,18 @@ jobs: working-directory: ./project - run: nargo test working-directory: ./project + - name: Check noir-profiler installation + working-directory: ./project + run: | + VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') + # Minimum version which began releasing binaries for the `noir-profiler`. + MIN_VERSION="1.0.0-beta.3" + + version_gte() { + [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] + } + + if version_gte "$VERSION" "$MIN_VERSION"; then + noir-profiler --version + noir-profiler opcodes -a ./target/project.json -o ./target + fi From d79bf4a50a4fa68251f1e3c9f47b73a019a788de Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 15:26:49 +0000 Subject: [PATCH 16/24] print matrix.version --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30db255..58a828d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,8 +137,8 @@ jobs: version_gte() { [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] } - - if version_gte "${{matrix.version}}" "$MIN_VERSION"; then + echo ${{matrix.version}} + if version_gte ${{matrix.version}} "$MIN_VERSION"; then noir-profiler --version fi From 47328c351714cb313629cef856ee2b8fa7f8550d Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 15:39:02 +0000 Subject: [PATCH 17/24] account for v prefix --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58a828d..fd490a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,8 +81,9 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | + # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') - # Minimum version which began releasing binaries for the `noir-profiler`. + # Minimum version which began releasing binaries for the `noir-profiler` MIN_VERSION="1.0.0-beta.3" version_gte() { @@ -131,13 +132,14 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - # Minimum version which began releasing binaries for the `noir-profiler`. - MIN_VERSION="1.0.0-beta.3" + # Minimum version which began releasing binaries for the `noir-profiler` + # Account for the extra `v` that prefixes "${{matrix.version}}" + MIN_VERSION="v1.0.0-beta.3" version_gte() { [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] } - echo ${{matrix.version}} + if version_gte ${{matrix.version}} "$MIN_VERSION"; then noir-profiler --version fi From db8930425667eff88c02efe1daaec131df3e15bb Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 11:17:06 -0500 Subject: [PATCH 18/24] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd490a7..0c382e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,8 +132,6 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - # Minimum version which began releasing binaries for the `noir-profiler` - # Account for the extra `v` that prefixes "${{matrix.version}}" MIN_VERSION="v1.0.0-beta.3" version_gte() { From 8a698f66a31d97e569d734b8186b8e80285a6841 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 11:23:38 -0500 Subject: [PATCH 19/24] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c382e4..84e467b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,6 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | - # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') # Minimum version which began releasing binaries for the `noir-profiler` MIN_VERSION="1.0.0-beta.3" From 3236926cbfad1062c9d3422351430b31803dcd65 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 11:27:10 -0500 Subject: [PATCH 20/24] Apply suggestions from code review --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84e467b..e3be686 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,6 @@ jobs: - name: Check noir-profiler installation run: | VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') - # Minimum version which began releasing binaries for the `noir-profiler` MIN_VERSION="1.0.0-beta.3" version_gte() { @@ -179,7 +178,6 @@ jobs: working-directory: ./project run: | VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') - # Minimum version which began releasing binaries for the `noir-profiler`. MIN_VERSION="1.0.0-beta.3" version_gte() { From 93fabc7c773e4b77e4d0f6e039d990e64053d5c0 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 17:09:34 +0000 Subject: [PATCH 21/24] bring back some comments --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3be686..6f5d8c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,6 +130,8 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | + # Minimum version which began releasing binaries for the `noir-profiler` + # Account for the extra `v` that prefixes "${{matrix.version}}" MIN_VERSION="v1.0.0-beta.3" version_gte() { From d176ae34da7964d4edaf0668f70005632be4d895 Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 20 Feb 2025 17:41:02 +0000 Subject: [PATCH 22/24] wtf why is macos stalling --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f5d8c5..ed5a801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,6 +81,7 @@ jobs: run: nargo --version - name: Check noir-profiler installation run: | + # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') MIN_VERSION="1.0.0-beta.3" From 81d2e19e8bdcf20bcfe6e7a702f3f3cbeee75b4a Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 20 Feb 2025 17:59:18 +0000 Subject: [PATCH 23/24] chore: install `noir-inspector` --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ noirup | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed5a801..421a09e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,19 @@ jobs: run: noirup ${{steps.parse.outputs.toolchain}} - name: Check nargo installation run: nargo --version + - name: Check noir-inspector installation + run: | + # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains + VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') + MIN_VERSION="1.0.0-beta.3" + + version_gte() { + [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] + } + + if version_gte "$VERSION" "$MIN_VERSION"; then + noir-inspector --version + fi - name: Check noir-profiler installation run: | # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains @@ -129,6 +142,19 @@ jobs: toolchain: -b tags/${{matrix.version}} - name: Check nargo installation run: nargo --version + - name: Check noir-inspector installation + run: | + # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains + VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') + MIN_VERSION="1.0.0-beta.3" + + version_gte() { + [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] + } + + if version_gte "$VERSION" "$MIN_VERSION"; then + noir-inspector --version + fi - name: Check noir-profiler installation run: | # Minimum version which began releasing binaries for the `noir-profiler` @@ -177,6 +203,19 @@ jobs: working-directory: ./project - run: nargo test working-directory: ./project + - name: Check noir-inspector installation + run: | + # Fetch the version from `nargo` as to also check the `stable` and `nightly` toolchains + VERSION=$(nargo --version | awk -F' = ' '/nargo version/ {print $2}') + MIN_VERSION="1.0.0-beta.3" + + version_gte() { + [ "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ] + } + + if version_gte "$VERSION" "$MIN_VERSION"; then + noir-inspector --version + fi - name: Check noir-profiler installation working-directory: ./project run: | diff --git a/noirup b/noirup index ce53c7c..44a28af 100755 --- a/noirup +++ b/noirup @@ -4,7 +4,7 @@ set -e NARGO_HOME=${NARGO_HOME-"$HOME/.nargo"} NARGO_BIN_DIR="$NARGO_HOME/bin" -BINARIES=("nargo" "noir-profiler") +BINARIES=("nargo" "noir-profiler", "noir-inspector") main() { need_cmd git From 01255e947192992e2320e1134d8189f088d90d0b Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 20 Feb 2025 18:41:57 +0000 Subject: [PATCH 24/24] . --- noirup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noirup b/noirup index 44a28af..c1a567c 100755 --- a/noirup +++ b/noirup @@ -4,7 +4,7 @@ set -e NARGO_HOME=${NARGO_HOME-"$HOME/.nargo"} NARGO_BIN_DIR="$NARGO_HOME/bin" -BINARIES=("nargo" "noir-profiler", "noir-inspector") +BINARIES=("nargo" "noir-profiler" "noir-inspector") main() { need_cmd git