Skip to content

Commit 0213aa0

Browse files
authored
feat: allow commit releases (#18278)
Please read [contributing guidelines](CONTRIBUTING.md) and remove this line. For audit-related pull requests, please use the [audit PR template](?expand=1&template=audit.md).
2 parents 5ff2200 + aac6c35 commit 0213aa0

File tree

7 files changed

+22
-52
lines changed

7 files changed

+22
-52
lines changed

.github/workflows/ci3.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ jobs:
7878
if: contains(github.event.pull_request.labels.*.name, 'barretenberg-ci') || (github.event.pull_request.base.ref == 'merge-train/barretenberg')
7979
run: echo "CI_BARRETENBERG=1" >> $GITHUB_ENV
8080

81+
- name: CI Release PR Override
82+
if: contains(github.event.pull_request.labels.*.name, 'ci-release-pr')
83+
run: echo "CI_RELEASE_PR=1" >> $GITHUB_ENV
84+
8185
# Allow full concurrency for merge-train PRs, one-run-per-branch for everything else.
8286
- name: Set Instance Postfix for merge-train
8387
if: startsWith(github.event.pull_request.head.ref, 'merge-train/')
@@ -139,17 +143,21 @@ jobs:
139143
EXTERNAL_ETHEREUM_CONSENSUS_HOST_API_KEY: ${{ secrets.GCP_SEPOLIA_API_KEY }}
140144
EXTERNAL_ETHEREUM_CONSENSUS_HOST_API_KEY_HEADER: "X-goog-api-key"
141145
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
146+
PR_NUMBER: ${{ github.event.pull_request.number }}
142147
run: |
143148
if [ "${{ github.event_name }}" == "merge_group" ] || [ "${CI_MERGE_QUEUE:-0}" -eq 1 ]; then
144149
exec ./ci.sh merge-queue
150+
elif [ "${CI_RELEASE_PR:-0}" -eq 1 ]; then
151+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
152+
tag_name="v0.0.1-commit.$(git rev-parse --short HEAD)"
153+
git tag ${tag_name}
154+
git push origin ${tag_name}
145155
elif [ "${CI_FULL:-0}" -eq 1 ]; then
146156
exec ./ci.sh full
147157
elif [ "${CI_DOCS:-0}" -eq 1 ]; then
148158
exec ./ci.sh docs
149159
elif [ "${CI_BARRETENBERG:-0}" -eq 1 ]; then
150160
exec ./ci.sh barretenberg
151-
elif [ "${{ contains(github.ref, '-nightly.') }}" == "true" ] || [ "${{ contains(github.ref, '-rc.') }}" == "true" ]; then
152-
exec ./ci.sh nightly
153161
elif [ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]; then
154162
exec ./ci.sh release
155163
else

.github/workflows/test-network-scenarios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: |
5252
git fetch --tags --force
5353
tag=$(git tag --points-at "${{ github.event.workflow_run.head_sha }}" | head -n1)
54-
if echo "$tag" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+' && ! echo "$tag" | grep -q 'fake'; then
54+
if echo "$tag" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+' && ! echo "$tag" | grep -q 'commit'; then
5555
echo "should_run=true" >> $GITHUB_OUTPUT
5656
echo "Found semver tag: $tag"
5757
else

.test_patterns.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ tests:
9999
skip: true
100100
owners:
101101
- *charlie
102+
- regex: "noir-protocol-circuits blob blob_batching::tests::test_max_blobs_batched"
103+
error_regex: "core dumped"
104+
owners:
105+
- *tom
102106

103107
# AD: hit this flake
104108
# 18:04:38 thread 'arb_program_freqs_in_expected_range' panicked at tooling/ast_fuzzer/tests/calibration.rs:75:5:

bootstrap.sh

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,7 @@ function test_cmds {
176176

177177
function start_test_env {
178178
# Starting txe servers with incrementing port numbers.
179-
trap '(kill -SIGTERM $txe_pids &>/dev/null || true) && ./spartan/bootstrap.sh stop_env' EXIT
180-
181-
# Start env for spartan tests in the background
182-
dump_fail "spartan/bootstrap.sh start_env" &
183-
spartan_pid=$!
179+
trap 'kill -SIGTERM $txe_pids &>/dev/null || true' EXIT
184180

185181
for i in $(seq 0 $((NUM_TXES-1))); do
186182
port=$((45730 + i))
@@ -203,13 +199,6 @@ function start_test_env {
203199
j=$((j+1))
204200
done
205201
done
206-
207-
echo "Waiting for spartan environment to complete setup..."
208-
if wait $spartan_pid; then
209-
echo "Spartan environment setup completed successfully."
210-
else
211-
echo_stderr "Spartan environment setup failed. Exiting."
212-
fi
213202
}
214203

215204
function test {
@@ -444,16 +433,6 @@ case "$cmd" in
444433
test
445434
bench
446435
;;
447-
"ci-nightly")
448-
export CI=1
449-
export USE_TEST_CACHE=1
450-
export CI_NIGHTLY=1
451-
build
452-
release-image/bootstrap.sh push
453-
# TODO this should become a ci-nightly-tests ran in parallel with a normal ci-release
454-
# test
455-
release
456-
;;
457436
"ci-network-deploy")
458437
export CI=1
459438
build

ci.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function run_ci_with_cache {
105105
# Upload success marker
106106
echo "success" > success.txt
107107
cache_upload "$cache_key" success.txt
108+
rm success.txt
108109
}
109110

110111
case "$cmd" in
@@ -152,18 +153,6 @@ case "$cmd" in
152153
export AWS_SHUTDOWN_TIME=360 # 6 hours for network tests
153154
bootstrap_ec2 "./bootstrap.sh ci-network-tests"
154155
;;
155-
"nightly")
156-
prep_vars
157-
# Spin up ec2 instance and run the nightly flow.
158-
run() {
159-
JOB_ID=$1 INSTANCE_POSTFIX=$1 ARCH=$2 exec denoise "bootstrap_ec2 './bootstrap.sh ci-nightly'"
160-
}
161-
export -f run
162-
# We need to run the release flow on both x86 and arm64.
163-
parallel --termseq 'TERM,10000' --tagstring '{= $_=~s/run (\w+).*/$1/; =}' --line-buffered --halt now,fail=1 ::: \
164-
'run x-nightly amd64' \
165-
'run a-nightly arm64' | DUP=1 cache_log "Nightly CI run" $RUN_ID
166-
;;
167156
"release")
168157
prep_vars
169158
# Spin up ec2 instance and run the release flow.
@@ -175,6 +164,10 @@ case "$cmd" in
175164
parallel --termseq 'TERM,10000' --tagstring '{= $_=~s/run (\w+).*/$1/; =}' --line-buffered --halt now,fail=1 ::: \
176165
'run x-release amd64' \
177166
'run a-release arm64' | DUP=1 cache_log "Release CI run" $RUN_ID
167+
# If we were triggered by a PR with ci-release-pr label, remove the label now we've succeeded.
168+
if [ -n "${PR_NUMBER:-}" ]; then
169+
gh pr edit $PR_NUMBER --remove-label ci-release-pr || true
170+
fi
178171
;;
179172
"shell-new")
180173
# Spin up ec2 instance, clone, and drop into shell.

