From f7cef9a24217772a1cb1c6ccb391861288ddf618 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 22 Sep 2023 11:09:19 +0200 Subject: [PATCH] Test ASAN on Ubuntu 22.04 in nightly by increasing swap See ef6bbaa. We previously ran into crashes that are apprently related to a decrease in memory on never runners. The crash can be avoided by increasing the swap file. Closes GH-12267 --- .github/workflows/nightly.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 33bf1db2e18..706a33887ec 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -60,8 +60,18 @@ jobs: zts: [true, false] include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.matrix-include) }} name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" - runs-on: ubuntu-${{ ((matrix.branch.ref == 'PHP-8.3' || matrix.branch.ref == 'master') && !matrix.asan) && '22.04' || '20.04' }} + runs-on: ubuntu-${{ (matrix.branch.ref == 'PHP-8.3' || matrix.branch.ref == 'master') && '22.04' || '20.04' }} steps: + # https://stackoverflow.com/a/76921482/1320374 + - name: Increase swapfile + if: matrix.asan + run: | + sudo swapoff -a + sudo fallocate -l 8G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + sudo swapon --show - name: git checkout uses: actions/checkout@v4 with: