name: Idle memory benchmark on: schedule: - cron: '17 7 * * 0' workflow_dispatch: permissions: contents: read env: BUN_VERSION: '1.4.4' concurrency: group: idle-memory-benchmark cancel-in-progress: false jobs: benchmark: runs-on: ubuntu-24.04 timeout-minutes: 45 steps: - name: Checkout uses: actions/checkout@v6 - name: Setup Pantry uses: pantry-pm/pantry/packages/action@cdb82193cb344c2b881a88ea79f88243f5522e0f # v0.11.75 with: version: '0.11.75' install: 'false' packages: 'bun@${{ env.BUN_VERSION }}' - name: Install project and benchmark dependencies run: | bun install --frozen-lockfile bun install --cwd bench/routing --frozen-lockfile - name: Verify benchmark source is clean run: | source_status=$(git status --porcelain --untracked-files=normal) if [ -n "$source_status" ]; then printf '%s\n' "$source_status" exit 1 fi - name: Install oha 1.16.0 env: OHA_SHA256: 620bb9e16fb53eabc9a3fc45f88bdb41fefa3fee5c05e75892011ce320391716 run: | mkdir -p "$RUNNER_TEMP/oha/bin" /usr/bin/curl -fsSL \ https://github.com/hatoo/oha/releases/download/v1.16.0/oha-linux-amd64 \ -o "$RUNNER_TEMP/oha/bin/oha" echo "$OHA_SHA256 $RUNNER_TEMP/oha/bin/oha" | sha256sum --check chmod +x "$RUNNER_TEMP/oha/bin/oha" echo "$RUNNER_TEMP/oha/bin" >> "$GITHUB_PATH" - name: Measure idle RSS run: bun run bench:memory --driver oha --output bench/memory/results/ci - name: Verify completed memory artifact run: bun bench/memory/verify-artifact.ts --directory=bench/memory/results/ci - name: Upload report and raw samples if: always() uses: actions/upload-artifact@v6 with: name: idle-memory-${{ github.run_id }} path: bench/memory/results/ci if-no-files-found: error retention-days: 30