ci3/source_refname

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ if [ -z "${CI_FULL:-}" ]; then
3636
export CI_FULL=1
3737
fi
3838
fi
39-
export CI_NIGHTLY="${CI_NIGHTLY:-0}"
4039
export CI_SCENARIO_TEST="${CI_SCENARIO_TEST:-0}"
4140

4241
if [ -z "${COMMIT_HASH:-}" ]; then

spartan/bootstrap.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,6 @@ function single_test {
8787
$root/yarn-project/end-to-end/scripts/run_test.sh simple $test_file
8888
}
8989

90-
function start_env {
91-
if [ "$CI_NIGHTLY" -eq 1 ] && [ "$(arch)" != "arm64" ]; then
92-
echo "Skipping start_env for nightly while we migrate to use the same deployment flow as the scenario/staging networks."
93-
fi
94-
}
95-
96-
function stop_env {
97-
if [ "$CI_NIGHTLY" -eq 1 ] && [ "$(arch)" != "arm64" ]; then
98-
echo "Skipping stop_env for nightly while we migrate to use the same deployment flow as the scenario/staging networks."
99-
fi
100-
}
101-
102-
10390
function test {
10491
echo_header "spartan test (deprecated)"
10592
# the existing test flow is deprecated.
@@ -230,7 +217,7 @@ case "$cmd" in
230217
"hash")
231218
echo $hash
232219
;;
233-
test|test_cmds|gke|build|start_env|stop_env|gcp_auth)
220+
test|test_cmds|gke|build|gcp_auth)
234221
$cmd
235222
;;
236223
"test-kind-smoke")

0 commit comments

Comments
 (0)