π§ͺπ #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: π§ͺπ | |
on: | |
schedule: | |
- cron: "0 7 * * 1" | |
jobs: | |
run-tests-rust: | |
name: Run Rust tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust-version: ["stable", "beta", "nightly"] | |
mpi: [ 'mpich', 'openmpi'] | |
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: Build rust library | |
run: cargo build --features "strict" | |
- name: Build rust library in release mode | |
run: cargo build --release --features "strict" | |
- name: Build rust library in release mode with mpi | |
run: cargo build --release --features "strict,mpi" | |
- name: Run unit tests | |
run: cargo test --features "strict" | |
- name: Run unit tests in release mode | |
run: cargo test --release --features "strict" | |
- name: Run unit tests with mpi enabled | |
run: cargo test --features "mpi,strict" | |
- name: Run unit tests in release mode with mpi enabled | |
run: cargo test --release --features "mpi,strict" | |
- name: Run tests | |
run: cargo test --examples --release --features "mpi,strict" | |
- 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 | |
- name: Build docs | |
run: cargo doc --features "mpi,strict" --no-deps | |
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 | |