Skip to content

Commit 2d157e6

Browse files
committed
ci: sync up with iptfs-linux version
1 parent 5b2e47a commit 2d157e6

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147

148148
build-rootfs:
149149
runs-on: ubuntu-22.04
150+
timeout-minutes: 600
150151
steps:
151152
- name: Checkout repository
152153
uses: actions/checkout@v4
@@ -169,6 +170,7 @@ jobs:
169170
key: ${{ runner.os }}-br-
170171
171172
- name: Build Rootfs
173+
timeout-minutes: 540
172174
run: |
173175
set -x
174176
if [ -f output-buildroot.tar.xz ] || [ -f output-buildroot.tar.gz ]; then
@@ -193,22 +195,28 @@ jobs:
193195
make -C buildroot -j6 V=0 O=$PWD/output-buildroot iproute2-dirclean
194196
fi
195197
# make rootfs
198+
echo "Starting build: $(date)"
196199
make -C buildroot -j6 V=1 O=$PWD/output-buildroot LOCALVERSION='' > build-buildroot.txt 2>&1
197-
198-
# tar up the remaining files including .ccache
199-
echo "Collecting new cache contents: $(date)"
200-
tar -czf output-buildroot.tar.gz output-buildroot root-key root-key.pub
201-
ls -hl output-buildroot.tar.gz
202-
echo "Done collecting new cache contents: $(date)"
200+
echo "Build complete: $(date)"
203201
204202
- name: Archive buildroot build log
203+
if: ${{ always() }}
205204
uses: actions/upload-artifact@v4
206205
with:
207206
name: buildroot-build-log
208207
path: build-buildroot.txt
209208
retention-days: 30
210209
if-no-files-found: error
211210

211+
- name: Collect cache contents
212+
timeout-minutes: 120
213+
run: |
214+
# tar up the remaining files including .ccache
215+
echo "Collecting new cache contents: $(date)"
216+
tar -czvf output-buildroot.tar.gz output-buildroot root-key root-key.pub || echo "error with tarball creation"
217+
ls -hl output-buildroot.tar.gz || true
218+
echo "Done collecting new cache contents: $(date)"
219+
212220
- name: Archive buildroot rootfs.cpio.gz
213221
uses: actions/upload-artifact@v4
214222
with:
@@ -226,14 +234,14 @@ jobs:
226234
root-key.pub
227235
retention-days: 1
228236
if-no-files-found: error
237+
229238
test:
230239
runs-on: ubuntu-22.04
231240
needs: ["build-cov-kernel", "build-rootfs"]
232241
steps:
233242
- name: Checkout repository
234243
uses: actions/checkout@v4
235244

236-
# For coverage data, extract the source files.
237245
- name: Checkout kernel repository
238246
uses: actions/checkout@v4
239247
with:
@@ -246,7 +254,11 @@ jobs:
246254
sudo apt-get install -y lcov qemu-system-x86 socat
247255
sudo python3 -m pip install -U munet pytest pytest-asyncio scapy
248256
249-
# For coverage data extract the full build to get the gcno
257+
#
258+
# For coverage data, extract the source and full build to get the gcno
259+
# files.
260+
#
261+
250262
- name: Restore coverage kernel build
251263
id: linux-cov-cache-restore
252264
uses: actions/cache/restore@v3
@@ -310,6 +322,7 @@ jobs:
310322
sudo -E env CI=$CI python3 -m pytest -s --coverage tests/simplenet | tee $tmpf
311323
grep -v SKIPPED $tmpf
312324
325+
# Restore longer running test once working
313326
- name: UT packet test
314327
run: |
315328
set -e
@@ -373,4 +386,5 @@ jobs:
373386
files: |
374387
bzImage
375388
root-key
389+
root-key.pub
376390
rootfs.cpio.gz

0 commit comments

Comments
 (0)