Skip to content

Set MSRV to 1.71.1 and add CI to test MSRV #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/openblas-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
- build_no_lapacke
- build_no_shared
- build_openmp
container:
image: rust
env:
RUST_BACKTRACE: 1
steps:
Expand All @@ -32,8 +30,8 @@ jobs:
submodules: "recursive"
- name: Install gfortran by apt
run: |
apt update
apt install -y gfortran
sudo apt update
sudo apt install -y gfortran
- name: Common minor tests
run: cargo test --manifest-path=openblas-build/Cargo.toml
- name: Build test
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/openblas-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

jobs:
windows-msvc:
runs-on: windows-2019
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -82,8 +82,6 @@ jobs:

x86_64-unknown-linux-gnu:
runs-on: ubuntu-22.04
container:
image: rust
strategy:
fail-fast: false
matrix:
Expand All @@ -97,19 +95,19 @@ jobs:
submodules: "recursive"
- name: Install gfortran by apt
run: |
apt update
apt install -y gfortran
sudo apt update
sudo apt install -y gfortran
- name: Install OpenBLAS by apt
run: |
apt update
apt install -y libopenblas-dev
sudo apt update
sudo apt install -y libopenblas-dev
if: ${{ contains(matrix.feature, 'system') }}
- name: Test features=${{ matrix.feature }}
run: cargo test --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml

cross:
name: ${{matrix.target}} (${{matrix.feature}})
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand All @@ -132,3 +130,16 @@ jobs:
tool: cross
- name: Test features=${{ matrix.feature }}
run: cross test --target ${{matrix.target}} --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml
msrv-test:
name: MSRV test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install OpenBLAS by apt
run: |
sudo apt update
sudo apt install -y libopenblas-dev
- name: Install toolchain
uses: dtolnay/[email protected]
- name: cargo test
run: cargo check --manifest-path=openblas-src/Cargo.toml --features=system
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ members = [
"openblas-src",
"openblas-build",
]

[workspace.package]
rust-version = "1.71.1"
3 changes: 2 additions & 1 deletion openblas-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ homepage = "https://github.com/blas-lapack-rs/openblas-src"
repository = "https://github.com/blas-lapack-rs/openblas-src"
readme = "../README.md"
exclude = ["test_build/"]
rust-version = "1.71.1"

[dependencies]
anyhow = "1.0.68"
cc = "1.0"
flate2 = "1.0.25"
tar = "0.4.38"
thiserror = "2.0"
ureq = { version = "2.5.0", default-features = false, features = [
ureq = { version = "2.8", default-features = false, features = [
"native-certs",
"native-tls",
"gzip",
Expand Down
1 change: 1 addition & 0 deletions openblas-src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ categories = ["science"]
keywords = ["linear-algebra"]
build = "build.rs"
links = "openblas"
rust-version = "1.71.1"

[features]
default = ["cblas", "lapacke"]
Expand Down
5 changes: 4 additions & 1 deletion openblas-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ fn build() {
cfg.compilers.ranlib = env::var("OPENBLAS_RANLIB").ok();

let output = if feature_enabled("cache") {
use std::hash::*;
use std::{
collections::hash_map::DefaultHasher,
hash::{Hash, Hasher},
};
// Build OpenBLAS on user's data directory.
// See https://docs.rs/dirs/5.0.1/dirs/fn.data_dir.html
//
Expand Down