Start Julia with 4 threads in the benchmark GH action #24
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: BenchmarksAndDownstream | |
on: | |
push: | |
branches: | |
- main | |
- benchmarks-github-action | |
tags: "*" | |
workflow-dispatch: | |
permissions: | |
# deployments permission to deploy GitHub pages website | |
deployments: write | |
# contents permission to update benchmark contents in gh-pages branch | |
contents: write | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
env: | |
GROUP: ${{ matrix.package.group }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1" | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
arch: | |
- x64 | |
package: | |
- {user: VEZY, repo: PlantSimEngine.jl, group: Downstream} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
# TODO handle breaking changes the way downstream tests do ? | |
# NOTE : manifest toml file is removed otherwise git whines about untracked changes when switching branches for the gh-pages commit | |
- name: Run benchmarks | |
run: | | |
cd test/downstream | |
julia --project --threads 4 --color=yes -e ' | |
using Pkg; | |
Pkg.instantiate(); | |
include("test-all-benchmarks.jl")' | |
rm Manifest.toml | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Julia benchmark result | |
tool: 'julia' | |
output-file-path: ${{ github.workspace }}/test/downstream/output.json | |
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096 | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-push: true | |
# Show alert with commit comment on detecting possible performance regression | |
alert-threshold: '130%' | |
comment-on-alert: true | |
fail-on-alert: true | |
alert-comment-cc-users: '@Samuel-AMAP, @VEZY' | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
fail_ci_if_error: false |