Benchmark on CI #4
This file contains 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: 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 | |
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 |