From 7bef4438866a9e0ccb58b985748ddb47a12a7e73 Mon Sep 17 00:00:00 2001 From: ZdenekM Date: Fri, 5 Jan 2024 09:37:47 +0100 Subject: [PATCH] chore: use action to get more space - Do not build arcor2_kinect docker (takes too much space). --- .github/workflows/pants.yaml | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/pants.yaml b/.github/workflows/pants.yaml index 8d36fe60..a5cd976e 100644 --- a/.github/workflows/pants.yaml +++ b/.github/workflows/pants.yaml @@ -25,29 +25,15 @@ jobs: matrix: python-version: ['3.10'] steps: - - name: Remove unnecessary packages - run: | # stolen from https://github.com/easimon/maximize-build-space - echo "=== Before pruning ===" - df -h - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo apt-get remove -y '^dotnet-.*' - sudo apt-get remove -y '^llvm-.*' - sudo apt-get remove -y 'php.*' - sudo apt-get remove -y '^mongodb-.*' - sudo apt-get remove -y '^mysql-.*' - sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri - sudo apt-get autoremove -y - sudo apt-get clean - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - sudo swapoff -a - sudo rm -f /mnt/swapfile - free -h - echo - echo "=== After pruning ===" - df -h + - name: Maximize build space + uses: easimon/maximize-build-space@master + with: + root-reserve-mb: 512 + swap-size-mb: 1024 + remove-dotnet: 'true' + remove-android: 'true' + remove-haskell: 'true' + remove-docker-images: 'true' - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -82,8 +68,8 @@ jobs: run: | ./pants --changed-since=origin/master --changed-dependees=transitive test - name: Build Docker images - run: | - ./pants --filter-target-type=docker_image --changed-since=origin/master --changed-dependees=transitive package + run: | # do not build arcor2_kinect_azure as it takes too much disk space + ./pants filter --target-type=docker_image --changed-since=origin/master --changed-dependees=transitive | grep -v arcor2_kinect_azure | xargs ./pants package - name: Build Python packages run: | ./pants filter --target-type=python_distribution :: | xargs ./pants package