From df360a5a58bf221c4446217a3953c9dec8c18bf3 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Tue, 3 Dec 2024 09:24:52 +0000 Subject: [PATCH] use nightly on ci --- .github/workflows/docs.yml | 4 ++-- .github/workflows/release.yml | 4 +++- .github/workflows/run-tests.yml | 20 ++++++++-------- .github/workflows/run-weekly-tests.yml | 33 +++++++++++++------------- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 14e5008c..8714b00d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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" @@ -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" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2780c79..7edc9a4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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) @@ -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: @@ -88,6 +89,7 @@ jobs: - name: Build sdist uses: PyO3/maturin-action@v1 with: + toolchain: nightly command: sdist args: --out dist - name: Upload sdist diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 35f87e8b..68ad3669 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,11 +2,9 @@ name: 🧪 on: push: - branches: - - "**" + branches: ["**"] pull_request: - branches: - - main + branches: [main] merge_group: jobs: @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/run-weekly-tests.yml b/.github/workflows/run-weekly-tests.yml index 0d910fd8..1805f4f0 100644 --- a/.github/workflows/run-weekly-tests.yml +++ b/.github/workflows/run-weekly-tests.yml @@ -12,43 +12,38 @@ 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 @@ -56,7 +51,7 @@ jobs: ./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 @@ -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 @@ -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