88 IPXE_REF : d3c8944d5c3ab262826ed33b16f3fc4dd43bc304
99
1010jobs :
11+ deps :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Cache packages
15+ uses : actions/cache@v4
16+ with :
17+ path : /var/cache/apt/archives/*.deb
18+ key : apt-cache-${{ env.IPXE_REF }}
19+ restore-keys : |
20+ apt-cache-
21+
22+ - name : Install dependencies
23+ run : |
24+ sudo apt update
25+ sudo apt install -y -d -o Acquire::Retries=50 \
26+ mtools gcc make libc6-dev-i386 liblzma-dev perl gcc-arm-none-eabi gcc-aarch64-linux-gnu
27+
1128 x86 :
1229 runs-on : ubuntu-latest
1330 steps :
2744 src/bin/*.kpxe
2845 src/bin*/*.efi
2946
47+ - name : Get cached dependencies
48+ if : steps.cache.outputs.cache-hit != 'true'
49+ uses : actions/cache/restore@v4
50+ with :
51+ path : /var/cache/apt/archives/*.deb
52+ key : apt-cache-${{ env.IPXE_REF }}
53+
3054 - name : Build
3155 if : steps.cache.outputs.cache-hit != 'true'
3256 run : |
@@ -55,11 +79,12 @@ jobs:
5579 path : |
5680 src/bin-arm32-efi/snponly.efi
5781
58- - name : Add cross-compile deps
82+ - name : Get cached dependencies
5983 if : steps.cache.outputs.cache-hit != 'true'
60- run : |
61- sudo apt update
62- sudo apt install -y gcc-arm-none-eabi
84+ uses : actions/cache/restore@v4
85+ with :
86+ path : /var/cache/apt/archives/*.deb
87+ key : apt-cache-${{ env.IPXE_REF }}
6388
6489 - name : Build
6590 if : steps.cache.outputs.cache-hit != 'true'
@@ -85,42 +110,43 @@ jobs:
85110 path : |
86111 src/bin-arm64-efi/snponly.efi
87112
88- - name : Add cross-compile deps
113+ - name : Get cached dependencies
89114 if : steps.cache.outputs.cache-hit != 'true'
90- run : |
91- sudo apt update
92- sudo apt install -y gcc-aarch64-linux-gnu
115+ uses : actions/cache/restore@v4
116+ with :
117+ path : /var/cache/apt/archives/*.deb
118+ key : apt-cache-${{ env.IPXE_REF }}
93119
94120 - name : Build
95121 if : steps.cache.outputs.cache-hit != 'true'
96122 run : |
97123 make -j4 -C src CROSS=aarch64-linux-gnu- ARCH=arm64 \
98124 bin-arm64-efi/snponly.efi
99125
100- cache :
126+ artifacts-from- cache :
101127 runs-on : ubuntu-latest
102128 needs :
103129 - x86
104130 - arm32
105131 - arm64
106132 steps :
107133 - name : Mount x86 cache
108- uses : actions/cache@v4
134+ uses : actions/cache/restore @v4
109135 with :
110136 key : ipxe-x86-${{ env.IPXE_REF }}
111137 path : |
112138 src/bin/*.kpxe
113139 src/bin*/*.efi
114140
115141 - name : Mount arm32 cache
116- uses : actions/cache@v4
142+ uses : actions/cache/restore @v4
117143 with :
118144 key : ipxe-arm32-${{ env.IPXE_REF }}
119145 path : |
120146 src/bin-arm32-efi/snponly.efi
121147
122148 - name : Mount arm64 cache
123- uses : actions/cache@v4
149+ uses : actions/cache/restore @v4
124150 with :
125151 key : ipxe-arm64-${{ env.IPXE_REF }}
126152 path : |
0 commit comments