-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (57 loc) · 1.81 KB
/
test_benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Test Benchmarks
on:
[push, pull_request]
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:
cases:
name: ${{ matrix.os }}, python${{ matrix.python-version }}, ${{ matrix.case-name }}
runs-on: ${{ matrix.os }}
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@v3
with:
activate-environment: actions-bench
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
miniforge-version: latest
- 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 -v
- name: Create artefact containing benchmarks
uses: actions/upload-artifact@v4
with:
name: test_benchmarks
path: .benchmarks