Skip to content

Commit

Permalink
use nightly on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Dec 3, 2024
1 parent c4c3b4f commit df360a5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: mpi4py/setup-mpi@v1
with:
mpi: "mpich"
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build docs
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --no-deps -Zunstable-options -Zrustdoc-scrape-examples --features "mpi,strict"
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
uses: mpi4py/setup-mpi@v1
with:
mpi: "mpich"
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build docs
run: RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --no-deps -Zunstable-options -Zrustdoc-scrape-examples --features "mpi"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-version }}
toolchain: nightly
components: rustfmt

- name: Install OpenBLAS, LAPACK, OpenSSL (yum)
Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
toolchain: nightly
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -88,6 +89,7 @@ jobs:
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
toolchain: nightly
command: sdist
args: --out dist
- name: Upload sdist
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: 🧪

on:
push:
branches:
- "**"
branches: ["**"]
pull_request:
branches:
- main
branches: [main]
merge_group:

jobs:
Expand All @@ -23,14 +21,13 @@ jobs:
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
- uses: actions/checkout@v4
- name: Install LAPACK, OpenBLAS
run:
sudo apt-get install -y libopenblas-dev liblapack-dev
Expand All @@ -56,11 +53,15 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install uv
run: pip install uv "maturin>=1.7"
- name: Make virtual environment
Expand All @@ -70,7 +71,7 @@ jobs:
- name: Install python package
run: |
source .venv/bin/activate
maturin develop --release
rustup run nightly maturin develop --release
- name: Run Python tests
run: |
source .venv/bin/activate
Expand All @@ -87,10 +88,9 @@ jobs:
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
- uses: actions/checkout@v4
- name: Check that dependencies are up to date
run:
cargo upgrades
33 changes: 16 additions & 17 deletions .github/workflows/run-weekly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,46 @@ jobs:
matrix:
rust-version: ["stable", "beta", "nightly"]
mpi: [ 'mpich', 'openmpi']
f_mpi: ["", "mpi,"]
f_strict: ["", "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
- uses: actions/checkout@v4
- name: Install LAPACK, OpenBLAS
run:
sudo apt-get install -y libopenblas-dev liblapack-dev

- name: Build rust library
run: cargo build --features "strict"
run: cargo build --features "${{matrix.f_mpi}}${{matrix.f_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"
run: cargo build --features --release "${{matrix.f_mpi}}${{matrix.f_strict}}"


- name: Run unit tests
run: cargo test --features "strict"
run: cargo test --features "${{matrix.f_mpi}}${{matrix.f_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"
run: cargo test --release --features "${{matrix.f_mpi}}${{matrix.f_strict}}"
- name: Run tests
run: cargo test --examples --release --features "mpi,strict"
run: cargo test --examples --release --features "${{matrix.f_mpi}}${{matrix.f_strict}}"
- name: Test benchmarks build
run: cargo bench --no-run --features "mpi,strict"
run: cargo bench --no-run --features "${{matrix.f_mpi}}${{matrix.f_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: cargo doc --features "${{matrix.f_mpi}}${{matrix.f_strict}}" --no-deps

run-tests-python:
name: Run Python tests
Expand All @@ -65,11 +60,15 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install uv
run: pip install uv "maturin>=1.7"
- name: Make virtual environment
Expand All @@ -79,7 +78,7 @@ jobs:
- name: Install python package
run: |
source .venv/bin/activate
maturin develop --release
rustup run nightly maturin develop --release
- name: Run Python tests
run: |
source .venv/bin/activate
Expand Down

0 comments on commit df360a5

Please sign in to comment.