diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ebc7d5ea..11d749ee4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -342,9 +342,34 @@ jobs: with: tool-cache: 'true' large-packages: false # TODO: remove once https://github.com/jlumbroso/free-disk-space/issues/4 is fixed - - uses: pierotofy/set-swap-space@master # allot more swap - with: - swap-size-gb: 10 + + - run: | + set -ex + + echo "Memory and swap:" + free -h + echo + swapon --show + echo + + export SWAP_FILE=$(swapon --show=NAME | tail -n 1) + sudo swapoff $SWAP_FILE + sudo rm $SWAP_FILE + sudo fallocate -l ${{ inputs.swap-size-gb }}G $SWAP_FILE + sudo chmod 600 $SWAP_FILE + sudo mkswap $SWAP_FILE + sudo swapon $SWAP_FILE + + echo "Memory and swap:" + free -h + echo + swapon --show + echo + + # - uses: pierotofy/set-swap-space@master # allot more swap + # with: + # swap-size-gb: 10 + - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v2 - uses: docker/build-push-action@v3