Skip to content

Commit 0e47df6

Browse files
authored
Alternate cleanup strategy for build tests. (#272)
1 parent a54b24f commit 0e47df6

1 file changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/app-build-verify.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ jobs:
112112
sudo apt -y update
113113
sudo apt -y install --no-install-recommends socat xauth
114114
115-
# Free up disk space
116-
docker system prune -a -f
117-
sudo rm -rf $ANDROID_HOME/ndk /opt/hostedtoolcache/CodeQL \
118-
/usr/local/lib/node_modules /usr/local/share/chromium \
119-
/usr/local/share/powershell
120-
df -h
121-
122115
- name: Prepare macOS
123116
# GitHub recommends explicitly selecting the desired Xcode version:
124117
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
@@ -206,6 +199,9 @@ jobs:
206199
briefcase run macOS app
207200
briefcase package macOS app --adhoc-sign
208201
202+
# Clean up built artefacts to preserve disk space
203+
rm -rf build dist
204+
209205
- name: Build macOS Xcode Project
210206
if: >
211207
startsWith(inputs.runner-os, 'macOS')
@@ -222,6 +218,9 @@ jobs:
222218
briefcase run macOS Xcode
223219
briefcase package macOS Xcode --adhoc-sign
224220
221+
# Clean up built artefacts to preserve disk space
222+
rm -rf build dist
223+
225224
- name: Build Windows App
226225
if: >
227226
startsWith(inputs.runner-os, 'Windows')
@@ -235,6 +234,9 @@ jobs:
235234
briefcase run windows app
236235
briefcase package windows app --adhoc-sign
237236
237+
# Clean up built artefacts to preserve disk space
238+
rm -rf build dist
239+
238240
- name: Build Windows Visual Studio Project
239241
if: >
240242
startsWith(inputs.runner-os, 'Windows')
@@ -248,6 +250,9 @@ jobs:
248250
briefcase run windows VisualStudio
249251
briefcase package windows VisualStudio --adhoc-sign
250252
253+
# Clean up built artefacts to preserve disk space
254+
rm -rf build dist
255+
251256
- name: Build Linux System Project (Ubuntu, local)
252257
if: >
253258
startsWith(inputs.runner-os, 'ubuntu')
@@ -272,6 +277,9 @@ jobs:
272277
273278
bash -c "sudo apt -y install --dry-run ./dist/*_0.0.1-1~ubuntu-*_$(dpkg --print-architecture).deb"
274279
280+
# Clean up built artefacts to preserve disk space
281+
rm -rf build dist
282+
275283
- name: Log in to GitHub Container Registry
276284
if: >
277285
startsWith(inputs.runner-os, 'ubuntu')
@@ -483,6 +491,10 @@ jobs:
483491
xvfb-run briefcase run linux flatpak
484492
briefcase package linux flatpak --adhoc-sign
485493
494+
# Clean up built artefacts to preserve disk space
495+
rm -rf build dist
496+
flatpak uninstall --all --delete-data --assumeyes
497+
486498
- name: Build Android App
487499
# Android SDK is not compatible with ARM
488500
if: >
@@ -516,6 +528,9 @@ jobs:
516528
517529
briefcase package android gradle --adhoc-sign
518530
531+
# Clean up built artefacts to preserve disk space
532+
rm -rf build dist
533+
519534
- name: Build iOS App
520535
if: >
521536
startsWith(inputs.runner-os, 'macOS')
@@ -530,6 +545,9 @@ jobs:
530545
briefcase run iOS xcode -d "${{ inputs.ios-simulator }}"
531546
briefcase package iOS xcode --adhoc-sign
532547
548+
# Clean up built artefacts to preserve disk space
549+
rm -rf build dist
550+
533551
- name: Build Web App
534552
if: >
535553
contains(fromJSON('["", "web"]'), inputs.target-platform)
@@ -542,6 +560,9 @@ jobs:
542560
briefcase build web static
543561
briefcase package web static
544562
563+
# Clean up built artefacts to preserve disk space
564+
rm -rf build dist
565+
545566
- name: Upload Failure Logs
546567
uses: actions/upload-artifact@v5.0.0
547568
if: failure()

0 commit comments

Comments
 (0)