Skip to content

Commit 9d60c13

Browse files
committed
Update free-disk-space.sh
1 parent 09b3a79 commit 9d60c13

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ jobs:
127127
# we do not need. We do this to enable some of the less resource
128128
# intensive jobs to run on free runners, which however also have
129129
# less disk space.
130-
- name: free up disk space
131-
run: src/ci/scripts/free-disk-space.sh
130+
- name: free up disk space start
131+
run: src/ci/scripts/free-disk-space.sh start
132132
if: matrix.free_disk
133133

134134
# Rust Log Analyzer can't currently detect the PR number of a GitHub
@@ -229,6 +229,10 @@ jobs:
229229
run: |
230230
cd src/ci/citool
231231
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
232+
233+
- name: free up disk space report
234+
run: src/ci/scripts/free-disk-space.sh report
235+
if: matrix.free_disk
232236

233237
- name: run the build
234238
run: |

src/ci/github-actions/jobs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ runners:
3232

3333
- &job-windows
3434
os: windows-2025
35+
free_disk: true
3536
<<: *base-job
3637

3738
# NOTE: windows-2025 has less disk space available than windows-2022,
3839
# because the D drive is missing.
3940
- &job-windows-25
4041
os: windows-2025
42+
free_disk: true
4143
<<: *base-job
4244

4345
- &job-windows-8c

src/ci/scripts/free-disk-space-linux.sh

100644100755
File mode changed.

src/ci/scripts/free-disk-space.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
script_dir=$(dirname "$0")
45
log=/tmp/free-disk-space.log
56

6-
if [[ "$1" == "start"]]; then
7+
if [[ "$1" == "start" ]]; then
78
# Run scripts in the background.
89
if [[ "${RUNNER_OS:-}" == "Windows" ]]; then
9-
pwsh free-disk-space-windows.ps1 &> $log &
10+
pwsh $script_dir/free-disk-space-windows.ps1 &> $log &
1011
else
11-
free-disk-space-linux.sh &> $log &
12+
$script_dir/free-disk-space-linux.sh &> $log &
1213
fi
13-
elif [[ "$1" == "report"]]; then
14-
exit_code=wait
14+
elif [[ "$1" == "report" ]]; then
15+
exit_code=`wait`
1516
cat $log
1617
exit $exit_code
1718
else

0 commit comments

Comments
 (0)