You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gha / build.sh: switch to ghcr.io for OCI artifacts + better CI self-hosted/GH-hosted runner usage + required fixes (#306)
#### gha / build.sh: switch to ghcr.io for OCI artifacts
- 🍀 gha: build-all-matrix: eat trailing whitespace - no changes
- 🌳 gha / build.sh: switch to ghcr.io for OCI artifacts
- Hook Linuxkit containers:
- `ghcr.io/tinkerbell/hook/linuxkit/hook-bootkit:d06cdd1d-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-docker:6c15b5fd-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-udev:20b3dbd4-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-acpid:b535e04e-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-containerd:b4fb2d41-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-runc:d278063c-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-embedded:e1820943-arm64`
- Linuxkit mirror images:
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-rngd:c3b9a5b1-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-getty:c09b5e45-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-sysctl:852d65cc-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-modprobe:891b0d0e-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-openntpd:f9f38cc1-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-init:6decbe88-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-dhcpcd:08150d1f-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-sshd:8c605071-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-ca_certificates:75b188ff-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-sysfs:2b7cfc05-arm64`
- `ghcr.io/tinkerbell/hook/linuxkit/hook-linuxkit-firmware:6ffe7264-arm64`
- Kernels
- `ghcr.io/tinkerbell/hook/kernel/hook-kernel:5.10.247-03b1a1ff` (arm64)
- `ghcr.io/tinkerbell/hook/kernel/hook-kernel:5.10.247-ec172109` (amd64)
- `ghcr.io/tinkerbell/hook/kernel/hook-kernel:6.6.119-2f8a324d` (arm64)
- `ghcr.io/tinkerbell/hook/kernel/hook-kernel:6.6.119-14c9b75d` (amd64)
- `ghcr.io/tinkerbell/hook/kernel/hook-kernel-armbian:6.19-c0e83ecc-rockchip64-edge` (arm64)
- `ghcr.io/tinkerbell/hook/kernel/hook-kernel-armbian:6.19-fe11ee11-uefi-x86-edge` (amd64)
- ....
- 🌱 containerd/runc: alpine 3.22 updated default go to 1.24.11-r0, remove pin to fix build
- 🌵 gha: json-matrix: consider all 'ubuntu-*' as GH-hosted runners
- 🍃 gha: json-matrix: use GitHub's arm64 runners for arm64 builds by default
- See https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/
- 🌿 gha: runs-on should be compatible with GH-hosted runners
- "group" isn't
- 🌴 inventory: add `TYPE` info for each kernel (`source` for built-from-source, `external` for pulled-from-elsewhere)
- different types build-best on different hardware
- `external` ones benefit from GH-hosted runners, as they mostly do pulls from ghcr.io
- `source` ones benefit from beefy, multiple-core runners as they crunch a lot of C code
- 🐸 gha: json-matrix: allow specific runners per kernel type (source/external)
- will look-up runners to use in vars like `CI_RUNNER_KERNEL_SOURCE_AMD64` and `CI_RUNNER_KERNEL_EXTERNAL_AMD64`
- in _addition_ to what was already used before
- 🍀 gha: build-all-matrix: use CNCF runners only for kernels built from source
- `external` ones are a waste, since they only pull stuff and require no real horsepower
- same for LK containers and Hooks themselves; mostly small stuff that can easily run GH-hosted
- 🌳 gha: build-all-matrix: use smaller / readily available / existing CNCF runners for kernel-from-source builds
- See https://github.com/cncf/automation/blob/main/ci/README.md
- 🌱 gha: build-all-matrix: include runner in job names; enable debug for gha-matrix
- that way it's easy to see where each job runs
- and to debug any misspellings in env vars etc
- 🌵 gha: json-matrix: allow `CI_RUNNERS_SELF_HOSTED_TAG` for non-GH-hosted runners
- CNCF runners don't have the semi-standard `"self-hosted"` tag
- setting it to `none` is needed to skip it, otherwise CNCF hosted-jobs are pending forever
- also allows setting it to something else, if ever needed
- 🍃 gha: build-all-matrix: use `CI_RUNNERS_SELF_HOSTED_TAG=none`
- CNCF runners don't have the semi-standard `"self-hosted"` tag
- so this is needed to skip it, otherwise CNCF hosted-jobs are pending forever
- 🌿 bash: common: add timeouts for (host) apt operations
- sometimes GHA runners are a bit inconvenienced by network issues, and hang forever on this
- let `apt update` fail, `apt install ..` not
# Apart from the quay/ghcr coordinates above (used for both pulling & pushing), we might also want to
18
17
# log in to DockerHub (with a read-only token) so we aren't hit by rate limits when pulling the linuxkit pkgs.
19
18
# To do so, set the secret DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD in the repo secrets, and set the below to yes.
20
19
LOGIN_TO_DOCKERHUB: "yes"
21
-
20
+
22
21
HOOK_VERSION: "0.11.1-build-${{github.run_number}}"# Use a forced Hook version
23
-
22
+
24
23
# Which flavors to build? space separated list, must match one of the TAG='s in flavors (this is used by matrix_prep job in gha-matrix command)
25
24
CI_TAGS: "standard armbian-sbc armbian-uefi lts"# 'dev' is not included
26
-
27
-
# GHA runner configuration. See bash/json-matrix.sh for more details.
28
-
CI_RUNNER_LK_CONTAINERS_ARM64: "oracle-vm-32cpu-128gb-arm64"# Use a self-hosted runner with the "ARM64" tag for the ARM64 builds of LK containers
29
-
CI_RUNNER_LK_CONTAINERS_AMD64: "oracle-vm-32cpu-128gb-x86-64"# Use a self-hosted runner with the "X86" tag for the AMD64 builds of LK containers
30
-
CI_RUNNER_LK_ARM64: "oracle-vm-32cpu-128gb-arm64"# Use a self-hosted runner with the "ARM64" tag for the ARM64 linuxkit builds
31
-
CI_RUNNER_LK_AMD64: "oracle-vm-32cpu-128gb-x86-64"# Use a self-hosted runner with the "X86" tag for the AMD64 linuxkit builds
32
-
CI_RUNNER_KERNEL_AMD64: "oracle-24cpu-384gb-x86-64"# Use a self-hosted runner with the "X86" tag for the AMD64 kernel builds
33
-
CI_RUNNER_KERNEL_ARM64: "oracle-24cpu-384gb-arm64"# Use a self-hosted runner with the "ARM64" tag for the ARM64 kernel builds
34
25
26
+
# GHA runner configuration. See bash/json-matrix.sh for more details.
27
+
CI_RUNNERS_SELF_HOSTED_TAG: "none"# CNCF runners don't have the semi-standard 'self-hosted' tag
28
+
CI_RUNNER_LK_CONTAINERS_ARM64: "ubuntu-24.04-arm"# lk containers are small and relatively quick to build
29
+
CI_RUNNER_LK_CONTAINERS_AMD64: "ubuntu-latest"# lk containers are small and relatively quick to build
30
+
CI_RUNNER_LK_ARM64: "ubuntu-24.04-arm"# Hook itself (linuxkit etc.) is small and relatively quick to build once we've the lk containers & kernel ready
31
+
CI_RUNNER_LK_AMD64: "ubuntu-latest"# Hook itself (linuxkit etc.) is small and relatively quick to build once we've the lk containers & kernel ready
32
+
CI_RUNNER_KERNEL_SOURCE_AMD64: "oracle-16cpu-64gb-x86-64"# Kernels that are built _from source_ benefit from beefy self-hosted CNCF runners
33
+
CI_RUNNER_KERNEL_SOURCE_ARM64: "oracle-16cpu-64gb-arm64"# Kernels that are built _from source_ benefit from beefy self-hosted CNCF runners
34
+
CI_RUNNER_KERNEL_EXTERNAL_AMD64: "ubuntu-latest"# kernels that pull binaries from elsewhere (eg Armbian) can be built on normal runners (CNCF runners are actually worse at this)
35
+
CI_RUNNER_KERNEL_EXTERNAL_ARM64: "ubuntu-24.04-arm"# kernels that pull binaries from elsewhere (eg Armbian) can be built on normal runners (CNCF runners are actually worse at this)
35
36
36
37
jobs:
37
-
38
+
38
39
matrix_prep:
39
40
name: "Prepare matrix JSON"
40
41
runs-on: ubuntu-latest
@@ -56,18 +57,16 @@ jobs:
56
57
57
58
- name: Run the matrix JSON preparation bash script
58
59
id: prepare-matrix
59
-
run: bash build.sh gha-matrix # This sets the output "kernels_json" & "lkcontainers_json" & "lk_hooks_json" internally
60
-
60
+
run: bash build.sh gha-matrix DEBUG=yes # This sets the output "kernels_json" & "lkcontainers_json" & "lk_hooks_json" internally
61
+
61
62
build-linuxkit-containers:
62
63
needs: [ matrix_prep ]
63
-
runs-on:
64
-
group: Default
65
-
labels: "${{ matrix.runner }}"# the runner to use is determined by the 'gha-matrix' code
64
+
runs-on: "${{ matrix.runner }}"# "groups" are only for self-hosted setups! TODO: group should be determined by matrix code # the runner to use is determined by the 'gha-matrix' code
name: "LinuxKit containers for ${{ matrix.docker_arch }}"
69
+
name: "LinuxKit containers for ${{ matrix.docker_arch }} (on ${{ join(matrix.runner) }})"
71
70
steps:
72
71
- name: Checkout build repo
73
72
uses: actions/checkout@v6
@@ -109,14 +108,12 @@ jobs:
109
108
110
109
build-kernels:
111
110
needs: [ matrix_prep ] # depend on the previous job...
112
-
runs-on:
113
-
group: Default
114
-
labels: "${{ matrix.runner }}"# the runner to use is determined by the 'gha-matrix' code
111
+
runs-on: "${{ matrix.runner }}"# "groups" are only for self-hosted setups! TODO: group should be determined by matrix code # # the runner to use is determined by the 'gha-matrix' code
115
112
strategy:
116
113
fail-fast: false # let other jobs try to complete if one fails, kernels might take long, and they'd be skipped on the next run
name: "Kernel ${{ matrix.kernel }} (on ${{ join(matrix.runner) }})"
120
117
steps:
121
118
- name: Checkout build repo
122
119
uses: actions/checkout@v6
@@ -154,14 +151,12 @@ jobs:
154
151
155
152
build-hook-ensemble:
156
153
needs: [ matrix_prep, build-linuxkit-containers, build-kernels ] # depend on the previous job...
157
-
runs-on:
158
-
group: Default
159
-
labels: "${{ matrix.runner }}"# the runner to use is determined by the 'gha-matrix' code
154
+
runs-on: "${{ matrix.runner }}"# "groups" are only for self-hosted setups! TODO: group should be determined by matrix code # # the runner to use is determined by the 'gha-matrix' code
160
155
strategy:
161
156
fail-fast: false # let other jobs try to complete if one fails
0 commit comments