From c815df7d347b1a960b802d19e6dc73b6e6c958de Mon Sep 17 00:00:00 2001 From: pranavm Date: Fri, 13 Dec 2024 14:52:14 -0800 Subject: [PATCH] Updates L0 job to free space on host --- .github/workflows/build-and-test.yml | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 26bbcfd21..7be44f1b9 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -8,21 +8,51 @@ on: jobs: + free-space: + runs-on: ubuntu-latest + steps: + # Based on https://stackoverflow.com/q/75536771 + - name: Free disk space + run: | + sudo docker system prune -a -f + sudo rm -rf \ + /usr/share/dotnet "$AGENT_TOOLSDIRECTORY" /usr/local/lib/android /opt/ghc \ + /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \ + /usr/lib/jvm + + sudo apt-get purge microsoft-edge-stable || true + sudo apt-get purge google-cloud-cli || true + sudo apt-get purge dotnet-sdk-* || true + sudo apt-get purge google-chrome-stable || true + + sudo apt-get autoremove -y + sudo apt-get autoclean -y + test: + needs: free-space runs-on: ubuntu-latest container: image: nvcr.io/nvidia/tritonserver:24.10-py3 volumes: - ${{ github.workspace }}:/core + # Mount /usr so we can free space + - /usr:/host_usr steps: - uses: actions/checkout@v3 + - name: Free space + run: | + sudo rm -rf \ + /host_usr/share/dotnet "$AGENT_TOOLSDIRECTORY" /host_usr/local/lib/android /opt/ghc \ + /host_usr/local/share/powershell /host_usr/share/swift /host_usr/local/.ghcup \ + /host_usr/lib/jvm + - name: Install dependencies run: | apt update apt install -y --no-install-recommends clang-format-15 cmake libb64-dev rapidjson-dev libre2-dev - wget -O /tmp/boost.tar.gz https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz && (cd /tmp && tar xzf boost.tar.gz) && mv /tmp/boost_1_80_0/boost /usr/include/boost + wget -O /tmp/boost.tar.gz https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz && (cd /tmp && tar xzf boost.tar.gz) && mv /tmp/boost_1_80_0/boost /usr/include/boost && rm boost.tar.gz pip install build pytest - name: Build