add benchmark GHA #13
Workflow file for this run
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: benchmarks | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'LICENSE.md' | |
- 'README.md' | |
- 'docs/**' | |
- 'issues/**' | |
- 'format/**' | |
- 'test/**' | |
jobs: | |
benchmarks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1" | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: Benchmark run | |
run: | | |
git fetch origin +:refs/remotes/origin/HEAD --depth=1 | |
julia --project=benchmark/ -e ' | |
using Pkg | |
Pkg.develop(PackageSpec(path=pwd())) | |
Pkg.instantiate() | |
using PkgBenchmark, MixedModels | |
# explicit `Pkgadd` is a crutch until we've got a good base on main | |
# Pkg.update() allows us to benchmark even when dependencies/compat requirements change | |
juliacmd = `$(Base.julia_cmd()) -O3" # -e "using Pkg; Pkg.update(); Pkg.add([\"BenchmarkTools\", \"StatsModels\"])"` | |
config = BenchmarkConfig(; id="origin/HEAD", juliacmd) | |
export_markdown("benchmark.md", judge(MixedModels, config; verbose=true))' | |
- name: Comment PR | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: "benchmark.md" | |
comment_tag: benchmark |