Merge pull request #1339 from axch/work-stealing-2 #313
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: Continuous benchmarking | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
include: | |
- os: ubuntu-20.04 | |
install_deps: sudo apt-get install llvm-12-tools llvm-12-dev pkg-config | |
path_extension: /usr/lib/llvm-12/bin | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install system dependencies | |
run: | | |
${{ matrix.install_deps }} | |
pip install numpy "jax[cpu]" | |
echo "${{ matrix.path_extension }}" >> $GITHUB_PATH | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.stack | |
key: ${{ runner.os }}-bench-v1-${{ hashFiles('**/*.cabal', 'stack*.yaml') }} | |
restore-keys: ${{ runner.os }}-bench-v1 | |
- name: Benchmark | |
run: python3 benchmarks/continuous.py /tmp/new-perf-data.csv /tmp/new-commits.csv ${GITHUB_SHA} | |
- name: Switch to the data branch | |
uses: actions/checkout@v2 | |
with: | |
ref: performance-data | |
- name: Append new data points | |
run: | | |
cat /tmp/new-perf-data.csv >>performance.csv | |
cat /tmp/new-commits.csv >>commits.csv | |
- name: Commit new data points | |
if: github.event_name == 'push' | |
run: | | |
git config --global user.name 'Dex CI' | |
git config --global user.email '[email protected]' | |
git add performance.csv commits.csv | |
git commit -m "Add measurements for ${GITHUB_SHA}" | |
git push |