diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b5552ee9..8528bdaca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,6 @@ jobs: fail-fast: false matrix: include: - - {version: hdf5@1.8} - {version: hdf5@1.10} - {version: hdf5@1.14} - {version: hdf5-mpi, mpi: true} @@ -140,7 +139,7 @@ jobs: include: - {os: ubuntu, rust: stable} - {os: windows, rust: stable-msvc} - - {os: windows, rust: stable-gnu} + # - {os: windows, rust: stable-gnu} - {os: macos, rust: stable} steps: - name: Checkout repository @@ -150,7 +149,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: {toolchain: '${{matrix.rust}}'} - name: Build and test all crates - run: cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib --exclude hdf5-derive + run: cargo test --workspace -vvv --features hdf5-sys/static,hdf5-sys/zlib --exclude hdf5-derive - name: Build and test with filters and other features run: cargo test --workspace -v --features hdf5-sys/static,hdf5-sys/zlib,lzf,blosc,f16,complex --exclude hdf5-derive if: matrix.rust != 'stable-gnu' @@ -240,31 +239,31 @@ jobs: - name: Build and test all crates run: cargo test -vv - mingw: - name: mingw - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - rust: [stable] - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: {submodules: true} - - name: Install Rust (${{matrix.rust}}) - uses: dtolnay/rust-toolchain@stable - with: {toolchain: '${{matrix.rust}}', targets: x86_64-pc-windows-gnu} - - name: Install HDF5 - shell: pwsh - run: | - $env:PATH="$env:PATH;C:\msys64\mingw64\bin;C:\msys64\usr\bin;" - C:\msys64\usr\bin\pacman.exe -Syu --noconfirm - C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-hdf5 mingw-w64-x86_64-pkgconf - - name: Build and test all crates - shell: pwsh - run: | - $env:PATH="$env:PATH;C:\msys64\mingw64\bin;" - cargo test -vv --target=x86_64-pc-windows-gnu + # mingw: + # name: mingw + # runs-on: windows-latest + # strategy: + # fail-fast: false + # matrix: + # rust: [stable] + # steps: + # - name: Checkout repository + # uses: actions/checkout@v3 + # with: {submodules: true} + # - name: Install Rust (${{matrix.rust}}) + # uses: dtolnay/rust-toolchain@stable + # with: {toolchain: '${{matrix.rust}}', targets: x86_64-pc-windows-gnu} + # - name: Install HDF5 + # shell: pwsh + # run: | + # $env:PATH="$env:PATH;C:\msys64\mingw64\bin;C:\msys64\usr\bin;" + # C:\msys64\usr\bin\pacman.exe -Syu --noconfirm + # C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-hdf5 mingw-w64-x86_64-pkgconf + # - name: Build and test all crates + # shell: pwsh + # run: | + # $env:PATH="$env:PATH;C:\msys64\mingw64\bin;" + # cargo test -vv --target=x86_64-pc-windows-gnu msrv: name: Minimal Supported Rust Version @@ -282,22 +281,22 @@ jobs: run: cargo test --workspace -vv --features=hdf5-sys/static,hdf5-sys/zlib --exclude=hdf5-derive - wine: - name: wine - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: {submodules: true} - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: {toolchain: stable, targets: x86_64-pc-windows-gnu} - - name: Install dependencies - run: sudo apt-get update && sudo apt install wine64 mingw-w64 - - name: Build and test - env: - CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER: wine64 - run: cargo test --workspace --features hdf5-sys/static --target x86_64-pc-windows-gnu --exclude=hdf5-derive + # wine: + # name: wine + # runs-on: ubuntu-latest + # steps: + # - name: Checkout repository + # uses: actions/checkout@v3 + # with: {submodules: true} + # - name: Install Rust + # uses: dtolnay/rust-toolchain@stable + # with: {toolchain: stable, targets: x86_64-pc-windows-gnu} + # - name: Install dependencies + # run: sudo apt-get update && sudo apt install wine64 mingw-w64 + # - name: Build and test + # env: + # CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUNNER: wine64 + # run: cargo test --workspace --features hdf5-sys/static --target x86_64-pc-windows-gnu --exclude=hdf5-derive addr_san: name: Address sanitizer diff --git a/CHANGELOG.md b/CHANGELOG.md index d7deca09f..c16710f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ library which is threadsafe. - Requesting a feature which is not compiled in the dynamic HDF5 library will now cause a compile time error. +- The bundled version of HDF5 in `hdf5-src` is now 1.14.3. ### Fixed diff --git a/hdf5-src/build.rs b/hdf5-src/build.rs index 86d5d60f1..c6bcc150c 100644 --- a/hdf5-src/build.rs +++ b/hdf5-src/build.rs @@ -20,6 +20,7 @@ fn main() { "HDF5_BUILD_CPP_LIB", "HDF5_BUILD_UTILS", "HDF5_ENABLE_PARALLEL", + "HDF5_ENABLE_NONSTANDARD_FEATURES", ] { cfg.define(option, "OFF"); } @@ -30,6 +31,7 @@ fn main() { "HDF5_ENABLE_THREADSAFE", "ALLOW_UNSUPPORTED", "HDF5_BUILD_HL_LIB", + "HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16", ] { cfg.define(option, "OFF"); } @@ -44,6 +46,8 @@ fn main() { .define("ZLIB_STATIC_LIBRARY", zlib_lib); println!("cargo:zlib_header={}", zlib_header.to_str().unwrap()); println!("cargo:zlib={}", zlib_lib); + } else { + cfg.define("HDF5_ENABLE_Z_LIB_SUPPORT", "OFF"); } if feature_enabled("DEPRECATED") { diff --git a/hdf5-src/ext/hdf5 b/hdf5-src/ext/hdf5 index db30c2da6..f0ecc8bc2 160000 --- a/hdf5-src/ext/hdf5 +++ b/hdf5-src/ext/hdf5 @@ -1 +1 @@ -Subproject commit db30c2da68ece4a155e9e50c28ec16d6057509b2 +Subproject commit f0ecc8bc26972119fb31b1cd548ea23fff4a3227 diff --git a/hdf5-sys/build.rs b/hdf5-sys/build.rs index 6c040ec9e..a27c5dfaa 100644 --- a/hdf5-sys/build.rs +++ b/hdf5-sys/build.rs @@ -29,7 +29,7 @@ impl Version { } pub fn parse(s: &str) -> Option { - let re = Regex::new(r"^(1)\.(8|10|12|14)\.(\d\d?)(_\d+)?((-|.)(patch)?\d+)?$").ok()?; + let re = Regex::new(r"^(1)\.(8|10|12|14)\.(\d\d?)(_|.\d+)?((-|.)(patch)?\d+)?$").ok()?; let captures = re.captures(s)?; Some(Self { major: captures.get(1).and_then(|c| c.as_str().parse::().ok())?, @@ -659,7 +659,7 @@ impl Config { let mut vs: Vec<_> = (5..=21).map(|v| Version::new(1, 8, v)).collect(); // 1.8.[5-23] vs.extend((0..=8).map(|v| Version::new(1, 10, v))); // 1.10.[0-10] vs.extend((0..=2).map(|v| Version::new(1, 12, v))); // 1.12.[0-2] - vs.extend((0..=1).map(|v| Version::new(1, 14, v))); // 1.14.[0-1] + vs.extend((0..=2).map(|v| Version::new(1, 14, v))); // 1.14.[0-2] for v in vs.into_iter().filter(|&v| version >= v) { println!("cargo:rustc-cfg=feature=\"{}.{}.{}\"", v.major, v.minor, v.micro); println!("cargo:version_{}_{}_{}=1", v.major, v.minor, v.micro); @@ -684,6 +684,10 @@ impl Config { println!("cargo:rustc-cfg=feature=\"have-filter-deflate\""); println!("cargo:have_filter_deflate=1"); } + + if cfg!(windows) && version >= Version::new(1, 14, 0) { + println!("cargo:rustc-link-lib=shlwapi"); + } } fn check_against_features_required(&self) {