diff --git a/.github/workflows/shared.yml b/.github/workflows/shared.yml index ddfb757a5c..eb3eed74a8 100644 --- a/.github/workflows/shared.yml +++ b/.github/workflows/shared.yml @@ -56,6 +56,27 @@ jobs: # - uses: actions/checkout@v3 + - name: Set swap space + if: ${{ matrix.target == 'linux-x86_64' || matrix.target == 'linux-aarch64'}} + run: | + 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 10G $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 + - name: chown /usr/local if: ${{ matrix.target == 'linux-x86_64' || matrix.target == 'linux-aarch64'}} run: |