Skip to content

Commit

Permalink
Revert "Remove debugging"
Browse files Browse the repository at this point in the history
This reverts commit 83bb5a9.
  • Loading branch information
ludamad committed Sep 3, 2023
1 parent ac55fb0 commit 6aabc6d
Show file tree
Hide file tree
Showing 93 changed files with 96 additions and 96 deletions.
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

export CLEAN=${1:-}

Expand Down
2 changes: 1 addition & 1 deletion bootstrap_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# cd yarn-project/end-to-end
# ONLY_TARGET=false ../../bootstrap_docker.sh

set -e
set -xe

TARGET_PROJECT=$1
COMMIT_HASH=$(git rev-parse HEAD)
Expand Down
2 changes: 1 addition & 1 deletion build-system/remote_build/remote_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# - Perform the build of the image itself. With the cache primed we should only have to rebuild the necessary layers.
# - Push the image tagged with the commit hash to the cache.

set -euo pipefail
set -xeuo pipefail

REPOSITORY=$1
FORCE_BUILD=${2:-"false"}
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/build_local
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# If DOCKERFILE is excluded it tries to default to ./Dockerfile then ./<PROJECT_DIR_NAME>/Dockerfile
# If REPO is excluded it defaults to PROJECT_DIR_NAME.

set -eu
set -xeu

TARGET_PROJECT=$1
ONLY_TARGET=$2
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/check_npm_version
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

readonly LOCAL_VERSION=$(node -pe "require('./package.json').version")
readonly PACKAGE_NAME=${1:-./}
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/check_rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Fails if any files matching the rebuild patterns, have changed since the base commit.
# If this script fails (nonzero exit), then the caller should rebuild.
# The rebuild patterns are taken from the build manifest (computed from set of dependencies).
set -euo pipefail
set -xeuo pipefail

TAG=$1
REPOSITORY=$2
Expand Down
4 changes: 2 additions & 2 deletions build-system/scripts/cond_spot_run_build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -eu
set -o pipefail
set -xeu
set -xo pipefail

REPOSITORY=$1
shift
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
Expand Up @@ -14,7 +14,7 @@
# 2. SUCCESS_TAG: To track if this job needs to be run, the repository image is tagged with a prefix after a
# successful run. The script will only run if there were relevant code changes since the last successful commit.
# 3... ARGS: Arguments to pass to spot_run_script.
set -eu
set -xeu

REPOSITORY=$1
shift
Expand Down
4 changes: 2 additions & 2 deletions build-system/scripts/cond_spot_run_test_script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu
SCRIPT_PATH=$1
REPOSITORY=$2
shift
Expand All @@ -9,5 +9,5 @@ cd $(query_manifest projectDir $REPOSITORY)

mkdir -p /tmp/test-logs

set -o pipefail
set -xo pipefail
cond_spot_run_script $REPOSITORY $JOB_NAME 32 $SCRIPT_PATH $@ | tee "/tmp/test-logs/$JOB_NAME.log"
2 changes: 1 addition & 1 deletion build-system/scripts/cond_spot_run_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -eu
set -xeu

cond_spot_run_test_script ./scripts/run_tests $@
2 changes: 1 addition & 1 deletion build-system/scripts/deploy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

REPOSITORY=$1
SERVICES=${2:-$REPOSITORY}
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_dockerhub
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

if [ -z "$COMMIT_TAG" ]; then
echo "Will only push tagged builds to dockerhub. Skipping."
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_ecr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

REPOSITORY=$1
IMAGE_COMMIT_URI=$ECR_URL/$REPOSITORY:cache-$CONTENT_HASH
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_global
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Deployment script for global service (e.g. company website and metrics).
set -eu
set -xeu

REPOSITORY=$1

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_npm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

readonly REPOSITORY=$1
readonly STANDALONE=$2
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_s3
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

REPOSITORY=$1
# A global deploy, doesn't namespace under a deploy tag (e.g. company website, metrics)
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_service
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

# Redeploy service with latest image.
SERVICE_NAME=$1
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/deploy_terraform
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

REPOSITORY=$1
TF_DIR=$2
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/ensure_apt_package
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

if dpkg -s $1 &> /dev/null; then
exit 0
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/ensure_repo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Logs the shell into the ECR instance at the given region, establishes if the given repository exists, creates it if it
# doesn't, and re-applies thie lifecycle policy (determines when images should be automatically deleted) if it does.
set -eu
set -xeu

