fix(bench): depth 0 coerced to -1 by falsy or in table renderers #48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: bench-image | |
| # Keeps ghcr.io/nikolay-e/diffctx-bench:latest in sync with main so | |
| # bench-sweep never provisions against a stale or missing image (the | |
| # May-2026 rebrand renamed the image reference without republishing it; | |
| # every full sweep died at cloud-init for seven weeks). | |
| 'on': | |
| workflow_dispatch: {} | |
| push: | |
| branches: [main] | |
| paths: | |
| - Dockerfile.bench | |
| - requirements-bench.txt | |
| - pyproject.toml | |
| - src/** | |
| - diffctx/src/** | |
| - diffctx/Cargo.toml | |
| - diffctx/Cargo.lock | |
| - benchmarks/** | |
| - scripts/bake_bench_cache.py | |
| - .github/workflows/bench-image.yml | |
| concurrency: | |
| group: bench-image | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-push: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 | |
| - name: Login to ghcr | |
| uses: docker/login-action@c99871dec2022cc055c062a10cc1a1310835ceb4 # v4.3.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| context: . | |
| file: Dockerfile.bench | |
| platforms: linux/amd64 | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/diffctx-bench:latest | |
| ghcr.io/${{ github.repository_owner }}/diffctx-bench:main-${{ github.sha }} | |
| cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/diffctx-bench:buildcache | |
| cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/diffctx-bench:buildcache,mode=max |