Skip to content

Commit 059ce01

Browse files
toolchain: sync vendored v0.3
Single non-merge commit (archive replace, not subtree pull) so the update stays rebase-mergeable. git-subtree-dir: toolchain git-subtree-split: 267a74a88114dc9c292e49acc6b950241190058e
1 parent 77639f6 commit 059ce01

3 files changed

Lines changed: 28 additions & 23 deletions

File tree

template/build/toolchain.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# release `v<TOOLCHAIN_VERSION>` holding the whole set; consumers pin this one
66
# number, and the cache is keyed by it (cache/yeet/toolchain/v<N>/<arch>/). CI
77
# bumps it by 0.1 on every publish (which only happens when build/ changes).
8-
TOOLCHAIN_VERSION=0.1
8+
TOOLCHAIN_VERSION=0.3
99

1010
# Where a consumer fetches assets from: the version-tagged release. The fetch
1111
# appends `/v<TOOLCHAIN_VERSION>/<tool>-<arch>`.
@@ -27,7 +27,7 @@ CLANG_SHA256_aarch64=105fb2d324095127a127bcba56702a86229ed8892ce6429802d30585fa2
2727
BPFTOOL_VERSION=7.7.0
2828
BPFTOOL_SHA256_x86_64=74bd16335aa1c40714fb50287a42766c6faa4958f969cce32fef89485ce4934c
2929
BPFTOOL_SHA256_aarch64=2b3fc4dd5e4e40bd8d670c5f1fa9693b3f879a122c0f6a3eb806dfc6735da6b7
30-
LIBBPF_HEADERS_SHA256=f19af8beb34b8274890ca30821eccaced42083c2a923853a73e76cca9bbf4625
30+
LIBBPF_HEADERS_SHA256=bd0f88dbf44ec9bff33fba039bc824e48bdd5f35b7217e510fffe1623a7cb648
3131

3232
# GNU make — the build driver. Built static from source (tiny, fast). Since
3333
# make can't fetch itself, `yeet build` bootstraps it into the cache at the

toolchain/.github/workflows/vendor.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,36 @@ jobs:
166166
sed -i "s|^LIBBPF_HEADERS_SHA256=.*|LIBBPF_HEADERS_SHA256=${hsum}|" build/versions.env
167167
grep -E '_SHA256_|^LIBBPF_HEADERS_SHA256=' build/versions.env
168168
169+
- name: Tag immutable v${{ env.TC }} snapshot
170+
run: |
171+
set -euo pipefail
172+
tag="v${TC}"
173+
# master is protected (PR/merge-queue only), so we never push it. The
174+
# recorded lock (bumped version + checksums) and the SDK headers land
175+
# in the commit the version tag points at, so the tag is fully
176+
# self-contained: `git show ${tag}:build/versions.env` yields the exact
177+
# lock for this release. Binaries are NOT committed — they ride the
178+
# release as assets (x86_64/ and aarch64/ are gitignored).
179+
if git ls-remote --exit-code --tags origin "refs/tags/${tag}" >/dev/null 2>&1; then
180+
echo "tag ${tag} already exists — leaving the immutable tag as-is"
181+
else
182+
git config user.name "github-actions[bot]"
183+
git config user.email "github-actions[bot]@users.noreply.github.com"
184+
git add include build/versions.env
185+
git commit -m "toolchain ${tag}: record version, checksums + headers"
186+
git tag -a "$tag" -m "Static build toolchain ${tag}"
187+
git push origin "refs/tags/${tag}"
188+
fi
189+
169190
- name: Publish v${{ env.TC }} release
170191
env:
171192
GH_TOKEN: ${{ github.token }}
172193
run: |
173194
set -euo pipefail
174195
tag="v${TC}"
175-
# Immutable, version-tagged release; the tag carries the version, so
176-
# assets are plain-named (<tool>-<arch>). Consumers pin this one tag.
196+
# Immutable, version-tagged release pinned to the snapshot tag above;
197+
# the tag carries the version, so assets are plain-named (<tool>-<arch>).
198+
# Consumers pin this one tag.
177199
mkdir -p dist
178200
for a in x86_64 aarch64; do
179201
for t in clang make bpftool esbuild git; do cp "$a/$t" "dist/${t}-${a}"; done
@@ -184,20 +206,3 @@ jobs:
184206
--notes "Static build toolchain $tag — clang/make/git built from source; bpftool/esbuild/libbpf headers re-hosted."
185207
# --clobber so a same-version re-run refreshes assets.
186208
gh release upload "$tag" dist/* --clobber
187-
188-
- name: Commit headers + recorded checksums
189-
run: |
190-
set -euo pipefail
191-
# Binaries are NOT committed — they are published as release assets
192-
# above and fetched into the per-machine cache. Only the SDK headers
193-
# and the recorded checksums land in git (x86_64/ and aarch64/ are
194-
# gitignored).
195-
git config user.name "github-actions[bot]"
196-
git config user.email "github-actions[bot]@users.noreply.github.com"
197-
git add include build/versions.env
198-
if git diff --cached --quiet; then
199-
echo "no changes to commit"
200-
else
201-
git commit -m "toolchain v${TC}: record version, checksums + headers"
202-
git push
203-
fi

toolchain/build/versions.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# release `v<TOOLCHAIN_VERSION>` holding the whole set; consumers pin this one
66
# number, and the cache is keyed by it (cache/yeet/toolchain/v<N>/<arch>/). CI
77
# bumps it by 0.1 on every publish (which only happens when build/ changes).
8-
TOOLCHAIN_VERSION=0.1
8+
TOOLCHAIN_VERSION=0.3
99

1010
# Where a consumer fetches assets from: the version-tagged release. The fetch
1111
# appends `/v<TOOLCHAIN_VERSION>/<tool>-<arch>`.
@@ -27,7 +27,7 @@ CLANG_SHA256_aarch64=105fb2d324095127a127bcba56702a86229ed8892ce6429802d30585fa2
2727
BPFTOOL_VERSION=7.7.0
2828
BPFTOOL_SHA256_x86_64=74bd16335aa1c40714fb50287a42766c6faa4958f969cce32fef89485ce4934c
2929
BPFTOOL_SHA256_aarch64=2b3fc4dd5e4e40bd8d670c5f1fa9693b3f879a122c0f6a3eb806dfc6735da6b7
30-
LIBBPF_HEADERS_SHA256=f19af8beb34b8274890ca30821eccaced42083c2a923853a73e76cca9bbf4625
30+
LIBBPF_HEADERS_SHA256=bd0f88dbf44ec9bff33fba039bc824e48bdd5f35b7217e510fffe1623a7cb648
3131

3232
# GNU make — the build driver. Built static from source (tiny, fast). Since
3333
# make can't fetch itself, `yeet build` bootstraps it into the cache at the

0 commit comments

Comments
 (0)