Merge pull request #2406 from devitocodes/tens-fix #886
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
# Runner information: | |
# CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz | |
# GPU: NVIDIA GeForce RTX 2060 | |
name: asv-benchmarks | |
env: | |
OUTPUT_PATH: ${{ github.workspace }} | |
ENVHOME: "/home/devito/environments" | |
on: | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: 'Run ASV' | |
# Trigger the workflow on push to the master branch | |
push: | |
branches: | |
- master | |
jobs: | |
# Run the asv benchmarks on the self-hosted runner | |
benchmarks: | |
name: benchmarks | |
runs-on: [self-hosted, asv] | |
env: | |
DEVITO_ARCH: "gcc-9" | |
DEVITO_LANGUAGE: "openmp" | |
DEVITO_BENCHMARKS: "1" | |
DEVITO_LOGGING: "PERF" | |
OMP_NUM_THREADS: "8" | |
CC: "gcc-9" | |
CXX: "g++-9" | |
steps: | |
- name: Checkout devito | |
uses: actions/checkout@v4 | |
- name: Set VIRTUAL_ENV | |
run: | | |
echo "VIRTUAL_ENV=$ENVHOME/asv" >> $GITHUB_ENV | |
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV | |
- name: Set PATH | |
run: | | |
echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade asv | |
- name: Setup asv | |
run: | | |
asv machine --config benchmarks/regression/asv.conf.json --machine i7-6700K --os ubuntu-20.10 --arch x86-64 --cpu i7-6700K --num_cpu 8 --ram 16GB | |
- name: Run benchmarks | |
run: | | |
asv run -v --show-stderr --config benchmarks/regression/asv.conf.json --cpu-affinity 0-7 --machine i7-6700K | |
- name: Checkout asv-results branch | |
uses: actions/checkout@v4 | |
with: | |
ref: asv-results | |
clean: false | |
- name: Commit benchmarks results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
asv run --config benchmarks/regression/asv.conf.json --bench just-discover --machine i7-6700K | |
git add -f benchmarks/regression/.asv/results/ | |
git status | |
git commit -m "Commit ASV results" | |
- name: Push benchmarks results to the asv-results branch | |
uses: ad-m/github-push-action@master | |
with: | |
branch: asv-results | |
force: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create results (html) | |
run: | | |
asv publish --config benchmarks/regression/asv.conf.json | |
rm -f /tmp/ssh-auth.sock | |
- name: Deploy results to devitocodes/devito-performance/gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
external_repository: devitocodes/devito-performance | |
publish_branch: gh-pages | |
publish_dir: ./benchmarks/regression/.asv/html |