Skip to content

fix(release): preserve prereleases and qualify exact native candidates #17

fix(release): preserve prereleases and qualify exact native candidates

fix(release): preserve prereleases and qualify exact native candidates #17

name: CI Release Performance Probe
on:
pull_request:
types: [opened, reopened, synchronize, labeled]
permissions:
contents: read
concurrency:
group: ci-release-performance-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
candidate:
name: Build ARM performance candidate
if: contains(github.event.pull_request.labels.*.name, 'ci-performance')
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.sha }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Install locked build dependencies
run: uv sync --frozen --extra dev --extra build
- name: Build current ARM candidate
env:
UV_FROZEN: 'true'
UV_NO_SYNC: 'true'
run: uv run --frozen --no-sync bash scripts/build-binary.sh
- name: Exercise actual candidate core
env:
APM_E2E_TESTS: '1'
APM_BINARY_PATH: ${{ github.workspace }}/dist/apm-darwin-arm64/apm
run: >-
uv run --frozen --no-sync python -m pytest
tests/integration/test_core_smoke.py -q
--junitxml=test-results/core.xml
- name: Package one immutable candidate for every variant
run: >-
python scripts/package_release.py pack
--binary-name apm-darwin-arm64 --sha "$GITHUB_SHA"
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: benchmark-arm-candidate-${{ github.run_attempt }}
# Sibling paths preserve release-assets/ instead of flattening it.
path: |
release-assets/
scripts/package_release.py
scripts/release-platforms.json
compression-level: 0
if-no-files-found: error
retention-days: 30
- name: Freeze identical cold scheduling input
run: printf '{}\n' > .test_durations
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: benchmark-arm-cold-timings-${{ github.run_attempt }}
path: .test_durations
include-hidden-files: true
if-no-files-found: error
retention-days: 30
- name: Upload candidate startup outcome
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: benchmark-arm-core-${{ github.run_attempt }}
path: test-results/
if-no-files-found: error
retention-days: 30
integration:
name: ARM Integration (${{ matrix.variant }}, shard ${{ matrix.shard }})
needs: [candidate]
if: contains(github.event.pull_request.labels.*.name, 'ci-performance')
strategy:
fail-fast: false
matrix:
include:
- variant: baseline
shard: 1
count: 1
workers: 4
- variant: proposed
shard: 1
count: 2
workers: 3
- variant: proposed
shard: 2
count: 2
workers: 3
uses: ./.github/workflows/release-integration.yml
permissions:
contents: read
actions: read
with:
runner: macos-latest
platform: darwin
binary-name: apm-darwin-arm64
candidate-artifact-name: benchmark-arm-candidate-${{ github.run_attempt }}
candidate-sha: ${{ github.sha }}
timing-snapshot-artifact: benchmark-arm-cold-timings-${{ github.run_attempt }}
integration-markers: not live
shard-count: ${{ matrix.count }}
shard-index: ${{ matrix.shard }}
xdist-workers: ${{ matrix.workers }}
splitting-algorithm: least_duration
timeout-minutes: 65
runtime-prerequisites: none
cache-apm-fetches: false
artifact-prefix: arm-probe-${{ matrix.variant }}-${{ github.run_attempt }}
evidence-variant: ${{ matrix.variant }}
evidence-selection: tests/integration/ -m not live
performance-cohort: integration-${{ github.run_attempt }}-apm-darwin-arm64
compare:
name: Compare ARM Integration Performance
needs: [candidate, integration]
if: >-
always() && !cancelled() &&
contains(github.event.pull_request.labels.*.name, 'ci-performance')
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require all benchmark executions succeeded
env:
BUILD_RESULT: ${{ needs.candidate.result }}
INTEGRATION_RESULT: ${{ needs.integration.result }}
run: |
test "$BUILD_RESULT" = success
test "$INTEGRATION_RESULT" = success
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.sha }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Download baseline evidence
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: performance-evidence-arm-probe-baseline-${{ github.run_attempt }}-baseline-shard-1
path: performance-inputs/baseline
- name: Download proposed shard one evidence
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: performance-evidence-arm-probe-proposed-${{ github.run_attempt }}-proposed-shard-1
path: performance-inputs/proposed-1
- name: Download proposed shard two evidence
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: performance-evidence-arm-probe-proposed-${{ github.run_attempt }}-proposed-shard-2
path: performance-inputs/proposed-2
- name: Require identical outcomes and a measured execution gain
run: >-
python -m scripts.compare_test_runs compare
--baseline performance-inputs/baseline/baseline-shard-1.json
--proposed performance-inputs/proposed-1/proposed-shard-1.json
performance-inputs/proposed-2/proposed-shard-2.json
--expected-sha "$GITHUB_SHA" --minimum-speedup 0.05
--output performance-comparison/arm-cold.json
- name: Upload comparison
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: arm-performance-comparison-${{ github.run_attempt }}
path: performance-comparison/
if-no-files-found: ignore
retention-days: 30
python-distributions:
name: Read-only Python distribution build
if: contains(github.event.pull_request.labels.*.name, 'ci-performance')
uses: ./.github/workflows/pypi-distributions.yml
permissions:
contents: read
with:
artifact_name: benchmark-python-distributions-${{ github.run_attempt }}
upload_artifact: true
docs:
name: Read-only documentation build
if: contains(github.event.pull_request.labels.*.name, 'ci-performance')
uses: ./.github/workflows/docs-build.yml
permissions:
contents: read
with:
pages_artifact_name: benchmark-docs-${{ github.run_attempt }}
upload_pages_artifact: true