Skip to content

Merge pull request #1334 from google-research/primitive-name-map-e #21

Merge pull request #1334 from google-research/primitive-name-map-e

Merge pull request #1334 from google-research/primitive-name-map-e #21

Workflow file for this run

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