Skip to content

fix(lint): ASCII x in render_sweep_table docstring (ruff RUF002) #6

fix(lint): ASCII x in render_sweep_table docstring (ruff RUF002)

fix(lint): ASCII x in render_sweep_table docstring (ruff RUF002) #6

Workflow file for this run

name: Build bench image
on:
push:
branches: [main]
paths:
- 'Dockerfile.bench'
- 'requirements-bench.txt'
- 'scripts/bake_bench_cache.py'
- 'scripts/build_bench_image.sh'
- 'diffctx/**'
- 'src/treemapper/**'
- 'benchmarks/**'
- 'pyproject.toml'
- '.github/workflows/bench-image.yml'
workflow_dispatch:
inputs:
bake_dataset:
description: 'Dataset for cache (full | verified)'
required: false
default: 'full'
type: choice
options: [full, verified]
bake_limit:
description: 'Limit instances for faster cache (0 = all)'
required: false
default: '0'
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/treemapper-bench
CACHE_REF: ghcr.io/${{ github.repository_owner }}/treemapper-bench:buildcache
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Free disk space (large image build)
run: |
set -eux
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true
sudo docker image prune -af || true
df -h /
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:latest
network=host
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-,format=short
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push (multi-arch)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.bench
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.CACHE_REF }}
cache-to: type=registry,ref=${{ env.CACHE_REF }},mode=max,image-manifest=true,oci-mediatypes=true
build-args: |
BAKE_DATASET=${{ inputs.bake_dataset || 'full' }}
BAKE_LIMIT=${{ inputs.bake_limit || '0' }}
BAKE_PARALLELISM=6