-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (41 loc) · 1.49 KB
/
bench.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
# Benches are mostly usefull on the local machine to keep track of performances
# evolutions (possible improvements, regressions, ...).
# This scripts is nonetheless useful:
# * to document how to setup and exec bench on a machine
# * to automatically perform benches (but no comparison with previous one's)
#
# To understand this scripts, look at the comments in deploy.yml or test.yml.
name: bench-cdshealpix
on: [workflow_dispatch]
jobs:
runs-benches:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.12]
steps:
- name: "Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: "Checkout the branch ${{ github.head_ref }}"
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: "Install virtual env, build project and run benches"
run: |
# Install virtualenv
pip install virtualenv
# Create and activate a new virtualenv
virtualenv cdshealpixenv
source cdshealpixenv/bin/activate
# Install maturin
pip install maturin
# Build and install cdshealpix
maturin develop --release
# Install dependencies needed to run benches
pip install -r requirements-bench.txt
# Run benches
python3 -m pytest -v python/cdshealpix/tests/test_benchmark_healpix.py
deactivate