Skip to content

Set required git configuration for initiated test repository #56

Set required git configuration for initiated test repository

Set required git configuration for initiated test repository #56

Workflow file for this run

name: Benchmark
on:
pull_request:
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Set up system
shell: bash
run: |
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
sudo apt-get update -qq
sudo apt-get install eatmydata
sudo eatmydata apt-get install -y fuse git-annex-standalone
- name: Set up environment
run: |
git config --global user.email "test@github.land"
git config --global user.name "GitHub Almighty"
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install --upgrade 'asv[virtualenv] != 0.6.2'
- name: Set up machine profile
run: asv machine --yes
- name: Save comparison points as GitHub refs
run: |
# If this is a PR run, then HEAD is a refs/pull/:number/merge ref and
# HEAD^1 is the target that the PR will be merged into.
# If this is a push run, then HEAD is the most recently-pushed commit
# and HEAD^1 is the commit before it (which may or may not be the
# previous HEAD for the branch, depending on whether multiple commits
# were pushed at once).
git update-ref refs/bm/pr HEAD
git update-ref refs/bm/merge-target HEAD^1
- name: Run benchmarks on newest code
run: asv run --show-stderr --python 3.8 HEAD^-1
- name: Check out previous code
run: git checkout --force refs/bm/merge-target
- name: Run benchmarks on previous code
run: asv run --show-stderr --python 3.8 HEAD^-1
- name: Compare benchmarks on previous & newest code
run: asv compare refs/bm/merge-target refs/bm/pr
- name: Fail if any benchmarks have slowed down too much
run: |
! asv compare --factor 1.2 --split refs/bm/merge-target refs/bm/pr | grep -q "got worse"