From c5babd3c1f945d9388258d44d7716bff31ccb880 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Fri, 9 Jun 2023 21:38:12 +0200 Subject: [PATCH 01/10] Use 1.14.1 as bundled HDF5 --- CHANGELOG.md | 1 + hdf5-src/ext/hdf5 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7deca09f..6363f1c65 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.1. ### Fixed diff --git a/hdf5-src/ext/hdf5 b/hdf5-src/ext/hdf5 index db30c2da6..ac07382ca 160000 --- a/hdf5-src/ext/hdf5 +++ b/hdf5-src/ext/hdf5 @@ -1 +1 @@ -Subproject commit db30c2da68ece4a155e9e50c28ec16d6057509b2 +Subproject commit ac07382ca947de2b936204dc9d60ce9ac245a21f From 826f6a95cb138f5fbb874e782a37c8bd8078fe9a Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Fri, 9 Jun 2023 22:03:25 +0200 Subject: [PATCH 02/10] Allow HDF5 versions such as 1.14.1.2 --- hdf5-sys/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdf5-sys/build.rs b/hdf5-sys/build.rs index 6c040ec9e..65c000def 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())?, From 68456f05e126b62d53c4ba562bba1aedb4196d5f Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Thu, 7 Sep 2023 20:44:07 +0200 Subject: [PATCH 03/10] Bundle 1.14.2 --- CHANGELOG.md | 2 +- hdf5-src/ext/hdf5 | 2 +- hdf5-sys/build.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6363f1c65..20c5e8611 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +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.1. +- The bundled version of HDF5 in `hdf5-src` is now 1.14.2. ### Fixed diff --git a/hdf5-src/ext/hdf5 b/hdf5-src/ext/hdf5 index ac07382ca..2d926cf04 160000 --- a/hdf5-src/ext/hdf5 +++ b/hdf5-src/ext/hdf5 @@ -1 +1 @@ -Subproject commit ac07382ca947de2b936204dc9d60ce9ac245a21f +Subproject commit 2d926cf0426d2ed9403946071d9b05ac8b4dd778 diff --git a/hdf5-sys/build.rs b/hdf5-sys/build.rs index 65c000def..7e2ab4cd5 100644 --- a/hdf5-sys/build.rs +++ b/hdf5-sys/build.rs @@ -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); From b3c13b041ed61eb3f2044238ea8881b701cb1518 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Thu, 7 Sep 2023 22:31:37 +0200 Subject: [PATCH 04/10] Only include zlib when enabled --- hdf5-src/build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hdf5-src/build.rs b/hdf5-src/build.rs index 86d5d60f1..c847aa152 100644 --- a/hdf5-src/build.rs +++ b/hdf5-src/build.rs @@ -44,6 +44,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") { From 842fbd93545c2f4369d5181c4869de1151b822f7 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Sun, 5 Nov 2023 12:21:32 +0100 Subject: [PATCH 05/10] Use hdf5 1.14.3 --- CHANGELOG.md | 2 +- hdf5-src/ext/hdf5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20c5e8611..c16710f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +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.2. +- The bundled version of HDF5 in `hdf5-src` is now 1.14.3. ### Fixed diff --git a/hdf5-src/ext/hdf5 b/hdf5-src/ext/hdf5 index 2d926cf04..8b5cac6bc 160000 --- a/hdf5-src/ext/hdf5 +++ b/hdf5-src/ext/hdf5 @@ -1 +1 @@ -Subproject commit 2d926cf0426d2ed9403946071d9b05ac8b4dd778 +Subproject commit 8b5cac6bc498546efa5639f99bb7dbbc1a2d5d90 From a11981292e3d01e3cea97c660d5329301256d975 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Sun, 5 Nov 2023 12:37:05 +0100 Subject: [PATCH 06/10] Verbose build (static) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b5552ee9..ac9bdc8a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,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' From 503dcbfc5b6d0d91bf1be1b0e445f2c1b071004e Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Sun, 5 Nov 2023 12:58:50 +0100 Subject: [PATCH 07/10] Link shlwapi on windows --- hdf5-sys/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hdf5-sys/build.rs b/hdf5-sys/build.rs index 7e2ab4cd5..a27c5dfaa 100644 --- a/hdf5-sys/build.rs +++ b/hdf5-sys/build.rs @@ -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) { From 9a0532fe9ed3d82ad195f591a33231be4679a4f0 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Thu, 28 Mar 2024 15:20:58 +0100 Subject: [PATCH 08/10] Ignore testing on failing platforms --- .github/workflows/ci.yml | 84 ++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac9bdc8a7..ef6a7a523 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,7 +140,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 @@ -240,31 +240,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 +282,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 From 1573f34b89bc6896d039cff1ded94873316f7d4f Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Thu, 28 Mar 2024 15:22:54 +0100 Subject: [PATCH 09/10] Remove brew hdf5 1.8 (deprecated) CI run --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef6a7a523..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} From 6dee47951d08e398264836812f51eb32f902f3b8 Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Sun, 12 May 2024 09:43:08 +0200 Subject: [PATCH 10/10] Update to 1.14.3 --- hdf5-src/build.rs | 2 ++ hdf5-src/ext/hdf5 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hdf5-src/build.rs b/hdf5-src/build.rs index c847aa152..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"); } diff --git a/hdf5-src/ext/hdf5 b/hdf5-src/ext/hdf5 index 8b5cac6bc..f0ecc8bc2 160000 --- a/hdf5-src/ext/hdf5 +++ b/hdf5-src/ext/hdf5 @@ -1 +1 @@ -Subproject commit 8b5cac6bc498546efa5639f99bb7dbbc1a2d5d90 +Subproject commit f0ecc8bc26972119fb31b1cd548ea23fff4a3227