Skip to content

Benchmark github action #4

Benchmark github action

Benchmark github action #4

Workflow file for this run

name: Run benchmark
on:
pull_request:
branches:
- main
jobs:
benchmark:
permissions:
contents: read
runs-on: macos-26
steps:
- name: Checkout main
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Update baseline
run: swift package --allow-writing-to-package-directory benchmark baseline update main \
--no-progress
- name: Upload baseline
uses: actions/upload-artifact@v7
with:
name: benchmark-baseline
path: .benchmarkBaselines
- name: Checkout current
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
path: current
- name: Download baseline
uses: actions/download-artifact@v8
with:
name: benchmark-baseline
path: .benchmarkBaselines
- name: Compare results
run: swift package benchmark baseline compare main \
--filter ".*inlinestring16.*" \
--format markdown \
--no-progress