Skip to content
Merged
4 changes: 2 additions & 2 deletions .github/workflows/ci3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Run Backwards Compatibility E2E Tests
timeout-minutes: 330
timeout-minutes: 60
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -331,7 +331,7 @@ jobs:
CI3_INSTANCE_PROFILE_NAME: ${{ secrets.CI3_INSTANCE_PROFILE_NAME }}
CI3_SECURITY_GROUP_ID: ${{ secrets.CI3_SECURITY_GROUP_ID }}
RUN_ID: ${{ github.run_id }}
AWS_SHUTDOWN_TIME: 300
AWS_SHUTDOWN_TIME: 60
run: ./.github/ci3.sh compat-e2e

# Publishes the release (npm, Docker, GitHub release, aztec-up scripts, etc.).
Expand Down
14 changes: 13 additions & 1 deletion aztec-up/bin/0.0.1/install
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,21 @@ function echo_yellow {
}

function timeout {
if [ "${CI:-0}" = "1" ] || [ "${CI:-0}" = "true" ]; then
if [ "${CI:-0}" != "1" ] && [ "${CI:-0}" != "true" ]; then
shift
"$@"
return
fi
if [ -x /usr/bin/timeout ]; then
# Prefer coreutils `timeout` when available. Absolute path avoids re-entering this function.
/usr/bin/timeout "$@"
elif perl -e1 2>/dev/null; then
# Fall back to perl's `alarm` when /usr/bin/timeout is missing.
local duration=$1
shift
perl -e "alarm $duration; exec @ARGV" -- "$@"
else
# No timeout backend available -- run unguarded rather than fail the install.
shift
"$@"
fi
Expand Down
2 changes: 1 addition & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ case "$cmd" in
# against contract artifacts from prior stable releases.
export CI_DASHBOARD="releases"
export JOB_ID="x-compat-e2e"
export AWS_SHUTDOWN_TIME=300
export AWS_SHUTDOWN_TIME=60
rc=0
bootstrap_ec2 "./bootstrap.sh ci-compat-e2e" || rc=$?
# On nightly tags compat-e2e is non-blocking (continue-on-error in ci3.yml), so
Expand Down
7 changes: 4 additions & 3 deletions yarn-project/aztec/scripts/add_crate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ TEMPLATE_DIR="$(dirname $0)/templates/$template"
# Copy template crates and substitute placeholders
cp -r "$TEMPLATE_DIR/contract" "$contract_dir"
cp -r "$TEMPLATE_DIR/test" "$test_dir"
# Use perl -i for portability across os.
find "$contract_dir" "$test_dir" -type f -exec \
sed -i -e "s/__CRATE_NAME__/${crate_name}/g" -e "s/__AZTEC_VERSION__/${AZTEC_VERSION}/g" {} +
perl -i -pe "s/__CRATE_NAME__/${crate_name}/g; s/__AZTEC_VERSION__/${AZTEC_VERSION}/g" {} +

# Add members to workspace Nargo.toml
if grep -q 'members\s*=\s*\[\s*\]' Nargo.toml; then
# Empty array: members = []
sed -i "s|members\s*=\s*\[\s*\]|members = [\"${contract_dir}\", \"${test_dir}\"]|" Nargo.toml
perl -i -pe "s|members\s*=\s*\[\s*\]|members = [\"${contract_dir}\", \"${test_dir}\"]|" Nargo.toml
else
# Non-empty array: add before closing ]
sed -i "s|\(members\s*=\s*\[.*\)\]|\1, \"${contract_dir}\", \"${test_dir}\"]|" Nargo.toml
perl -i -pe "s|(members\s*=\s*\[.*)\]|\1, \"${contract_dir}\", \"${test_dir}\"]|" Nargo.toml
fi

echo "Created crates '${contract_dir}' and '${test_dir}'"
Loading