chore: release #3096
Workflow file for this run
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: Hotpath profile | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - 'demo/**' | |
| - 'docs/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| profile: | |
| runs-on: ubuntu-latest | |
| env: | |
| PGDATABASE: test | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| services: | |
| postgres: | |
| image: postgis/postgis:18-3.6 | |
| ports: | |
| - 5432/tcp | |
| options: >- | |
| -e POSTGRES_DB=test | |
| -e POSTGRES_USER=postgres | |
| -e POSTGRES_PASSWORD=postgres | |
| -e PGDATABASE=test | |
| -e PGUSER=postgres | |
| -e PGPASSWORD=postgres | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - run: rustup update stable && rustup default stable | |
| - uses: ./.github/actions/setup-rust | |
| with: { toolchain: none, tools: 'just,oha' } | |
| - name: Install rendering dependencies | |
| run: just install-dependencies | |
| - name: Init database | |
| run: tests/fixtures/initdb.sh | |
| env: | |
| PGPORT: ${{ job.services.postgres.ports[5432] }} | |
| - name: Create metrics directory | |
| run: mkdir -p /tmp/metrics | |
| - name: Build head | |
| run: just build-hotpath | |
| - name: Benchmark head | |
| env: | |
| HOTPATH_OUTPUT_FORMAT: json | |
| HOTPATH_OUTPUT_PATH: /tmp/metrics/head_timing.json | |
| HOTPATH_ALLOC_SELF: true | |
| DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGPASSWORD }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }} | |
| run: just bench-hotpath | |
| - name: Checkout base | |
| run: git checkout ${{ github.event.pull_request.base.sha }} | |
| - name: Clean slate to not have codegen cache artefact bias | |
| run: cargo clean | |
| - name: Check base has hotpath support | |
| id: base-check | |
| run: | | |
| if grep -q 'hotpath' martin/Cargo.toml; then | |
| echo "supported=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "::notice::Base branch does not have hotpath feature, skipping base benchmark" | |
| echo '{}' > /tmp/metrics/base_timing.json | |
| echo "supported=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build base | |
| if: steps.base-check.outputs.supported == 'true' | |
| run: just build-hotpath | |
| - name: Benchmark base | |
| if: steps.base-check.outputs.supported == 'true' | |
| env: | |
| HOTPATH_OUTPUT_FORMAT: json | |
| HOTPATH_OUTPUT_PATH: /tmp/metrics/base_timing.json | |
| HOTPATH_ALLOC_SELF: true | |
| DATABASE_URL: postgres://${{ env.PGUSER }}:${{ env.PGPASSWORD }}@${{ env.PGHOST }}:${{ job.services.postgres.ports[5432] }}/${{ env.PGDATABASE }} | |
| run: just bench-hotpath | |
| - name: Save PR metadata | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| BASE_REF: ${{ github.base_ref }} | |
| HEAD_REF: ${{ github.head_ref }} | |
| run: | | |
| echo "$PR_NUMBER" > /tmp/metrics/pr_number.txt | |
| echo "$BASE_REF" > /tmp/metrics/base_ref.txt | |
| echo "$HEAD_REF" > /tmp/metrics/head_ref.txt | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: profile-metrics | |
| path: /tmp/metrics/ | |
| retention-days: 1 |