File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 echo "TAG_EXISTS=false" >> $GITHUB_ENV
4848 fi
4949
50+ - name : ROM Cache
51+ if : env.TAG_EXISTS == 'false'
52+ id : cache-rom
53+ uses : actions/cache@v5
54+ with :
55+ path : pxe/virtio-net.rom
56+ key : rom-cache
57+
58+ - name : Get working version of iPXE pcbios ROM
59+ if : env.TAG_EXISTS == 'false' && steps.cache-rom.outputs.cache-hit != 'true'
60+ run : |
61+ sudo apt update && sudo apt install git make gcc binutils perl liblzma-dev mtools
62+ git clone --depth 1 https://github.com/ipxe/ipxe.git
63+ mkdir -p pxe
64+ cd ipxe
65+ echo "#define DOWNLOAD_PROTO_HTTPS" >> src/config/local/general.h
66+ make -C src bin/virtio-net.rom -j4
67+ cp src/bin/virtio-net.rom ../pxe
68+
5069 test :
5170 runs-on : ubuntu-latest
5271 needs : generate
@@ -66,11 +85,17 @@ jobs:
6685 - name : Checkout Repository
6786 uses : actions/checkout@v7
6887
88+ - name : ROM Cache
89+ uses : actions/cache@v5
90+ with :
91+ path : pxe/virtio-net.rom
92+ key : rom-cache
93+
6994 - name : Initialize QEMU and System Dependencies
7095 run : |
71- sudo apt-get update
72- sudo apt-get install -y qemu-system-x86 ovmf
96+ sudo apt update && sudo apt install -y qemu-system-x86 ovmf
7397 sudo chmod 666 /dev/kvm
98+ sudo cp pxe/virtio-net.rom /usr/lib/ipxe/qemu/pxe-virtio.rom
7499 [[ "${{ matrix.mode }}" == "efi" ]] && sudo ln -s /usr/share/OVMF /usr/share/edk2-ovmf || true
75100 [[ "${{ matrix.mode }}" == "efi" ]] && sudo ln -s /usr/share/edk2-ovmf/OVMF_CODE_4M.fd /usr/share/edk2-ovmf/OVMF_CODE.fd || true
76101 [[ "${{ matrix.mode }}" == "efi" ]] && sudo ln -s /usr/share/edk2-ovmf/OVMF_VARS_4M.fd /usr/share/edk2-ovmf/OVMF_VARS.fd || true
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ QEMU_RUN_PID=$!
7171
7272 line=$( sed ' s/\x1b\[[0-9;]*[mKHP]//g' <<< " $line" )
7373 case " $line " in
74+ " Could not boot image:" * | \
75+ " No more network devices" * | \
76+ " No bootable device." * )
77+ echo " ❌ FAIL $line "
78+ exit 1
79+ ;;
7480 * " -- Open Source Network Boot Firmware -- https://ipxe.org" * )
7581 IPXE=$( grep -o " iPXE [0-9.+ a-fg()]*[^ -]" <<< " $line" )
7682 declare -p IPXE >> $ENV_FILE
You can’t perform that action at this time.
0 commit comments