4747 echo "TAG_EXISTS=false" >> $GITHUB_ENV
4848 fi
4949
50+ - name : ROM Cache
51+ if : env.TAG_EXISTS == 'false'
52+ id : ipxe-rom
53+ uses : actions/cache@v5
54+ with :
55+ path : pxe
56+ key : ipxe-rom
57+
58+ - name : Get working version of iPXE pcbios ROM
59+ if : env.TAG_EXISTS == 'false' && steps.ipxe-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 bin/virtio-net.pxe -j4
67+ cp src/bin/virtio-net.rom ../pxe
68+ cp src/bin/virtio-net.pxe ../pxe
69+
5070 test :
5171 runs-on : ubuntu-latest
5272 needs : generate
@@ -66,14 +86,25 @@ jobs:
6686 - name : Checkout Repository
6787 uses : actions/checkout@v7
6888
89+ - name : ROM Cache
90+ uses : actions/cache@v5
91+ with :
92+ fail-on-cache-miss : true
93+ path : pxe
94+ key : ipxe-rom
95+
6996 - name : Initialize QEMU and System Dependencies
7097 run : |
71- sudo apt-get update
72- sudo apt-get install -y qemu-system-x86 ovmf
98+ sudo apt update && sudo apt install -y qemu-system-x86 ovmf
7399 sudo chmod 666 /dev/kvm
100+ ls -l /usr/share/qemu/firmware/ /usr/lib/ipxe/qemu/ /usr/share/qemu/ /usr/share/seabios /usr/lib/ipxe/ || true
101+ # in pcbios mode we override the rom used (q35 machine), ignoring efi since it is throwaway
102+ [[ "${{ matrix.mode }}" == "pcbios" ]] && sudo cp pxe/virtio-net.rom /usr/lib/ipxe/qemu/efi-virtio.rom
74103 [[ "${{ matrix.mode }}" == "efi" ]] && sudo ln -s /usr/share/OVMF /usr/share/edk2-ovmf || true
75104 [[ "${{ matrix.mode }}" == "efi" ]] && sudo ln -s /usr/share/edk2-ovmf/OVMF_CODE_4M.fd /usr/share/edk2-ovmf/OVMF_CODE.fd || true
76105 [[ "${{ matrix.mode }}" == "efi" ]] && sudo ln -s /usr/share/edk2-ovmf/OVMF_VARS_4M.fd /usr/share/edk2-ovmf/OVMF_VARS.fd || true
106+ #sudo apt install -y strace
107+ #strace -e trace=openat qemu-system-x86_64 -enable-kvm -M q35 -m 256 -nographic -nic user,model=virtio,tftp=.,bootfile=notthisfile.ipxe 2>&1 | grep -E "virtio|rom"
77108
78109 - name : Restore Work Directory Cache
79110 uses : actions/cache@v5
0 commit comments