Skip to content

Commit 2c491a7

Browse files
authored
ci: Address tight disk space on GHA runners (#2055)
- 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. - Tentatively go back to the free runner for the icx test. Signed-off-by: Larry Gritz <[email protected]>
1 parent 998479f commit 2c491a7

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

.github/workflows/build-steps.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
type: string
2222
container:
2323
type: string
24+
container_volumes:
25+
type: string
26+
default: '[]'
2427
cc_compiler:
2528
type: string
2629
cxx_compiler:
@@ -92,9 +95,11 @@ jobs:
9295
runs-on: ${{ inputs.runner }}
9396
container:
9497
image: ${{ inputs.container }}
95-
options: ${{ (contains(inputs.runner, 'gpu') && '-e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all') || '-e A=x' }}
96-
# ^^ need extra options on the GPU runners to ensure OptiX is visible
97-
# in the container.
98+
volumes: ${{ fromJson( inputs.container_volumes ) }}
99+
options: -v /:/host/root ${{ (contains(inputs.runner, 'gpu') && '-e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all') || '-e A=x' }}
100+
# Extra options:
101+
# - Ensure the GPU runners have OptiX is visible in the container.
102+
# - Mount the native filesystem under /host/root
98103
env:
99104
CXX: ${{inputs.cxx_compiler}}
100105
CC: ${{inputs.cc_compiler}}

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112
volumes:
113113
- /node20217:/node20217:rw,rshared
114114
- /node20217:/__e/node20:ro,rshared
115+
options: -v /:/host/root ${{ (contains(inputs.runner, 'gpu') && '-e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all') || '-e A=x' }}
115116
env:
116117
CXX: ${{matrix.cxx_compiler}}
117118
CC: ${{matrix.cc_compiler}}
@@ -367,13 +368,10 @@ jobs:
367368
OPENCOLORIO_CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=g++"
368369
- desc: icx/C++17 llvm14 py3.10 oiio-3.0 avx2
369370
nametag: linux-icx
370-
# This job variation needs a bigger runner with more "disk space",
371-
# so only enable it when running on the main repo. Sorry, CI can't
372-
# currently test with icx you people's individual forks until we
373-
# figure out a way to require less space. Until then, they'll need
374-
# to submit the PR to see how it does on icx.
375-
runner: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
376-
disable: ${{ github.repository_owner != 'AcademySoftwareFoundation' }}
371+
runner: ubuntu-latest
372+
# If we ever need the big runner:
373+
# runner: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
374+
# disable: ${{ github.repository_owner != 'AcademySoftwareFoundation' }}
377375
container: aswftesting/ci-osl:2023-clang15
378376
cc_compiler: icx
379377
cxx_compiler: icpx

src/build-scripts/gh-installdeps.bash

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
set -ex
99

10+
# Make extra space on the runners
11+
df -h .
12+
time rm -rf /usr/local/lib/android /host/root/usr/local/lib/android &
13+
sleep 3
14+
1015

1116
#
1217
# Install system packages when those are acceptable for dependencies.
@@ -208,5 +213,8 @@ if [[ "$ABI_CHECK" != "" ]] ; then
208213
source src/build-scripts/build_abi_tools.bash
209214
fi
210215

216+
df -h .
217+
df -h /host/root || true
218+
211219
# Save the env for use by other stages
212220
src/build-scripts/save-env.bash

0 commit comments

Comments
 (0)