From 1e4635479806463371210bfe1c78a67efa37381f Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Fri, 5 Dec 2025 10:15:23 -0800 Subject: [PATCH 1/2] ci: Address tight disk space on GHA runners - Mount the host's root under /host/root so it's visible in the containers. - Remove stuff we don't need to free lots of disk space. - While we're at it, arrange for the commands (copied from OSL) that allow the containers to see a CPU, when available. Signed-off-by: Larry Gritz --- .github/workflows/build-steps.yml | 4 ++++ src/build-scripts/gh-installdeps.bash | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-steps.yml b/.github/workflows/build-steps.yml index 49b876d1ad..7dccbeb624 100644 --- a/.github/workflows/build-steps.yml +++ b/.github/workflows/build-steps.yml @@ -95,6 +95,10 @@ jobs: container: image: ${{ inputs.container }} volumes: ${{ fromJson( inputs.container_volumes ) }} + options: -v /:/host/root ${{ (contains(inputs.runner, 'gpu') && '-e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all') || '-e A=x' }} + # Extra options: + # - Ensure the GPU runners have OptiX is visible in the container. + # - Mount the native filesystem under /host/root env: CXX: ${{inputs.cxx_compiler}} CC: ${{inputs.cc_compiler}} diff --git a/src/build-scripts/gh-installdeps.bash b/src/build-scripts/gh-installdeps.bash index 7ce0c8e4f8..382cdb08b3 100755 --- a/src/build-scripts/gh-installdeps.bash +++ b/src/build-scripts/gh-installdeps.bash @@ -7,7 +7,16 @@ set -ex -df -h + +# Make extra space on the runners +if [[ -e /host/root ]] ; then + df -h . + : ${CRUFT_TO_REMOVE:="/host/root/usr/share/dotnet /host/root/usr/local/lib/android /host/root/usr/local/.ghcup"} + time rm -rf $CRUFT_TO_REMOVE & + sleep 3 + # rather than block, delete in background, but give it a few secs to start + # clearing things out before moving on. +fi # @@ -219,7 +228,7 @@ if [[ "$USE_ICC" != "" ]] ; then export CC=icc fi -df -h +df -h . # Save the env for use by other stages src/build-scripts/save-env.bash From a916e518b7422b17cf46efc094f5ccfd7b5d0f6e Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Fri, 5 Dec 2025 15:55:29 -0800 Subject: [PATCH 2/2] wip Signed-off-by: Larry Gritz --- src/build-scripts/gh-installdeps.bash | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/build-scripts/gh-installdeps.bash b/src/build-scripts/gh-installdeps.bash index 382cdb08b3..fb1d2b8213 100755 --- a/src/build-scripts/gh-installdeps.bash +++ b/src/build-scripts/gh-installdeps.bash @@ -9,14 +9,12 @@ set -ex # Make extra space on the runners -if [[ -e /host/root ]] ; then - df -h . - : ${CRUFT_TO_REMOVE:="/host/root/usr/share/dotnet /host/root/usr/local/lib/android /host/root/usr/local/.ghcup"} - time rm -rf $CRUFT_TO_REMOVE & - sleep 3 - # rather than block, delete in background, but give it a few secs to start - # clearing things out before moving on. -fi +df -h . +time rm -rf /usr/local/lib/android /host/root/usr/local/lib/android & +sleep 3 +# rather than block, delete in background, but give it a few secs to start +# clearing things out before moving on. +# Other candidates, if we need it: /usr/share/dotnet /usr/local/.ghcup # @@ -229,6 +227,7 @@ if [[ "$USE_ICC" != "" ]] ; then fi df -h . +df -h /host/root || true # Save the env for use by other stages src/build-scripts/save-env.bash