-
Notifications
You must be signed in to change notification settings - Fork 2
96 lines (91 loc) · 2.6 KB
/
run-tests.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: 🧪
on:
push:
branches:
- "**"
pull_request:
branches:
- main
merge_group:
jobs:
run-tests-rust:
name: Run Rust tests
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["stable"]
mpi: ['mpich', 'openmpi']
feature-flags: ['--features "mpi,strict"']
steps:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt
- name: Set up MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- name: Install cargo-mpirun
run: cargo install cargo-mpirun
- uses: actions/checkout@v3
- name: Install LAPACK, OpenBLAS
run:
sudo apt-get install -y libopenblas-dev liblapack-dev
- name: Run unit tests
run: cargo test ${{ matrix.feature-flags }}
- name: Run unit tests in release mode
run: cargo test --release ${{ matrix.feature-flags }}
- name: Run tests
run: cargo test --examples --release ${{ matrix.feature-flags }}
- name: Test benchmarks build
run: cargo bench --no-run --features "mpi,strict"
- name: Run examples
run: |
python3 find_examples.py
chmod +x examples.sh
./examples.sh
run-tests-python:
name: Run Python tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv "maturin>=1.7"
- name: Make virtual environment
run: |
uv venv .venv
uv pip install pip pytest
- name: Install python package
run: |
source .venv/bin/activate
maturin develop --release
- name: Run Python tests
run: |
source .venv/bin/activate
python -m pytest python/test
check-dependencies:
name: Check dependencies
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["stable"]
steps:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt
- name: Install cargo-upgrades
run: cargo install cargo-upgrades
- uses: actions/checkout@v3
- name: Check that dependencies are up to date
run:
cargo upgrades