mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
ci.yml: Add swap and monitor it
This commit is contained in:
parent
5a7ccd6580
commit
445a4a0298
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -31,6 +31,23 @@ jobs:
|
||||
name: '${{ env.CACHIX_NAME }}'
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
free -h
|
||||
swapon --show
|
||||
swap=$(swapon --show --noheadings | head -n 1 | awk '{print $1}')
|
||||
echo "Found swap: $swap"
|
||||
sudo swapoff $swap
|
||||
# resize it (fallocate)
|
||||
sudo fallocate -l 10G $swap
|
||||
sudo mkswap $swap
|
||||
sudo swapon $swap
|
||||
free -h
|
||||
(
|
||||
while sleep 60; do
|
||||
free -h
|
||||
done
|
||||
) &
|
||||
- run: nix --experimental-features 'nix-command flakes' flake check -L
|
||||
|
||||
# Steps to test CI automation in your own fork.
|
||||
|
Loading…
Reference in New Issue
Block a user