Skip to content

Commit 11e2910

Browse files
committed
merge benchmark into ci action
1 parent ec749b6 commit 11e2910

File tree

2 files changed

+90
-89
lines changed

2 files changed

+90
-89
lines changed

.github/workflows/benchmark.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
name: CI
22
on:
3-
- push
4-
- pull_request
3+
push: # see https://github.com/orgs/community/discussions/26276#discussioncomment-4617932
4+
branches:
5+
- main
6+
paths-ignore:
7+
- README.md
8+
- .gitignore
9+
- LICENSE.md
10+
pull_request:
11+
branches:
12+
- main
13+
paths-ignore:
14+
- README.md
15+
- .gitignore
16+
- LICENSE.md
517
env:
618
JULIA_NUM_THREADS: 2
719
jobs:
@@ -101,3 +113,79 @@ jobs:
101113
env:
102114
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103115
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
116+
benchmark:
117+
name: Run Julia benchmark
118+
runs-on: ${{ matrix.os }}
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
version:
123+
- '1.12'
124+
os:
125+
- ubuntu-latest
126+
arch:
127+
- x64
128+
steps:
129+
- uses: actions/checkout@v4
130+
- uses: julia-actions/setup-julia@v1
131+
with:
132+
version: ${{ matrix.version }}
133+
arch: ${{ matrix.arch }}
134+
- name: Install dependencies
135+
run: |
136+
julia --project=benchmark -e '
137+
import Pkg;
138+
Pkg.develop(Pkg.PackageSpec(path=pwd()));
139+
Pkg.instantiate()'
140+
- name: Run benchmark # import Pkg; Pkg.add("BenchmarkTools") # Pkg.develop(PackageSpec(path=pwd()))
141+
# julia --project=benchmark -e '
142+
# using Pkg;
143+
# Pkg.add("BenchmarkTools");
144+
# Pkg.develop(PackageSpec(path=pwd()));
145+
# Pkg.instantiate()'
146+
run: julia --project=benchmark benchmark/runbenchmarks.jl
147+
- uses: actions/cache@v4
148+
with:
149+
path: ./cache
150+
key: ${{ runner.os }}-benchmark
151+
# env:
152+
# cache-name: cache-artifacts
153+
# with:
154+
# path: ~/.julia/artifacts
155+
# key: runner.os−test−env.cache−name−{{ hashFiles('**/Project.toml') }}
156+
# restore-keys: |
157+
# runner.os−test−
158+
# ${{ env.cache-name }}-
159+
# ${{ runner.os }}-test-
160+
# ${{ runner.os }}-
161+
- name: Store benchmark result
162+
uses: benchmark-action/github-action-benchmark@v1
163+
with:
164+
# name: Julia benchmark result
165+
tool: 'julia'
166+
output-file-path: output.json #benchmark/
167+
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
168+
#external-data-json-path: ./cache/output.json
169+
github-token: ${{ secrets.GITHUB_TOKEN }}
170+
auto-push: true
171+
# Show alert with commit comment on detecting possible performance regression
172+
alert-threshold: '200%'
173+
comment-on-alert: true
174+
fail-on-alert: false
175+
#alert-comment-cc-users: '@ktrz,@findmyway'
176+
177+
# - name: Store benchmark result - separate results repo
178+
# uses: benchmark-action/github-action-benchmark@v1
179+
# with:
180+
# name: Julia benchmark result
181+
# tool: 'julia'
182+
# output-file-path: benchmark/output.json
183+
# # Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
184+
# github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
185+
# auto-push: true
186+
# # Show alert with commit comment on detecting possible performance regression
187+
# alert-threshold: '200%'
188+
# comment-on-alert: true
189+
# fail-on-alert: false
190+
# #alert-comment-cc-users: '@ktrz,@findmyway'
191+
# gh-repository: 'github.com/benchmark-action/github-action-benchmark-results'

0 commit comments

Comments
 (0)