Skip to content

Benchmark on CI

Benchmark on CI #7

Workflow file for this run

name: Benchmark
on:
pull_request:
types: [labeled]
workflow_dispatch:
# Make sure that we only benchmark the last version per branch, max one at the time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
build:
if: ${{ github.event.label.name == 'benchmark' }}
runs-on: macos-latest
defaults:
run:
working-directory: ./Benchmarks
strategy:
matrix:
xcode: ["15.4"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: brew install jemalloc
- name: Run benchmark
run: |
swift package --allow-writing-to-package-directory benchmark --no-progress --format jmh
ls -la
- name: Upload artifacts
uses: actions/[email protected]
with:
name: benchmarks-${{ matrix.xcode }}-${{ github.run_id }}
path: |
Current_run.jmh.json
Benchmarks/Current_run.jmh.json
*.jmh.json
if-no-files-found: warn
include-hidden-files: true
- name: JMH Benchmark Action
uses: kitlangton/jmh-benchmark-action@main
with:
jmh-output-path: Benchmarks/Current_run.jmh.json
github-token: ${{ secrets.GITHUB_TOKEN }}