Skip to content

chore(ci): probe round 2 — app image on linux-x64-8-core #2

chore(ci): probe round 2 — app image on linux-x64-8-core

chore(ci): probe round 2 — app image on linux-x64-8-core #2

Workflow file for this run

name: Memory Probe
# Throwaway diagnostic. Round 1 (heap ceilings 4096/6144/8192 on free ubuntu-latest)
# failed at all three with exit 137 and ~15.9 GB peak — the heap ceiling is not the
# binding constraint. Round 2 confirms the paid 8-core/32 GB runner builds it.
# Delete this file and the ci-memtest branch once confirmed.
on:
push:
branches: [ci-memtest]
permissions:
contents: read
jobs:
probe:
name: app image @ ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
runner: [linux-x64-8-core]
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Runner specs
run: |
echo "nproc: $(nproc)"
awk '/MemTotal/{printf "MemTotal: %.2f GiB\n", $2/1048576}' /proc/meminfo
df -h / | tail -1
- name: Start memory sampler
run: |
nohup sh -c 'while true; do
awk "/MemTotal/{t=\$2} /MemAvailable/{a=\$2} END{printf \"%d\n\", (t-a)/1024}" /proc/meminfo
sleep 3
done' > /tmp/mem-samples.log 2>/dev/null &
echo "sampler_pid=$!" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4
- name: Build builder stage
id: build
continue-on-error: true
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
with:
context: .
file: ./docker/app.Dockerfile
target: builder
platforms: linux/amd64
push: false
provenance: false
sbom: false
- name: Report
run: |
kill "${sampler_pid}" 2>/dev/null || true
PEAK=$(sort -n /tmp/mem-samples.log | tail -1)
TOTAL=$(awk '/MemTotal/{printf "%d", $2/1024}' /proc/meminfo)
echo "runner=${{ matrix.runner }}"
echo "build_outcome=${{ steps.build.outcome }}"
echo "peak_used_mb=${PEAK}"
echo "total_mb=${TOTAL}"
{
echo "| runner | outcome | peak used MB | total MB |"
echo "|---|---|---|---|"
echo "| ${{ matrix.runner }} | ${{ steps.build.outcome }} | ${PEAK} | ${TOTAL} |"
} >> $GITHUB_STEP_SUMMARY
[ "${{ steps.build.outcome }}" = "success" ] || exit 1