Skip to content

Commit

Permalink
Merge pull request #134 from Dirreke/fix-ci
Browse files Browse the repository at this point in the history
Fix MSRV
  • Loading branch information
Dirreke authored Dec 16, 2024
2 parents e309bd5 + 673e6d7 commit 6b05edb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 14 deletions.
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

0 comments on commit 6b05edb

Please sign in to comment.