-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/benchx' into benchx
- Loading branch information
Showing
1 changed file
with
5 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,15 @@ | ||
name: RunUploadBenchmarks | ||
env: | ||
JULIA_NUM_THREADS: 2 | ||
JULIA_NUM_THREADS: 1 | ||
on: | ||
pull_request: | ||
# types: [labeled] | ||
types: [labeled] | ||
branches: | ||
- master | ||
- benchx | ||
push: | ||
branches: | ||
- master | ||
- benchx | ||
tags: '*' | ||
jobs: | ||
benchmark: | ||
# if: ${{ github.event.label.name == 'to-benchmark' }} | ||
if: ${{ github.event.label.name == 'to-benchmark' }} | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: ${{ matrix.allow_failure }} | ||
|
@@ -50,41 +45,14 @@ jobs: | |
- uses: julia-actions/julia-buildpkg@latest | ||
- name: install dependencies | ||
run: julia -e 'using Pkg; pkg"add PkgBenchmark [email protected]"' | ||
- name: Run benchmark judge if pull request | ||
if: github.event_name == 'pull_request' | ||
- name: Run benchmark judge | ||
run: julia -e " | ||
using BenchmarkCI, PkgBenchmark; | ||
jd=BenchmarkCI.judge(baseline=\"origin/${GITHUB_BASE_REF}\"); | ||
" | ||
# - name: Post results if pull request | ||
# if: github.event_name == 'pull_request' | ||
# run: julia -e 'using BenchmarkCI; BenchmarkCI.postjudge()' | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Add comment | ||
# if: github.event_name == 'pull_request' | ||
# run: gh pr comment "$NUMBER" --body "$BODY" | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# GH_REPO: ${{ github.repository }} | ||
# NUMBER: ${{ github.event.pull_request.number }} | ||
# BODY: > | ||
# This pr comment is testing. | ||
# **This should be bold** | ||
- name: Run benchmark if push/merge | ||
if: github.event_name == 'push' | ||
run: julia --project=benchmark -e " | ||
import Pkg; | ||
Pkg.develop(path=pwd()); | ||
Pkg.instantiate(); | ||
using PkgBenchmark, BenchmarkTools; | ||
br=benchmarkpkg(pwd()); | ||
br_median = BenchmarkResults(br.name, br.commit, median(br.benchmarkgroup), br.date, br.julia_commit, br.vinfo, br.benchmarkconfig); | ||
writeresults(\"medianbenchout.json\", br_median); | ||
" | ||
- name: Save PR number | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
run: | | ||
echo $PR_NUMBER > .benchmarkci/pr_number | ||
- uses: actions/upload-artifact@v3 | ||
|