Skip to content

Commit

Permalink
Revert "Use env bash rather than fixed path."
Browse files Browse the repository at this point in the history
This reverts commit df49624.
  • Loading branch information
charlielye committed Dec 10, 2023
1 parent d1ebc72 commit 80e743c
Show file tree
Hide file tree
Showing 135 changed files with 163 additions and 161 deletions.
2 changes: 1 addition & 1 deletion aztec-up/bin/aztec-install
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -euo pipefail

# Colors
Expand Down
2 changes: 1 addition & 1 deletion aztec-up/bin/aztec-sandbox
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -euo pipefail

# Favour 'docker compose', falling back on docker-compose.
Expand Down
2 changes: 1 addition & 1 deletion aztec-up/bin/aztec-up
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -euo pipefail

export SKIP_TITLE=1
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/bash_helpers/catch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

# Handler for SIGCHLD, cleanup if child exit with error
handle_sigchild() {
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/bench_acir_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

TEST_NAMES=("$@")
THREADS=(1 4 16 32 64)
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/clone_test_vectors.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

TEST_SRC=${TEST_SRC:-../../noir/test_programs/acir_artifacts}
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/gen_inner_proof_inputs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Env var overrides:
# BIN: to specify a different binary to test with (e.g. bb.js or bb.js-dev).
set -eu
Expand Down
6 changes: 3 additions & 3 deletions barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Env var overrides:
# BIN: to specify a different binary to test with (e.g. bb.js or bb.js-dev).
# VERBOSE: to enable logging for each test.
Expand Down Expand Up @@ -80,8 +80,8 @@ else
# If parallel flag is set, run in parallel
if [ -n "${PARALLEL:-}" ]; then
test $TEST_NAME &
else
test $TEST_NAME
else
test $TEST_NAME
fi
done
fi
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/run_acir_tests_browser.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -em

cleanup() {
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

cd "$(dirname "$0")"
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

# Navigate to script folder
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -e

if [ "$1" == "staged" ]; then
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/bb-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# This script runs all test suites that have not been broken out into their own jobs for parallelisation.
# Might be better to list exclusions here rather than inclusions as risky to maintain.
set -eu
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/benchmarks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

# Move above script dir.
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/collect_coverage_information.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

if [ $# -ne 2 ]; then
echo "Usage: $0 <llvm-profdata command> <llvm-cov command>"
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/collect_heap_information.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

PRESET=gperftools
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/collect_profile_information.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

# can also be 'xray-1thread'
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/install-wasi-sdk.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

if [[ -d ./src/wasi-sdk-20.0 && -d ./src/wasi-sdk-20.0+threads ]]; then
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/scripts/run_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# This is the default test runner which takes the as arguments:
# 1. The number of ignition transcripts to download.
# 2. The set of gtest binary names to run.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#!/bin/bash

# This script is used to compare a suite of benchmarks between baseline (default: master) and
# the branch from which the script is run. Simply check out the branch of interest, ensure
# the branch from which the script is run. Simply check out the branch of interest, ensure
# it is up to date with local master, and run the script.

# Specify the benchmark suite and the "baseline" branch against which to compare
Expand Down Expand Up @@ -43,7 +43,7 @@ BASELINE_RESULTS="$BENCH_RESULTS_DIR/results_baseline.json"
echo -e "\nRunning $BENCH_TARGET in master.."
bin/$BENCH_TARGET --benchmark_format=json > $BASELINE_RESULTS

# Call compare.py on the results (json) to get high level statistics.
# Call compare.py on the results (json) to get high level statistics.
# See docs at https://github.com/google/benchmark/blob/main/docs/tools.md for more details.
$BENCH_TOOLS_DIR/compare.py benchmarks $BASELINE_RESULTS $BRANCH_RESULTS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#!/bin/bash

# This script is used to compare the results of honk_bench between baseline (master) and
# the branch from which the script is run. Simply check out the branch of interest, ensure
# the branch from which the script is run. Simply check out the branch of interest, ensure
# it is up to date with local master, and run the script.

echo -e '\nComparing Ultra Plonk/Honk benchmarks.'
Expand All @@ -19,21 +19,21 @@ pip3 install --user -r $BUILD_DIR/_deps/benchmark-src/requirements.txt
cd $BASE_DIR
mkdir $BENCH_RESULTS_DIR

#
#
echo -e '\nBuilding and running Standard benchmarks..'
# rm -rf $BUILD_DIR
cmake --preset bench > /dev/null && cmake --build --preset bench --target ultra_plonk_bench
cmake --preset bench > /dev/null && cmake --build --preset bench --target ultra_plonk_bench
cd build-bench
PLONK_BENCH_RESULTS="$BENCH_RESULTS_DIR/plonk_bench.json"
./bin/ultra_plonk_bench --benchmark_format=json > $PLONK_BENCH_RESULTS

cd ..
cmake --preset bench > /dev/null && cmake --build --preset bench --target ultra_honk_bench
cmake --preset bench > /dev/null && cmake --build --preset bench --target ultra_honk_bench
cd build-bench
HONK_BENCH_RESULTS="$BENCH_RESULTS_DIR/honk_bench.json"
./bin/ultra_honk_bench --benchmark_format=json > $HONK_BENCH_RESULTS

# Call compare.py on the results (json) to get high level statistics.
# Call compare.py on the results (json) to get high level statistics.
# See docs at https://github.com/google/benchmark/blob/main/docs/tools.md for more details.
$BENCH_TOOLS_DIR/compare.py benchmarks $PLONK_BENCH_RESULTS $HONK_BENCH_RESULTS

Expand Down
2 changes: 1 addition & 1 deletion barretenberg/scripts/bindgen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

#find ./cpp/src -type f -name "c_bind*.hpp" | ./scripts/decls_json.py > exports.json
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/sol/scripts/init.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash


PLONK_FLAVOUR="ultra"
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/sol/scripts/run_fuzzer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

PLONK_FLAVOUR=${1:-"ultra"}
CIRCUIT_FLAVOUR=${2:-"blake"}
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/ts/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -eu

cd "$(dirname "$0")"
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/ts/scripts/run_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
set -xe

$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Usage:
# Bootstraps the repo. End to end tests should be runnable after a bootstrap:
# ./bootstrap.sh
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/bootstrap_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# This script takes the state of your current repository, and clones it inside of a docker container.
# You likely don't have a fresh clone, and it's paramount that to test bootstrapping, we don't have any
# intermediate build state in the context.
Expand Down
2 changes: 1 addition & 1 deletion bootstrap_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# This script builds the projects listed in build_manifest.sh, terminating when it reaches PROJECT_NAME.
# If run from within a project, it will build only that project, unless env var ONLY_TARGET=false.
#
Expand Down
2 changes: 1 addition & 1 deletion build-system/remote/bootstrap_build_instance.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/add_timestamps
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
while IFS= read -r line; do
printf '%(%Y-%m-%d %H:%M:%S)T %s\n' -1 "$line"
done
2 changes: 1 addition & 1 deletion build-system/scripts/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
#
# Builds a docker image and pushes it to it's repository. Leverages caches where possible.
# Cached images include previous successfully built images (including multi-stages) built on this branch.
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/build_local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Builds the PROJECTS in the given order.
# Will terminate build at TARGET_PROJECT (if given).
# Will only build TARGET_PROJECT if ONLY_TARGET given.
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/calculate_content_hash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/calculate_image_tag
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Return a repositories build cache image tag based on content hash.
# If the second argument is set:
# It's used to suffix the tag with the given unique arch descriptor.
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/calculate_image_uri
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/calculate_rebuild_files
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash

[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/check_rebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# If this script fails (nonzero exit), then the caller should rebuild.
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -euo pipefail
Expand Down
6 changes: 3 additions & 3 deletions build-system/scripts/clean_image_tags
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -e

Expand All @@ -20,7 +20,7 @@ fi

# Collect all the commits ids in the repository and remove the remote for faster lookups
# See warning in https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git config fetch.recurseSubmodules false
git config fetch.recurseSubmodules false
git fetch --filter=tree:0 origin
ORIGIN_URL=$(git remote get-url origin)
git remote remove origin
Expand All @@ -29,7 +29,7 @@ git remote remove origin
# This happens for all commits tagged for PRs that then get squashed and merged
IFS=$'\n'
for TAG in $IMAGE_TAGS; do
if [[ $TAG =~ ^cache-[0-9a-fA-F]+-builder$ ]]; then
if [[ $TAG =~ ^cache-[0-9a-fA-F]+-builder$ ]]; then
TAG_COMMIT=$(echo "$TAG" | cut -d '-' -f 2)
if git cat-file -e $TAG_COMMIT; then
echo "Commit for $TAG found"
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_run_compose
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_run_container
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Conditionally runs a script if the REPOSITORY content hash has changed and we haven't had a successful run.
#
# Arguments are:
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_run_script
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Conditionally runs a script if the REPOSITORY content hash has changed and we haven't had a successful run.
#
# Arguments are:
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_spot_run_build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_spot_run_compose
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_spot_run_container
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_spot_run_script
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Conditionally runs a script on a remote spot instance if the REPOSITORY content hash has changed and we haven't had a
# successful run.
# The TAG_POSTFIX is used by cond_spot_run_test whereby we use an image tag postfixed with JOB_NAME to identifify if
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/cond_spot_run_test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/create_ecr_manifest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# This script:
# 1. Logs into ECR and ensures we have the given repository
# 2. Computes the image uri of the cached images for the given repository given the list of architectures
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_dockerhub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_ecr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_global
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
# Deployment script for global service (e.g. company website and metrics).
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_npm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_s3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

Expand Down
Loading

0 comments on commit 80e743c

Please sign in to comment.