Skip to content

Commit

Permalink
chore: use action to get more space
Browse files Browse the repository at this point in the history
- Do not build arcor2_kinect docker (takes too much space).
  • Loading branch information
ZdenekM committed Jan 5, 2024
1 parent 2ae438c commit 7bef443
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/pants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7bef443

Please sign in to comment.