From d79bb50b6f3f5396933132fb6e6357bc87a0a7b6 Mon Sep 17 00:00:00 2001 From: Ric Evans Date: Mon, 18 Sep 2023 16:20:30 -0500 Subject: [PATCH] manual swap increase --- .github/workflows/tests.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) 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