Skip to content

Commit

Permalink
[SOL] Free up space in github runner
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Jul 10, 2024
1 parent beecea3 commit 6fd02e1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ jobs:
run: src/ci/scripts/setup-environment.sh
env:
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
- name: ensure the channel matches the target branch
run: src/ci/scripts/verify-channel.sh
if: success() && !env.SKIP_JOB
- name: decide whether to skip this job
run: src/ci/scripts/should-skip-this.sh
if: success() && !env.SKIP_JOB
- name: free up space in github runner
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
- name: collect CPU statistics
run: src/ci/scripts/collect-cpu-stats.sh
- name: show the current environment
Expand Down Expand Up @@ -222,6 +226,8 @@ jobs:
- name: decide whether to skip this job
run: src/ci/scripts/should-skip-this.sh
if: success() && !env.SKIP_JOB
- name: free up space in github runner
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
- name: collect CPU statistics
run: src/ci/scripts/collect-cpu-stats.sh
if: success() && !env.SKIP_JOB
Expand Down Expand Up @@ -616,6 +622,8 @@ jobs:
- name: decide whether to skip this job
run: src/ci/scripts/should-skip-this.sh
if: success() && !env.SKIP_JOB
- name: free up space in github runner
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
- name: collect CPU statistics
run: src/ci/scripts/collect-cpu-stats.sh
if: success() && !env.SKIP_JOB
Expand Down Expand Up @@ -744,6 +752,8 @@ jobs:
- name: decide whether to skip this job
run: src/ci/scripts/should-skip-this.sh
if: success() && !env.SKIP_JOB
- name: free up space in github runner
run: "sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true\nsudo rm -rf \\\n /usr/share/dotnet /usr/local/lib/android /opt/ghc \\\n /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \\\n /usr/lib/jvm || true\necho \"some directories deleted\"\n"
- name: collect CPU statistics
run: src/ci/scripts/collect-cpu-stats.sh
if: success() && !env.SKIP_JOB
Expand Down
9 changes: 9 additions & 0 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ x--expand-yaml-anchors--remove:
# run: src/ci/scripts/verify-channel.sh
# <<: *step

- name: free up space in github runner
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
- name: collect CPU statistics
run: src/ci/scripts/collect-cpu-stats.sh

Expand Down

0 comments on commit 6fd02e1

Please sign in to comment.