tqdm/.github/workflows/bench.yml

77 lines
2.3 KiB
YAML
Raw Normal View History

2020-07-10 17:36:15 +00:00
name: Benchmark
on:
push:
schedule:
- cron: '36 1 * * SUN' # M H d m w (Sundays at 01:36)
jobs:
asvfull:
2020-07-11 01:02:15 +00:00
if: (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')) || github.event_name == 'schedule'
2020-07-10 21:27:36 +00:00
name: Full
2020-07-10 17:36:15 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install
run: |
pip install -U wheel
pip install -U virtualenv asv
2020-07-10 18:26:37 +00:00
asv machine --machine github-actions --yes
2020-07-10 17:36:15 +00:00
git fetch --tags
2020-07-10 18:26:37 +00:00
git fetch origin master:master
2020-07-10 19:29:32 +00:00
- name: Restore previous results
2020-07-10 18:26:37 +00:00
uses: actions/cache@v2
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
2020-07-10 19:29:32 +00:00
- name: Benchmark
2020-07-10 17:36:15 +00:00
run: |
2020-07-10 21:27:36 +00:00
asv run -j 8 --interleave-processes --skip-existing v3.2.0..HEAD
2020-07-10 19:29:32 +00:00
- name: Build pages
run: |
git config --global user.email "$GIT_AUTHOR_EMAIL"
git config --global user.name "$GIT_AUTHOR_NAME"
2020-07-10 17:36:15 +00:00
asv gh-pages --no-push
2020-07-10 19:29:32 +00:00
git push -f origin gh-pages:gh-pages
env:
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
2020-07-10 21:27:36 +00:00
testasv:
2020-07-16 22:31:13 +00:00
if: github.event_name == 'push' && ! startsWith(github.event.ref, 'refs/tags') && github.event.ref != 'refs/heads/master'
2020-07-10 21:27:36 +00:00
name: Branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install
run: |
pip install -U wheel
pip install -U virtualenv asv
asv machine --machine github-actions --yes
git fetch --tags
2020-07-16 22:31:13 +00:00
git fetch origin master:master
2020-07-10 21:27:36 +00:00
- name: Restore previous results
uses: actions/cache@v2
with:
path: .asv
key: asv-${{ runner.os }}
restore-keys: |
asv-
- name: Benchmark
run: |
2020-07-16 22:31:13 +00:00
asv continuous --interleave-processes --only-changed -f 1.25 master HEAD
CHANGES="$(asv compare --only-changed -f 1.25 master HEAD)"
echo "$CHANGES"
[ -z "$CHANGES" ] || exit 1
always:
runs-on: ubuntu-latest
steps:
- run: echo prevent failure when other jobs are skipped