test: python 3.12 #957
Workflow file for this run
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: Benchmark | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: "36 1 * * SUN" # M H d m w (Sundays at 01:36) | |
jobs: | |
asvfull: | |
name: Benchmark | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh | |
- name: install | |
run: | | |
pip install -U wheel | |
pip install -U asv | |
git checkout main && git checkout - | |
asv machine --machine github-actions --yes | |
# IF PR =========================== | |
- name: Benchmark (PR) | |
if: github.event_name == 'pull_request' | |
run: | | |
export CONDA_EXE=$(which mamba) | |
asv continuous main HEAD --interleave-processes --show-stderr --split --factor 1.15 | |
# IF not PR ======================= | |
- name: Restore previous results | |
if: github.event_name != 'pull_request' | |
uses: actions/cache@v3 | |
with: | |
path: .asv | |
key: asv-${{ runner.os }} | |
restore-keys: | | |
asv- | |
- name: Benchmark (Full) | |
if: github.event_name != 'pull_request' | |
run: | | |
export CONDA_EXE=$(which mamba) | |
asv run -j 4 --show-stderr --interleave-processes --skip-existing v0.1.0..HEAD | |
- name: Build pages | |
if: github.event_name != 'pull_request' | |
run: | | |
git config --global user.email "$GIT_AUTHOR_EMAIL" | |
git config --global user.name "$GIT_AUTHOR_NAME" | |
asv gh-pages --no-push | |
git push -f origin gh-pages:gh-pages | |
env: | |
GIT_AUTHOR_NAME: ${{ github.actor }} | |
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com |