Skip to content

Commit 81a2584

Browse files
committed
pt3
1 parent c8c922b commit 81a2584

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Free up disk space'
2+
description: 'Removes unnecessary packages and files to free up disk space on GitHub runners'
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Free up additional disk space
7+
shell: bash
8+
run: |
9+
set -x
10+
df -h
11+
sudo apt-get update
12+
sudo apt-get purge -y '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*'
13+
sudo apt-get autoremove -y --purge
14+
sudo apt-get clean
15+
sudo rm -rf /usr/local/.ghcup &
16+
sudo rm -rf /usr/local/lib/android &
17+
sudo rm -rf /usr/local/share/boost &
18+
sudo rm -rf /usr/local/lib/node_modules &
19+
sudo rm -rf /usr/share/dotnet &
20+
sudo rm -rf /opt/ghc &
21+
sudo rm -rf /opt/hostedtoolcache/CodeQL &
22+
sudo docker image prune --all --force &
23+
wait
24+
df -h

.github/workflows/build-notebooks-TEMPLATE.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -133,33 +133,12 @@ jobs:
133133
# region Free up disk space
134134

135135
- name: Free up additional disk space
136+
uses: ./.github/actions/free-up-disk-space
136137
# https://docs.github.com/en/actions/learn-github-actions/expressions
137138
# NOTE: the arm64 GitHub hosted runner does not have the /mnt-mounted scratch disk
138139
if: "${{ contains(inputs.target, 'rocm') || contains(inputs.target, 'cuda') ||
139140
contains(inputs.target, 'pytorch') || contains(inputs.target, 'tensorflow') ||
140141
inputs.platform == 'linux/arm64' }}"
141-
run: |
142-
set -x
143-
144-
df -h
145-
146-
sudo apt-get update
147-
sudo apt-get purge -y '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*'
148-
sudo apt-get autoremove -y --purge
149-
sudo apt-get clean
150-
sudo rm -rf /usr/local/.ghcup &
151-
sudo rm -rf /usr/local/lib/android &
152-
sudo rm -rf /usr/local/share/boost &
153-
sudo rm -rf /usr/local/lib/node_modules &
154-
sudo rm -rf /usr/share/dotnet &
155-
sudo rm -rf /opt/ghc &
156-
sudo rm -rf /opt/hostedtoolcache/CodeQL &
157-
158-
sudo docker image prune --all --force &
159-
160-
wait
161-
162-
df -h
163142

164143
- id: install-compsize
165144
run: sudo apt-get install -y btrfs-compsize

0 commit comments

Comments
 (0)