Commit fbae1bf
authored
feat: hash-based manual release workflow (#20)
* feat: hash-based manual release workflow
Mirror the manual build/release pipeline from e2b-dev/fc-versions, but
identify each kernel build by a content hash of its inputs (configs +
optional patches). Changing a flag or adding a patch yields a new
artifact named vmlinux-<version>_<sha256[:7]>.
- scripts/validate.py: resolves version names, computes hashes, builds
the matrix and skips arches whose artifact is already in the GitHub
release.
- build.sh: now accepts <kernel_version> [arch], computes the same
version_name (or honors VERSION_NAME), supports patches/<version>/.
- .github/workflows/release.yml: workflow_dispatch with validate ->
build -> publish (GH release) -> deploy (GCS), skipping work whose
artifacts already exist.
- Drops the old build-on-every-push workflow; releases are explicit.
* fix: preserve version_name in artifact, force checkout
- upload-artifact: keep version_name in the artifact tree so the
publish step's ./builds/<version_name>/<arch>/vmlinux.bin lookup
resolves after merge-multiple download.
- build.sh: git checkout -f so a dirty tree from a prior iteration's
apply_patches doesn't abort multi-version local builds.
* fix: hash only top-level *.patch files
apply_patches only processes patches/<v>/*.patch, so the hash inputs
must match. Otherwise unrelated/nested files in patches/<v>/ would
silently change the version_name without affecting the build.
* fix: align bash kernel_versions.txt parser with python
Strip inline comments and trim whitespace so build.sh and
scripts/validate.py produce identical version names for entries like
`6.1.158 # stable`.
* refactor: simplify to "build everything, calver release per run"
- workflow_dispatch with no inputs; pick the branch in the GitHub UI.
- Always build every entry in kernel_versions.txt for amd64 and arm64
in parallel (one runner per arch).
- One release per run, tagged YYYY.MM.DD (with .N suffix on collision),
with every binary uploaded as vmlinux-<version>-<arch>.bin (plus the
legacy vmlinux-<version>.bin for amd64).
- Same binaries pushed to GCS under kernels/vmlinux-<version>/...
Drops the per-build content-hash version_name machinery and the
validate.py helper that fed it.
* fix: calver suffix sequence base, .1, .2 (was skipping .1)
* feat: also build on pull_request, gate publish on workflow_dispatch
Open PRs now run the build matrix and upload kernel binaries as
workflow artifacts so reviewers can grab and inspect them from the
PR's checks tab. Release/GCS publishing remains manual-only.
* feat: parallelize build per (kernel_version, arch)
Generate the build matrix dynamically from kernel_versions.txt so each
(version, arch) pair runs on its own runner. With N versions × 2 archs
that's 2N parallel jobs (e.g. 2 versions -> 4 runners).
build.sh already supports single-version mode, so no script changes;
the matrix job emits a JSON include list that the build job fans out
over.
* fix: scope id-token to publish, harden version handling, idempotent calver
- Drop workflow-level id-token: write; only the publish job (which
needs OIDC for GCP auth) gets id-token: write. PR builds no longer
receive a token they can exchange for cloud creds.
- Validate kernel versions against [0-9]+(\.[0-9]+)+ in the matrix job
and pass matrix.version to build.sh via env vars instead of inline
YAML expression interpolation, so a malicious kernel_versions.txt
entry can't shell-inject into the runner.
- Calver tag picker now also checks local and remote git tags, not
just GH releases, so retries after a partial publish no longer pick
a tag that's already been pushed.
* fix: emit Build kernels (x86_64|arm64) checks for branch protection
The 'Main' ruleset on this repo requires status checks named exactly
'Build kernels (x86_64)' and 'Build kernels (arm64)' (left over from
the previous workflow). The new per-(version, arch) jobs use different
names, so those required checks never reported and PRs couldn't merge.
Add a tiny aggregator job whose name interpolates to those exact two
strings and that gates on the build matrix's combined result, so
parallelism stays per-(version, arch) but branch protection is
satisfied.1 parent f371098 commit fbae1bf
4 files changed
Lines changed: 275 additions & 184 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | | - | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
27 | 51 | | |
28 | 52 | | |
29 | 53 | | |
30 | 54 | | |
31 | 55 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 56 | | |
40 | 57 | | |
41 | | - | |
| 58 | + | |
0 commit comments