Skip to content

Commit

Permalink
manual swap increase
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Sep 18, 2023
1 parent 899ddae commit d79bb50
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d79bb50

Please sign in to comment.