From 409a1e5b9063df2f508664c3c611366a4fe6095e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl?= Date: Tue, 4 Aug 2026 12:43:27 +0200 Subject: [PATCH] ci: report runner capacity on the self-hosted jobs --- .github/workflows/quality.yml | 9 +++++++++ .github/workflows/tests.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 4a4eba2829..2d3af79c16 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -145,6 +145,15 @@ jobs: group: ${{ github.ref == 'refs/heads/main' && format('check-compose-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-compose-develop-{0}', github.sha) || format('check-compose-{0}', github.ref) }} cancel-in-progress: true steps: + # Records the container's real limits so heap settings can be read against them + # instead of guessed at. Mirrors healthchat-release-playstore.yml. + - name: Report runner capacity + if: runner.environment == 'self-hosted' + run: | + free -h; nproc; df -h . + cat /sys/fs/cgroup/memory.max 2>/dev/null \ + || cat /sys/fs/cgroup/memory/memory.limit_in_bytes 2>/dev/null \ + || echo "no cgroup memory limit visible" - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: # Ensure we are building the branch and not the branch after being merged on develop diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7a3b006c9a..d1eb35fca3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,15 @@ jobs: group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }} cancel-in-progress: true steps: + # Records the container's real limits so heap settings can be read against them + # instead of guessed at. Mirrors healthchat-release-playstore.yml. + - name: Report runner capacity + if: runner.environment == 'self-hosted' + run: | + free -h; nproc; df -h . + cat /sys/fs/cgroup/memory.max 2>/dev/null \ + || cat /sys/fs/cgroup/memory/memory.limit_in_bytes 2>/dev/null \ + || echo "no cgroup memory limit visible" - name: Free Disk Space (Ubuntu) # Only meaningful on GitHub's throwaway VMs. On a persistent self-hosted runner this # would delete dotnet/haskell/docker images from the host on every run.