Skip to content

Commit 2efe5b4

Browse files
committed
[toolchain] Publish architecture-independent utility toolchain
Publish a version of the toolchain container that has not yet had any architecture-specific packages installed. This can be used for tasks such as constructing the multi-architecture ISO and USB disk images from binaries compiled by the architecture-specific toolchains. Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
1 parent 0214d25 commit 2efe5b4

2 files changed

Lines changed: 34 additions & 9 deletions

File tree

.github/workflows/toolchain.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,17 @@ jobs:
4242
strategy:
4343
fail-fast: false
4444
matrix:
45-
arch:
45+
subpkg:
4646
- arm32
4747
- arm64
4848
- i386
4949
- loong64
5050
- riscv32
5151
- riscv64
52+
- utils
5253
- x86_64
5354
env:
54-
pkgname: ipxe-builder-${{ matrix.arch }}
55+
pkgname: ipxe-builder-${{ matrix.subpkg }}
5556
reponame: ghcr.io/${{ github.repository_owner }}
5657
steps:
5758

@@ -68,11 +69,11 @@ jobs:
6869
- name: Set up builder
6970
uses: docker/setup-buildx-action@v3
7071

71-
- name: Build (${{ matrix.arch }})
72+
- name: Build (${{ matrix.subpkg }})
7273
uses: docker/build-push-action@v6
7374
with:
7475
context: toolchain
75-
target: ${{ matrix.arch }}
76+
target: ${{ matrix.subpkg }}
7677
push: true
7778
cache-from: |
7879
type=gha,mode=max,scope=${{ github.ref_name }}-common
@@ -83,15 +84,15 @@ jobs:
8384
uses: docker/build-push-action@v6
8485
with:
8586
context: toolchain
86-
target: check-${{ matrix.arch }}
87+
target: check-${{ matrix.subpkg }}
8788
push: false
8889
load: true
8990
tags: |
90-
check-${{ matrix.arch }}
91+
check-${{ matrix.subpkg }}
9192
9293
- name: Test
9394
run: |
94-
docker run --rm check-${{ matrix.arch }}
95+
docker run --rm check-${{ matrix.subpkg }}
9596
9697
publish:
9798
name: Publish
@@ -103,16 +104,17 @@ jobs:
103104
strategy:
104105
fail-fast: false
105106
matrix:
106-
arch:
107+
subpkg:
107108
- arm32
108109
- arm64
109110
- i386
110111
- loong64
111112
- riscv32
112113
- riscv64
114+
- utils
113115
- x86_64
114116
env:
115-
pkgname: ipxe-builder-${{ matrix.arch }}
117+
pkgname: ipxe-builder-${{ matrix.subpkg }}
116118
reponame: ghcr.io/${{ github.repository_owner }}
117119
label: ${{ github.ref_name == 'master' && 'latest' || github.ref_name }}
118120
steps:

toolchain/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ RUN echo "install_weak_deps=False" >> /etc/dnf/dnf.conf \
2121
xz-devel \
2222
&& dnf clean all -y
2323

24+
#
25+
# Architecture-independent utilities
26+
#
27+
28+
FROM baseline AS utils
29+
30+
FROM utils AS check-utils
31+
32+
RUN dnf install -y \
33+
libcdio \
34+
shim-x64 \
35+
&& dnf clean all -y
36+
37+
ADD https://github.com/ipxe/ipxe.git /ipxe
38+
39+
WORKDIR /ipxe/src
40+
41+
RUN ln -s /bin/true dummy.lkrn
42+
43+
RUN ln -s /boot/efi/EFI/BOOT/BOOTX64.EFI dummy.efi
44+
45+
CMD ./util/genfsimg -o dummy.iso dummy.lkrn dummy.efi && iso-info dummy.iso
46+
2447
#
2548
# x86_64 toolchain
2649
#

0 commit comments

Comments
 (0)