Skip to content

Commit 7c1c767

Browse files
committed
Add a step to delete unused things in GH's images
1 parent ad65c27 commit 7c1c767

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/ci_linux.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,46 @@ jobs:
5656
artifact_path: ${{ steps.artifact_details.outputs.path }}
5757

5858
steps:
59+
- name: Free up space
60+
run: |
61+
df -h
62+
63+
# Remove Java
64+
sudo rm -rf /usr/lib/jvm
65+
66+
# Remove .NET
67+
sudo rm -rf /usr/share/dotnet
68+
69+
# Remove Swift
70+
sudo rm -rf /usr/share/swift
71+
72+
# Remove Haskell
73+
sudo rm -rf /usr/local/.ghcup
74+
75+
# Remove Julia
76+
sudo rm -rf /usr/local/julia*
77+
78+
# Remove Android SDKs
79+
sudo rm -rf /usr/local/lib/android
80+
81+
# Remove Chromium
82+
sudo rm -rf /usr/local/share/chromium
83+
84+
# Remove Microsoft/Edge and Google Chrome builds
85+
sudo rm -rf /opt/microsoft /opt/google
86+
87+
# Remove Azure CLI
88+
sudo rm -rf /opt/az
89+
90+
# Remove PowerShell
91+
sudo rm -rf /usr/local/share/powershell
92+
93+
# Remove CodeQL and other toolcaches
94+
sudo rm -rf /opt/hostedtoolcache
95+
96+
docker system prune -af || true
97+
docker builder prune -af || true
98+
df -h
5999
- name: Checkout repository
60100
uses: actions/checkout@v4
61101

.github/workflows/container_images.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,46 @@ jobs:
4343
image: "rust-gpu/rust-cuda-rockylinux9-cuda12"
4444
dockerfile: ./container/rockylinux9-cuda12/Dockerfile
4545
steps:
46+
- name: Free up space
47+
run: |
48+
df -h
49+
50+
# Remove Java
51+
sudo rm -rf /usr/lib/jvm
52+
53+
# Remove .NET
54+
sudo rm -rf /usr/share/dotnet
55+
56+
# Remove Swift
57+
sudo rm -rf /usr/share/swift
58+
59+
# Remove Haskell
60+
sudo rm -rf /usr/local/.ghcup
61+
62+
# Remove Julia
63+
sudo rm -rf /usr/local/julia*
64+
65+
# Remove Android SDKs
66+
sudo rm -rf /usr/local/lib/android
67+
68+
# Remove Chromium
69+
sudo rm -rf /usr/local/share/chromium
70+
71+
# Remove Microsoft/Edge and Google Chrome builds
72+
sudo rm -rf /opt/microsoft /opt/google
73+
74+
# Remove Azure CLI
75+
sudo rm -rf /opt/az
76+
77+
# Remove PowerShell
78+
sudo rm -rf /usr/local/share/powershell
79+
80+
# Remove CodeQL and other toolcaches
81+
sudo rm -rf /opt/hostedtoolcache
82+
83+
docker system prune -af || true
84+
docker builder prune -af || true
85+
df -h
4686
- name: Checkout repository
4787
uses: actions/checkout@v4
4888
- name: Validate platform

0 commit comments

Comments
 (0)