Skip to content

Commit cf2eacf

Browse files
committed
Add CI for 1.12.0
1 parent e79aa79 commit cf2eacf

File tree

2 files changed

+53
-25
lines changed

2 files changed

+53
-25
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,31 @@ jobs:
3535
command: ${{matrix.command}}
3636
args: "${{matrix.command == 'fmt' && '--all -- --check' || '-- -D warnings'}}"
3737

38+
brew:
39+
name: brew
40+
runs-on: macos-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
include:
45+
- {version: [email protected]}
46+
- {version: [email protected]}
47+
- {version: [email protected]}
48+
- {version: hdf5-mpi, mpi: true}
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v2
52+
with: {submodules: true}
53+
- name: Install Rust (${{matrix.rust}})
54+
uses: actions-rs/toolchain@v1
55+
with: {toolchain: stable, profile: minimal, override: true}
56+
- name: Install HDF5 (${{matrix.version}})
57+
run: brew install ${{matrix.version}}
58+
- name: Build and test all crates
59+
run: |
60+
[ "${{matrix.mpi}}" != "" ] && FEATURES=mpio
61+
cargo test -vv --features="$FEATURES"
62+
3863
conda:
3964
name: conda
4065
runs-on: ${{matrix.os}}-latest
@@ -55,6 +80,9 @@ jobs:
5580
- {os: macos, version: 1.10.5, mpi: openmpi, channel: conda-forge, rust: beta}
5681
- {os: ubuntu, version: 1.10.6, channel: anaconda, rust: stable}
5782
- {os: ubuntu, version: 1.10.6, mpi: mpich, channel: conda-forge, rust: nightly}
83+
- {os: ubuntu, version: 1.12.0, mpi: openmpi, channel: conda-forge, rust: stable}
84+
- {os: macos, version: 1.12.0, channel: conda-forge, rust: stable}
85+
- {os: windows, version: 1.12.0, channel: conda-forge, rust: stable}
5886
defaults:
5987
run:
6088
shell: bash -l {0}
@@ -102,26 +130,6 @@ jobs:
102130
- name: Build and test all crates
103131
run: cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib --exclude hdf5-derive
104132

105-
brew:
106-
name: brew
107-
runs-on: macos-latest
108-
strategy:
109-
fail-fast: false
110-
matrix:
111-
version: [1.8, '1.10']
112-
rust: [stable]
113-
steps:
114-
- name: Checkout repository
115-
uses: actions/checkout@v2
116-
with: {submodules: true}
117-
- name: Install Rust (${{matrix.rust}})
118-
uses: actions-rs/toolchain@v1
119-
with: {toolchain: '${{matrix.rust}}', profile: minimal, override: true}
120-
- name: Install HDF5 (${{matrix.version}})
121-
run: brew install hdf5@${{matrix.version}}
122-
- name: Build and test all crates
123-
run: cargo test -v
124-
125133
apt:
126134
name: apt
127135
runs-on: ubuntu-${{matrix.ubuntu}}

hdf5-sys/build.rs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,35 +300,55 @@ mod macos {
300300
}
301301
// We have to explicitly support homebrew since the HDF5 bottle isn't
302302
// packaged with pkg-config metadata.
303-
let (v18, v110) = if let Some(version) = config.version {
304-
(version.major == 1 && version.minor == 8, version.major == 1 && version.minor == 10)
303+
let (v18, v110, v112) = if let Some(version) = config.version {
304+
(
305+
version.major == 1 && version.minor == 8,
306+
version.major == 1 && version.minor == 10,
307+
version.major == 1 && version.minor == 12,
308+
)
305309
} else {
306-
(false, false)
310+
(false, false, false)
307311
};
308312
println!(
309313
"Attempting to find HDF5 via Homebrew ({})...",
310314
if v18 {
311315
"1.8.*"
312316
} else if v110 {
313317
"1.10.*"
318+
} else if v112 {
319+
"1.12.*"
314320
} else {
315321
"any version"
316322
}
317323
);
318-
if !v18 {
324+
if !(v18 || v110) {
325+
if let Some(out) = run_command("brew", &["--prefix", "[email protected]"]) {
326+
if is_root_dir(&out) {
327+
config.inc_dir = Some(PathBuf::from(out).join("include"));
328+
}
329+
}
330+
}
331+
if config.inc_dir.is_none() && !v18 {
319332
if let Some(out) = run_command("brew", &["--prefix", "[email protected]"]) {
320333
if is_root_dir(&out) {
321334
config.inc_dir = Some(PathBuf::from(out).join("include"));
322335
}
323336
}
324337
}
325-
if config.inc_dir.is_none() && !v110 {
338+
if config.inc_dir.is_none() {
326339
if let Some(out) = run_command("brew", &["--prefix", "[email protected]"]) {
327340
if is_root_dir(&out) {
328341
config.inc_dir = Some(PathBuf::from(out).join("include"));
329342
}
330343
}
331344
}
345+
if config.inc_dir.is_none() {
346+
if let Some(out) = run_command("brew", &["--prefix", "hdf5-mpi"]) {
347+
if is_root_dir(&out) {
348+
config.inc_dir = Some(PathBuf::from(out).join("include"));
349+
}
350+
}
351+
}
332352
if let Some(ref inc_dir) = config.inc_dir {
333353
println!("Found Homebrew HDF5 headers at:");
334354
println!(" {:?}", inc_dir);

0 commit comments

Comments
 (0)