Skip to content

Commit 6b05edb

Browse files
authored
Merge pull request #134 from Dirreke/fix-ci
Fix MSRV
2 parents e309bd5 + 673e6d7 commit 6b05edb

File tree

6 files changed

+31
-14
lines changed

6 files changed

+31
-14
lines changed

.github/workflows/openblas-build.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
- build_no_lapacke
2323
- build_no_shared
2424
- build_openmp
25-
container:
26-
image: rust
2725
env:
2826
RUST_BACKTRACE: 1
2927
steps:
@@ -32,8 +30,8 @@ jobs:
3230
submodules: "recursive"
3331
- name: Install gfortran by apt
3432
run: |
35-
apt update
36-
apt install -y gfortran
33+
sudo apt update
34+
sudo apt install -y gfortran
3735
- name: Common minor tests
3836
run: cargo test --manifest-path=openblas-build/Cargo.toml
3937
- name: Build test

.github/workflows/openblas-src.yml

+19-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919

2020
jobs:
2121
windows-msvc:
22-
runs-on: windows-2019
22+
runs-on: windows-2022
2323
strategy:
2424
fail-fast: false
2525
matrix:
@@ -82,8 +82,6 @@ jobs:
8282

8383
x86_64-unknown-linux-gnu:
8484
runs-on: ubuntu-22.04
85-
container:
86-
image: rust
8785
strategy:
8886
fail-fast: false
8987
matrix:
@@ -97,19 +95,19 @@ jobs:
9795
submodules: "recursive"
9896
- name: Install gfortran by apt
9997
run: |
100-
apt update
101-
apt install -y gfortran
98+
sudo apt update
99+
sudo apt install -y gfortran
102100
- name: Install OpenBLAS by apt
103101
run: |
104-
apt update
105-
apt install -y libopenblas-dev
102+
sudo apt update
103+
sudo apt install -y libopenblas-dev
106104
if: ${{ contains(matrix.feature, 'system') }}
107105
- name: Test features=${{ matrix.feature }}
108106
run: cargo test --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml
109107

110108
cross:
111109
name: ${{matrix.target}} (${{matrix.feature}})
112-
runs-on: ubuntu-latest
110+
runs-on: ubuntu-22.04
113111
strategy:
114112
fail-fast: false
115113
matrix:
@@ -132,3 +130,16 @@ jobs:
132130
tool: cross
133131
- name: Test features=${{ matrix.feature }}
134132
run: cross test --target ${{matrix.target}} --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml
133+
msrv-test:
134+
name: MSRV test
135+
runs-on: ubuntu-22.04
136+
steps:
137+
- uses: actions/checkout@v4
138+
- name: Install OpenBLAS by apt
139+
run: |
140+
sudo apt update
141+
sudo apt install -y libopenblas-dev
142+
- name: Install toolchain
143+
uses: dtolnay/[email protected]
144+
- name: cargo test
145+
run: cargo check --manifest-path=openblas-src/Cargo.toml --features=system

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ members = [
33
"openblas-src",
44
"openblas-build",
55
]
6+
7+
[workspace.package]
8+
rust-version = "1.71.1"

openblas-build/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ homepage = "https://github.com/blas-lapack-rs/openblas-src"
1010
repository = "https://github.com/blas-lapack-rs/openblas-src"
1111
readme = "../README.md"
1212
exclude = ["test_build/"]
13+
rust-version = "1.71.1"
1314

1415
[dependencies]
1516
anyhow = "1.0.68"
1617
cc = "1.0"
1718
flate2 = "1.0.25"
1819
tar = "0.4.38"
1920
thiserror = "2.0"
20-
ureq = { version = "2.5.0", default-features = false, features = [
21+
ureq = { version = "2.8", default-features = false, features = [
2122
"native-certs",
2223
"native-tls",
2324
"gzip",

openblas-src/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ categories = ["science"]
2222
keywords = ["linear-algebra"]
2323
build = "build.rs"
2424
links = "openblas"
25+
rust-version = "1.71.1"
2526

2627
[features]
2728
default = ["cblas", "lapacke"]

openblas-src/build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ fn build() {
157157
cfg.compilers.ranlib = env::var("OPENBLAS_RANLIB").ok();
158158

159159
let output = if feature_enabled("cache") {
160-
use std::hash::*;
160+
use std::{
161+
collections::hash_map::DefaultHasher,
162+
hash::{Hash, Hasher},
163+
};
161164
// Build OpenBLAS on user's data directory.
162165
// See https://docs.rs/dirs/5.0.1/dirs/fn.data_dir.html
163166
//

0 commit comments

Comments
 (0)