LIFECYCLE_POLICY='{
"rules": [
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/ensure_terraform
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Downloads and installs `terraform` if it's not installed.
set -eu
set -xeu

[ ! -f /usr/local/bin/terraform ] || exit 0

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/erase_image_tags
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Erase the image tag associated with the last commit for the given repository.
# If TILL_COMMIT_HASH is given, erase tags going back in time until we reach TILL_COMMIT_HASH.
set -eu
set -xeu

REPOSITORY=$1
TILL_COMMIT_HASH=$2
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/extract_repo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Given a repository, extracts the builds entire /usr/src dir to the given path.
set -eu
set -xeu

REPOSITORY=$1
EXTRACT_FROM=${2:-/usr/src}
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/init_submodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# For a given repository, init any required submodules.
set -euo pipefail
set -xeuo pipefail

REPOSITORY=$1

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/query_manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu
CMD=$1
REPO=$2

Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/remote_run_script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

IP=$1
CONTENT_HASH=$2
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/request_spot
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

NAME=$1
CPUS=${2:-32}
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/retry_10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -eu
set -xeu
# Retries up to 10 times with 10 second intervals
for i in $(seq 1 10); do
"$@" && exit || sleep 10
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/setup_env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# The script should be sourced from the root of the repository, e.g:
# source ./build-system/scripts/setup_env
# This ensures the resultant variables are set in the calling shell.
set -eu
set -xeu

COMMIT_HASH=$1
COMMIT_TAG=$2
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/spot_run_script
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 1. Content hash for our repository contents. Used for identify spot jobs and image tags.
# 2. SPEC: Instance specification filename.
# 3... ARGS: Arguments to pass to remote_run_script.
set -eu
set -xeu
CONTENT_HASH=$1
SPEC=$2
shift 2
Expand Down
4 changes: 2 additions & 2 deletions build-system/scripts/spot_run_test_script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu
SCRIPT_PATH=$1
REPOSITORY=$2
shift
Expand All @@ -9,7 +9,7 @@ cd $(query_manifest projectDir $REPOSITORY)

mkdir -p /tmp/test-logs

set -o pipefail
set -xo pipefail

CONTENT_HASH=$(calculate_content_hash $REPOSITORY)
echo "Content hash: $CONTENT_HASH"
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/spot_run_tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -eu
set -xeu

spot_run_test_script ./scripts/run_tests $@
2 changes: 1 addition & 1 deletion build-system/scripts/store_test_benchmark_logs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

REPOSITORY=$1
shift
Expand Down
2 changes: 1 addition & 1 deletion build-system/scripts/tag_remote_image
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

REPOSITORY=$1
EXISTING_TAG=$2
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# BB: to specify a different binary to test with (e.g. bb.js or bb.js-dev).
# VERBOSE: to enable logging for each test.

set -eu
set -xeu

BB=$PWD/${BB:-../cpp/build/bin/bb}
CRS_PATH=~/.bb-crs
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/bootstrap_docker.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# This script builds the projects listed in build_mainifest.sh.

set -eu
set -xeu

COMMIT_HASH=$(git rev-parse HEAD)
source ./build-system/scripts/setup_env $COMMIT_HASH '' mainframe_$USER $(git rev-parse --show-toplevel)
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/bin-test/bin-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# Script is assumed to be run from
set -eu
set -xeu

bb() {
../build/bin/bb "$@" -v
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

# Clean.
rm -rf ./build
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/format.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

if [ "$1" == "staged" ]; then
echo Formatting staged files...
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/scripts/bb-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/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
set -xeu

$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null
REPOSITORY=barretenberg-x86_64-linux-clang-assert
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/scripts/bin-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Executes the bb binary test script.
set -eu
set -xeu

$(aws ecr get-login --region us-east-2 --no-include-email) 2> /dev/null
REPOSITORY=barretenberg-x86_64-linux-clang-assert
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/scripts/install-wasi-sdk.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

# Clean.
rm -rf ./src/wasi-sdk-*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

# To be called from CI for testing with docker and AWS.
# Can't be called locally unless AWS credentials are set up.
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/scripts/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 1. The number of ignition transcripts to download.
# 2. The set of gtest binary names to run.
# 3-n. The arguments to pass to the gtest binaries.
set -eu
set -xeu

NUM_TRANSCRIPTS=$1
TESTS=$2
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/cpp/srs_db/download_ignition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# If a checksums file is available, it will be used to validate if a download is required
# and also check the validity of the downloaded transcripts. If not the script downloads
# whatever is requested but does not check the validity of the downloads.
set -eu
set -xeu

mkdir -p ignition
cd ignition
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/scripts/bindgen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -eu
set -xeu

#find ./cpp/src -type f -name "c_bind*.hpp" | ./scripts/decls_json.py > exports.json
cat ./scripts/c_bind_files.txt | ./scripts/decls_json.py > exports.json
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/barretenberg/sol/scripts/install_foundry.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -eu
set -xeu

export FOUNDRY_DIR="$PWD/.foundry"
FOUNDRY_BIN_DIR="$FOUNDRY_DIR/bin"
Expand Down
2 changes: 1 addition & 1 deletion circuits/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Takes a list of targets from commandline
# Takes CLEAN as an environment variable. If passed, cleans build artifacts
set -eu
set -xeu

export WASI_VERSION=20

Expand Down
Loading

0 comments on commit 6aabc6d

Please sign in to comment.