Skip to content

Commit 6da968c

Browse files
committed
retry zramctl command
1 parent 79630ba commit 6da968c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/setup.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ sudo modprobe zram
2929
MemTotal=$(grep -Po "(?<=MemTotal:)\s+\d+" /proc/meminfo) # KiB
3030
Percent=200
3131
ZRAM_SIZE=$(($MemTotal / 1024 / 1024 * $Percent / 100)) # Convert to GiB
32-
sudo zramctl --size ${ZRAM_SIZE}GiB --algorithm zstd /dev/zram0
33-
sudo mkswap /dev/zram0
34-
sudo swapon -p 100 /dev/zram0
32+
./retry.sh 30 2 sudo zramctl --size ${ZRAM_SIZE}GiB --algorithm zstd /dev/zram0
33+
sudo mkswap /dev/zram0 && sudo swapon -p 100 /dev/zram0
3534

3635
echo "Install docker-compose..."
3736
sudo curl -SL https://github.com/docker/compose/releases/download/v2.23.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose

0 commit comments

Comments
 (0)