summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2023-01-17 09:52:27 -0800
committerGitHub <[email protected]>2023-01-17 09:52:27 -0800
commit07281f7d13efc1fd9450f601dd621f49ce17fe7b (patch)
treeb769445dc56d94b122ec3e2855ab05c964ca6df8 /.github
parent7a85f58db6c8a80cabd42d608fd5f5b8d7c301c6 (diff)
CI: Reclaim space after package operations
Rather than reclaiming space before updating the packages do it afterwards. This avoids issues with apt returning an error due to missing files on the system. This commit includes a revert for 6320b9e6. Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #14387
Diffstat (limited to '.github')
-rwxr-xr-x.github/workflows/scripts/reclaim_disk_space.sh11
-rw-r--r--.github/workflows/zfs-tests-functional.yml6
-rw-r--r--.github/workflows/zfs-tests-sanity.yml6
3 files changed, 10 insertions, 13 deletions
diff --git a/.github/workflows/scripts/reclaim_disk_space.sh b/.github/workflows/scripts/reclaim_disk_space.sh
index a0d1e9c8f..cc16a9079 100755
--- a/.github/workflows/scripts/reclaim_disk_space.sh
+++ b/.github/workflows/scripts/reclaim_disk_space.sh
@@ -1,19 +1,20 @@
-#!/bin/sh -x
+#!/bin/sh
set -eu
# remove 4GiB of images
sudo systemd-run docker system prune --force --all --volumes
-# remove unused packages
-sudo apt remove -q --purge firefox
-
# remove unused software
sudo systemd-run rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/* \
/usr/local/* \
/usr/share/az* \
+ /usr/share/dotnet \
/usr/share/gradle* \
/usr/share/miniconda \
- /usr/share/swift
+ /usr/share/swift \
+ /var/lib/gems \
+ /var/lib/mysql \
+ /var/lib/snapd
diff --git a/.github/workflows/zfs-tests-functional.yml b/.github/workflows/zfs-tests-functional.yml
index b592a9c13..08ce254ec 100644
--- a/.github/workflows/zfs-tests-functional.yml
+++ b/.github/workflows/zfs-tests-functional.yml
@@ -15,9 +15,6 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- - name: Reclaim disk space
- run: |
- ${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh
- name: Install dependencies
run: |
sudo apt-get update
@@ -58,8 +55,9 @@ jobs:
- name: Clear the kernel ring buffer
run: |
sudo dmesg -c >/var/tmp/dmesg-prerun
- - name: Report disk space
+ - name: Reclaim and report disk space
run: |
+ ${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh
df -h /
- name: Tests
run: |
diff --git a/.github/workflows/zfs-tests-sanity.yml b/.github/workflows/zfs-tests-sanity.yml
index 7ec534f01..bab8aa175 100644
--- a/.github/workflows/zfs-tests-sanity.yml
+++ b/.github/workflows/zfs-tests-sanity.yml
@@ -11,9 +11,6 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- - name: Reclaim disk space
- run: |
- ${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh
- name: Install dependencies
run: |
sudo apt-get update
@@ -54,8 +51,9 @@ jobs:
- name: Clear the kernel ring buffer
run: |
sudo dmesg -c >/var/tmp/dmesg-prerun
- - name: Report disk space
+ - name: Reclaim and report disk space
run: |
+ ${{ github.workspace }}/.github/workflows/scripts/reclaim_disk_space.sh
df -h /
- name: Tests
run: |