Skip to content

Nightly Benchmarks #828

Nightly Benchmarks

Nightly Benchmarks #828

name: Nightly Benchmarks
on:
workflow_dispatch:
schedule:
# Run every day at midnight
- cron: "0 0 * * *"
defaults:
run:
# The slightly odd shell call is to force bash to read .bashrc, which is
# necessary for having conda behave sensibly. We use bash as the shell even
# on Windows, since we don't run anything complicated, and it makes
# things much simpler.
shell: bash -l {0}
jobs:
benchmarks:
# Prevent running in all the forks
if: github.repository == 'qutip/qutip-benchmark'
name: ${{ matrix.os }}, python${{ matrix.python-version }}, ${{ matrix.case-name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
case-name: [defaults]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: actions-bench
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
- name: Install dependencies
run: |
mamba install numpy scipy cython
mamba install pytest pytest-benchmark
mamba install pandas matplotlib
- name: Install Qutip
run: |
python -m pip install git+https://github.com/qutip/qutip@master
- name: Package information
run: |
mamba list
python -c "import qutip; qutip.about()"
- name: Environment information
run: |
uname -a
if [[ "ubuntu-latest" == "${{ matrix.os }}" ]]; then
hostnamectl
lscpu
free -h
fi
- name: Run benchmarks
run: |
python -m qutip_benchmark.cli.run_benchmarks -m nightly -v
- name: Create artefact containing benchmarks
uses: actions/upload-artifact@v3
with:
name: nightly_benchmarks
path: .benchmarks
- name: upload to s3
run: |
aws s3 sync .benchmarks s3://qutip-benchmark-data/nightly
env:
AWS_ACCESS_KEY_ID: ${{ secrets.QUTIP_BENCHMARK_S3_KEYID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.QUTIP_BENCHMARK_S3_SECRET }}
AWS_EC2_METADATA_DISABLED: true