build: Add step "Increase swap" and "Check OOM error"

This commit is contained in:
remittor
2025-12-31 19:27:22 +03:00
parent cfc8241f53
commit 1d93b461b7

View File

@@ -280,6 +280,16 @@ jobs:
restore-keys: | restore-keys: |
toolchain-${{ env.G_TARGET_ARCH }}- toolchain-${{ env.G_TARGET_ARCH }}-
- name: Increase swap to 16G
run: |
free -h
sudo swapoff -a || true
sudo rm -f /swapfile
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Monitor memory - name: Monitor memory
run: | run: |
echo "Memory and swap:" echo "Memory and swap:"
@@ -369,6 +379,13 @@ jobs:
- name: Check space usage - name: Check space usage
run: df -hT run: df -hT
- name: Check OOM error
if: failure()
run: |
dmesg | grep -i -E 'oom|killed process' || true
echo "================== Memory ================="
free -h
- name: Compress build logs - name: Compress build logs
if: always() if: always()
env: env: