From 94c55dd2cac8fd1df35d648b45e3951b71746f59 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 5 Feb 2024 09:46:19 -0800 Subject: [PATCH] [workflows] Use /mnt as the build directory on Linux (#80583) There is more space available on /mnt (~56G) than on / (~30G), and we are starting to see some of the CI jobs run out of disk space on Linux. (cherry picked from commit 1a6426067fb33a8a789978f6e229108787a041be) --- .github/workflows/llvm-project-tests.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml index 0e361bfb77fe42..3bc7bd4957fa69 100644 --- a/.github/workflows/llvm-project-tests.yml +++ b/.github/workflows/llvm-project-tests.yml @@ -105,8 +105,15 @@ jobs: PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12 shell: bash run: | + if [ "${{ runner.os }}" == "Linux" ]; then + builddir="/mnt/build/" + sudo mkdir -p $builddir + sudo chown `whoami`:`whoami` $builddir + else + builddir=build + fi cmake -G Ninja \ - -B build \ + -B "$builddir" \ -S llvm \ -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" \ -DCMAKE_BUILD_TYPE=Release \ @@ -115,7 +122,7 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=sccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ ${{ inputs.extra_cmake_args }} - ninja -C build '${{ inputs.build_target }}' + ninja -C "$builddir" '${{ inputs.build_target }}' - name: Build and Test libclc if: "!startsWith(matrix.os, 'windows') && contains(inputs.projects, 'libclc')"