Skip to content

Commit b004256

Browse files
committed
Add some swap memory for Linux
1 parent da535ad commit b004256

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,16 @@ jobs:
326326
key: ${{ matrix.name }}
327327
max-size: 800M
328328

329+
- name: Setup swap for linking
330+
run: |
331+
mkdir -p /tmp/swap
332+
mount -t tmpfs -o size=2G tmpfs /tmp/swap
333+
dd if=/dev/zero of=/tmp/swap/swapfile bs=1M count=2048
334+
chmod 600 /tmp/swap/swapfile
335+
mkswap /tmp/swap/swapfile
336+
swapon /tmp/swap/swapfile
337+
free -h
338+
329339
- name: Configure
330340
working-directory: ${{github.workspace}}
331341
run: CXX=g++ cmake -Bbuild -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache

0 commit comments

Comments
 (0)