diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3f16d7a..09f9488 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,11 +32,13 @@ jobs: - stable os: - ubuntu-latest - - macos-13 - #- windows-latest + - macos-latest + - windows-latest include: - toolchain: beta os: ubuntu-latest + - toolchain: nightly + os: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -50,31 +52,35 @@ jobs: run: rustup default ${{ matrix.toolchain }} && rustup update ${{ matrix.toolchain }} --no-self-update && rustup component add clippy - name: Rust version run: rustc -Vv - - name: Install LLVM and Clang (Ubuntu) + - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v2 - if : matrix.os == 'ubuntu-latest' + if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' || matrix.os == 'macos-latest' with: - version: "14.0" - - name: Install LLVM and Clang (macOS) - if : matrix.os == 'macos-13' - run: | - brew install llvm@14 - echo "LLVM_SYS_140_PREFIX=/usr/local/opt/llvm@14" >> $GITHUB_ENV - echo "LLVM_DIR=/usr/local/opt/llvm@14" >> $GITHUB_ENV - - name: Set features variable and install dependencies + version: "16.0" + - name: Set features variable and install dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | - echo "ADDITIONAL_FEATURES_FLAGS=--features sundials --features suitesparse" >> $GITHUB_ENV + echo "ADDITIONAL_FEATURES_FLAGS=--features diffsl-llvm16 --features sundials --features suitesparse" >> $GITHUB_ENV sudo apt-get update sudo apt-get install -y libsuitesparse-dev libsundials-dev + - name: Set features variable and install dependencies (macOS) + if: matrix.os == 'macos-13' || matrix.os == 'macos-latest' + run: | + echo "ADDITIONAL_FEATURES_FLAGS=--features diffsl-llvm16" >> $GITHUB_ENV + - name: Set features variable and install dependencies (Windows) + if: matrix.os == 'windows-latest' + run: | + echo "ADDITIONAL_FEATURES_FLAGS=--features diffsl" >> $GITHUB_ENV - name: Run tests - default features run: cargo test --verbose - name: Run tests - all features - run: cargo test --verbose --features diffsl-llvm14 ${{ env.ADDITIONAL_FEATURES_FLAGS || '' }} + run: cargo test --verbose ${{ env.ADDITIONAL_FEATURES_FLAGS || '' }} - name: Clippy - all features - run: cargo clippy --verbose --features diffsl-llvm14 ${{ env.ADDITIONAL_FEATURES_FLAGS || ''}} + if : matrix.os == 'ubuntu-latest' && matrix.toolchain == 'nightly' + run: cargo clippy --verbose ${{ env.ADDITIONAL_FEATURES_FLAGS || ''}} - name: Docs - all features - run: cargo rustdoc --features diffsl-llvm14 ${{ env.ADDITIONAL_FEATURES_FLAGS || ''}} + if : matrix.os == 'ubuntu-latest' && matrix.toolchain == 'nightly' + run: cargo rustdoc ${{ env.ADDITIONAL_FEATURES_FLAGS || ''}} book: runs-on: ubuntu-latest steps: diff --git a/Cargo.toml b/Cargo.toml index cfda6c7..4dfca30 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,18 +18,17 @@ sundials = ["suitesparse_sys", "bindgen", "cc"] suitesparse = ["suitesparse_sys"] diffsl = ["dep:diffsl"] diffsl-llvm = [] -diffsl-llvm13 = ["diffsl/llvm13-0", "diffsl", "diffsl-llvm"] -diffsl-llvm14 = ["diffsl/llvm14-0", "diffsl", "diffsl-llvm"] diffsl-llvm15 = ["diffsl/llvm15-0", "diffsl", "diffsl-llvm"] diffsl-llvm16 = ["diffsl/llvm16-0", "diffsl", "diffsl-llvm"] diffsl-llvm17 = ["diffsl/llvm17-0", "diffsl", "diffsl-llvm"] +diffsl-llvm18 = ["diffsl/llvm18-0", "diffsl", "diffsl-llvm"] [dependencies] nalgebra = "0.33.2" nalgebra-sparse = { version = "0.10", features = ["io"] } num-traits = "0.2.17" -serde = { version = "1.0.215", features = ["derive"] } -diffsl = { package = "diffsl", version = "0.2.5", optional = true } +serde = { version = "1.0.216", features = ["derive"] } +diffsl = { package = "diffsl", version = "0.2.6", optional = true } petgraph = "0.6.4" faer = "0.19.4" suitesparse_sys = { version = "0.1.3", optional = true }