Skip to content

Commit ebd5e81

Browse files
authored
feat: merge-train/spartan (#20663)
BEGIN_COMMIT_OVERRIDE revert: rollback 2nd nightly image (#20646) feat: tcmalloc enabled in docker images (#20644) END_COMMIT_OVERRIDE
2 parents 33968d8 + 9857b01 commit ebd5e81

File tree

5 files changed

+27
-38
lines changed

5 files changed

+27
-38
lines changed

.github/workflows/ci3.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ jobs:
138138
fail-fast: false
139139
matrix:
140140
test_set: ["1", "2"]
141-
# We run after a spartan release (from merge-train/spartan), or when the ci-network-scenario label is present in a PR.
141+
# We either run after a release (tag starting with v), or when the ci-network-scenario label is present in a PR.
142+
# We exclude ci-release-pr test tags (v0.0.1-commit.*) which are only for testing the release process.
142143
needs: ci
143-
if: github.event.pull_request.head.repo.fork != true && github.event.pull_request.draft == false && ((startsWith(github.ref, 'refs/tags/v') && contains(github.ref_name, '-spartan.')) || contains(github.event.pull_request.labels.*.name, 'ci-network-scenario'))
144+
if: github.event.pull_request.head.repo.fork != true && github.event.pull_request.draft == false && ((startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-commit.')) || contains(github.event.pull_request.labels.*.name, 'ci-network-scenario'))
144145
steps:
145146
- name: Remove label (one-time use)
146147
if: github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'ci-network-scenario')
@@ -187,8 +188,8 @@ jobs:
187188
./.github/ci3.sh network-scenarios next-scenario "$namespace" "$docker_image" "${{ matrix.test_set }}"
188189
189190
- name: Cleanup network resources
190-
# Clean up if this is a CI label or spartan.
191-
if: always() && (!startsWith(github.ref, 'refs/tags/v') || contains(github.ref_name, '-spartan.'))
191+
# Clean up if this is a CI label or nightly.
192+
if: always() && (!startsWith(github.ref, 'refs/tags/v') || contains(github.ref_name, '-nightly.'))
192193
env:
193194
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
194195
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/deploy-next-net.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Deploy next-net environment from merge-train/spartan
1+
# Deploy next-net environment
22
# This workflow deploys the next-net environment with a specified version
3-
# Runs nightly with the latest spartan nightly tag, or can be manually triggered with any image
3+
# Runs nightly with the latest nightly tag, or can be manually triggered with any image
44
name: Deploy Next Net
55

66
on:
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111
inputs:
1212
image_tag:
13-
description: 'Docker image tag (e.g., 2.3.4, 3.0.0-spartan.20251004-amd64, or leave empty for latest spartan nightly)'
13+
description: 'Docker image tag (e.g., 2.3.4, 3.0.0-nightly.20251004-amd64, or leave empty for latest nightly)'
1414
required: false
1515
type: string
1616

@@ -27,8 +27,6 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
30-
with:
31-
ref: merge-train/spartan
3230

3331
- name: Determine image tag
3432
id: determine_tag
@@ -38,22 +36,22 @@ jobs:
3836
TAG="${{ inputs.image_tag }}"
3937
echo "Using manually specified tag: $TAG"
4038
41-
# Extract semver (remove -amd64 suffix if present, remove -spartan.YYYYMMDD if present)
42-
SEMVER=$(echo "$TAG" | sed 's/-amd64$//' | sed 's/-spartan\.[0-9]\{8\}//')
39+
# Extract semver (remove -amd64 suffix if present, remove -nightly.YYYYMMDD if present)
40+
SEMVER=$(echo "$TAG" | sed 's/-amd64$//' | sed 's/-nightly\.[0-9]\{8\}//')
4341
else
44-
# Scheduled nightly run - get latest spartan nightly tag
42+
# Scheduled nightly run - get latest nightly tag
4543
current_version=$(jq -r '."."' .release-please-manifest.json)
4644
echo "Current version: $current_version"
4745
48-
# Format the tag as: <current_version>-spartan.<YYYYMMDD>-amd64
49-
nightly_tag="${current_version}-spartan.$(date -u +%Y%m%d)-amd64"
46+
# Format the tag as: <current_version>-nightly.<YYYYMMDD>-amd64
47+
nightly_tag="${current_version}-nightly.$(date -u +%Y%m%d)-amd64"
5048
5149
# Check if the tag exists on docker hub
5250
TAGS=$(curl -s https://registry.hub.docker.com/v2/repositories/aztecprotocol/aztec/tags/$nightly_tag)
5351
if [[ "$TAGS" != *"not found"* ]]; then
5452
TAG="$nightly_tag"
5553
SEMVER="$current_version"
56-
echo "Using spartan nightly tag: $TAG"
54+
echo "Using nightly tag: $TAG"
5755
else
5856
echo "Error: Tag $nightly_tag not published to docker hub"
5957
exit 1
@@ -70,5 +68,5 @@ jobs:
7068
network: next-net
7169
semver: ${{ needs.get-image-tag.outputs.semver }}
7270
docker_image_tag: ${{ needs.get-image-tag.outputs.tag }}
73-
ref: merge-train/spartan
71+
ref: ${{ github.ref }}
7472
secrets: inherit

.github/workflows/nightly-release-tag.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,3 @@ jobs:
3333
# Tag and push.
3434
git tag -a "$nightly_tag" -m "$nightly_tag"
3535
git push origin "$nightly_tag"
36-
37-
nightly-release-tag-spartan:
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
41-
with:
42-
ref: merge-train/spartan
43-
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
44-
45-
- name: Create Spartan Nightly Tag
46-
run: |
47-
git config --global user.email "tech@aztecprotocol.com"
48-
git config --global user.name "AztecBot"
49-
current_version=$(jq -r '."."' .release-please-manifest.json)
50-
echo "Current version: $current_version"
51-
nightly_tag="v${current_version}-spartan.$(date -u +%Y%m%d)"
52-
echo "Spartan nightly tag: $nightly_tag"
53-
# Tag and push.
54-
git tag -a "$nightly_tag" -m "$nightly_tag"
55-
git push origin "$nightly_tag"

barretenberg/cpp/scripts/run_bench.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ filter=$4
1414
export GTEST_COLOR=1
1515
export HARDWARE_CONCURRENCY=${CPUS:-8}
1616

17+
# Set ALLOCATOR=tcmalloc to use tcmalloc via LD_PRELOAD.
18+
BENCH_PRELOAD=""
19+
if [ "${ALLOCATOR:-}" = "tcmalloc" ]; then
20+
sudo apt-get update -qq && sudo apt-get install -y -qq libtcmalloc-minimal4t64
21+
BENCH_PRELOAD="/usr/lib/$(uname -m)-linux-gnu/libtcmalloc_minimal.so.4"
22+
fi
23+
1724
mkdir -p bench-out/$(dirname $name)
1825

1926
export MEMUSAGE_OUT="bench-out/$name-peak-memory-mb.txt"
2027

2128
case $arch in
2229
native)
23-
memusage $bin --benchmark_out=./bench-out/$name.json --benchmark_filter=$filter
30+
LD_PRELOAD="${BENCH_PRELOAD}" memusage $bin --benchmark_out=./bench-out/$name.json --benchmark_filter=$filter
2431
;;
2532
wasm)
2633
memusage ./scripts/wasmtime.sh $bin --benchmark_out=./bench-out/$name.json --benchmark_filter=$filter

release-image/Dockerfile.base

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ RUN apt update && apt install -y \
2323
netcat-openbsd \
2424
parallel \
2525
curl \
26-
gnupg && \
26+
gnupg \
27+
libtcmalloc-minimal4t64 && \
2728
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
2829
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
2930
apt update && apt install nodejs && \
@@ -33,6 +34,8 @@ COPY --from=build /opt/foundry/bin/anvil /opt/foundry/bin/anvil
3334
COPY --from=build /opt/foundry/bin/forge /opt/foundry/bin/forge
3435
COPY --from=build /opt/foundry/bin/cast /opt/foundry/bin/cast
3536
ENV PATH="/opt/foundry/bin:$PATH" FOUNDRY_DISABLE_NIGHTLY_WARNING="1"
37+
# Use tcmalloc for reduced memory fragmentation and improved allocation performance.
38+
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4"
3639
# Copy in production dependencies.
3740
COPY --from=build /usr/src/yarn-project/node_modules /usr/src/yarn-project/node_modules
3841
# We install a symlink to yarn-project's node_modules at a location that all portalled packages can find as they

0 commit comments

Comments
 (0)