forked from pola-rs/polars
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (63 loc) · 2.08 KB
/
benchmark.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
70
71
72
73
74
75
76
77
name: Benchmark
on:
pull_request:
paths:
- polars/**
- Cargo.toml
- py-polars/tests/benchmark/**
- .github/workflows/benchmark.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: py-polars/requirements-dev.txt
- name: Create virtual environment
working-directory: py-polars
run: |
python -m venv .venv
echo "$GITHUB_WORKSPACE/py-polars/.venv/bin" >> $GITHUB_PATH
- name: Install Python dependencies
working-directory: py-polars
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '3.5.3'
- name: Generate data
working-directory: py-polars/tests/benchmark
run: |
Rscript -e 'install.packages("data.table", repos="https://cloud.r-project.org")'
Rscript groupby-datagen.R 1e7 1e2 5 0
- name: Set up Rust
run: rustup show
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: py-polars
- name: Install Polars release build
env:
RUSTFLAGS: -C embed-bitcode
working-directory: py-polars
run: |
source activate
maturin develop --release -- -C codegen-units=8 -C lto=thin -C target-cpu=native
- name: Run H2O AI database benchmark - on strings
working-directory: py-polars/tests/benchmark
run: python run_h2oai_benchmark.py on_strings
- name: Run H2O AI database benchmark - on categoricals
working-directory: py-polars/tests/benchmark
run: python run_h2oai_benchmark.py
- name: Run various benchmark tests
working-directory: py-polars
run: pytest -m benchmark --durations 0 -v