diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6be744b73cd3..bbccf35a0e62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,19 +81,6 @@ jobs: ${{matrix.os}} ${{matrix.info}} ccache-dir ${{github.ref}} run-' ${{matrix.os}} ${{matrix.info}} ccache- - - name: Check place before maximize - run: df -h - - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 512 - swap-size-mb: 1024 - remove-dotnet: 'true' - - - name: Check place after maximize - run: df -h - - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -153,6 +140,27 @@ jobs: run: | ./scripts/rabbitmq/ubuntu_install_rabbitmq_server.sh + # Clean unnecessary files to save disk space + - name: clean unncessary files to save space + run: | + sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d + sudo apt -y autoremove --purge + sudo apt -y autoclean + sudo apt clean + rm --recursive --force "$AGENT_TOOLSDIRECTORY" + + # Free up disk space on Ubuntu + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # This might remove tools that are actually needed, if set to "true" but frees about 6 GB + tool-cache: false + large-packages: true + swap-storage: true + + - name: Check place after maximize + run: df -h + - name: Setup ccache run: | ccache -M 2.0GB diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 7506612b358d..d85092f1418d 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -65,12 +65,23 @@ jobs: - name: Check place before maximize run: df -h - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 512 - swap-size-mb: 1024 - remove-dotnet: 'true' + # Clean unnecessary files to save disk space + - name: clean unncessary files to save space + run: | + sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d + sudo apt -y autoremove --purge + sudo apt -y autoclean + sudo apt clean + rm --recursive --force "$AGENT_TOOLSDIRECTORY" + + # Free up disk space on Ubuntu + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # This might remove tools that are actually needed, if set to "true" but frees about 6 GB + tool-cache: false + large-packages: true + swap-storage: true - name: Check place after maximize run: df -h