Skip to content

Commit 3e273d8

Browse files
committed
ci/inventory: de-hardcode list of flavors for which .iso's are built
- use inventory and output into json matrix Signed-off-by: Ricardo Pardini <[email protected]>
1 parent d572e3c commit 3e273d8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/build-all-matrix.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
run: bash build.sh build "${{ matrix.kernel }}"
167167

168168
- name: "Build Hook ISO with Kernel ${{matrix.kernel}} (${{ matrix.arch }}) - cache: ${{matrix.gha_cache}}"
169-
if: ${{ matrix.kernel == 'hook-latest-lts-amd64' || matrix.kernel == 'hook-default-amd64' || matrix.kernel == 'hook-latest-lts-arm64' || matrix.kernel == 'hook-default-arm64' }}
169+
if: ${{ matrix.build_iso == 'yes' }} # Set via inventory.sh and SUPPORTS_ISO='yes' for each flavor
170170
env:
171171
DO_BUILD_LK_CONTAINERS: "no" # already built them; this is only for hook/linuxkit.
172172
run: bash build.sh build "${{ matrix.kernel }}" LINUXKIT_ISO=yes

bash/inventory.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ function produce_kernels_flavours_inventory() {
55

66
##### METHOD=default; Hook's own kernel, in kernel/ directory
77
## Hook default kernel, source code stored in `kernel` dir in this repo -- currently 5.10.y
8-
define_id "hook-default-amd64" METHOD='default' ARCH='x86_64' TAG='standard' \
8+
define_id "hook-default-amd64" METHOD='default' ARCH='x86_64' TAG='standard' SUPPORTS_ISO='yes' \
99
KERNEL_MAJOR='5' KERNEL_MINOR='10' KCONFIG='generic'
10-
define_id "hook-default-arm64" METHOD='default' ARCH='aarch64' TAG='standard' \
10+
define_id "hook-default-arm64" METHOD='default' ARCH='aarch64' TAG='standard' SUPPORTS_ISO='yes' \
1111
KERNEL_MAJOR='5' KERNEL_MINOR='10' KCONFIG='generic'
1212

1313
## A 'peg' is not really a 'hook': for development purposes; testing new LK version and simpler LK configurations, using the default kernel
@@ -16,9 +16,9 @@ function produce_kernels_flavours_inventory() {
1616
KERNEL_MAJOR='5' KERNEL_MINOR='10' KCONFIG='generic'
1717

1818
## development purposes: trying out kernel 6.6.y
19-
define_id "hook-latest-lts-amd64" METHOD='default' ARCH='x86_64' TAG='lts' \
19+
define_id "hook-latest-lts-amd64" METHOD='default' ARCH='x86_64' TAG='lts' SUPPORTS_ISO='yes' \
2020
KERNEL_MAJOR='6' KERNEL_MINOR='6' KCONFIG='generic' FORCE_OUTPUT_ID='latest-lts'
21-
define_id "hook-latest-lts-arm64" METHOD='default' ARCH='aarch64' TAG='lts' \
21+
define_id "hook-latest-lts-arm64" METHOD='default' ARCH='aarch64' TAG='lts' SUPPORTS_ISO='yes' \
2222
KERNEL_MAJOR='6' KERNEL_MINOR='6' KCONFIG='generic' FORCE_OUTPUT_ID='latest-lts'
2323

2424
##### METHOD=armbian; Foreign kernels, taken from Armbian's OCI repos. Those are "exotic" kernels for certain SoC's.

bash/json-matrix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function prepare_json_matrix() {
8484
declare gha_cache="yes" # always use GH cache; hitting DockerHub for linuxkit images is prone to rate limiting
8585

8686
all_arches["${kernel_info[DOCKER_ARCH]}"]=1
87-
json_items+=("{\"kernel\":\"${kernel}\",\"arch\":\"${kernel_info[ARCH]}\",\"docker_arch\":\"${kernel_info[DOCKER_ARCH]}\",\"runner\":${runner},\"gha_cache\":\"${gha_cache}\"}")
87+
json_items+=("{\"kernel\":\"${kernel}\",\"arch\":\"${kernel_info[ARCH]}\",\"docker_arch\":\"${kernel_info[DOCKER_ARCH]}\",\"build_iso\":\"${kernel_info[SUPPORTS_ISO]}\",\"runner\":${runner},\"gha_cache\":\"${gha_cache}\"}")
8888
fi
8989
done
9090

0 commit comments

Comments
 (0)