Skip to content

Commit af33da7

Browse files
committed
Reclaim ci runner storage.
1 parent 4437214 commit af33da7

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/zswatch-ci-image.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v4
2626

27+
- name: Free disk space
28+
run: |
29+
df -h
30+
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL
31+
docker system prune -af || true
32+
docker volume prune -f || true
33+
df -h
34+
2735
- name: Set up Docker Buildx
2836
uses: docker/setup-buildx-action@v3
2937

@@ -44,6 +52,9 @@ jobs:
4452
ghcr.io/zswatch/ci-base:${{ github.ref_name }}
4553
ghcr.io/zswatch/ci-base:latest
4654
55+
- name: Prune buildx cache
56+
run: docker buildx prune -af --keep-storage 5GB
57+
4758
- name: Build and push CI image
4859
uses: docker/build-push-action@v5
4960
with:

Dockerfile.zswatch-ci

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ RUN <<'EOF'
4545
doxygen \
4646
thrift-compiler || true
4747

48+
apt-get purge --auto-remove -y \
49+
libgtk2.0-0 \
50+
libcairo2-dev \
51+
libglib2.0-dev \
52+
libpcap-dev \
53+
ovmf \
54+
parallel || true
55+
56+
apt-get clean -y
57+
rm -rf /var/lib/apt/lists/*
58+
rm -rf /usr/share/doc /usr/share/man /usr/share/info
59+
EOF
60+
61+
# Reinstall SDL2 dev headers explicitly (native_sim needs sdl2.pc)
62+
RUN <<EOF
63+
apt-get update -y
64+
apt-get install --no-install-recommends -y libsdl2-dev
4865
apt-get clean -y
4966
rm -rf /var/lib/apt/lists/*
5067
EOF

0 commit comments

Comments
 (0)