From 568d59deb46aa7e7b7825b7ffdb4cf8f29f22118 Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:47:41 -0600 Subject: [PATCH 1/5] Release libblosc2-native jar version 2.23.1.0 --- native-compression/libblosc2-native/build.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native-compression/libblosc2-native/build.gradle.kts b/native-compression/libblosc2-native/build.gradle.kts index 149c32827e..2af3b8fc90 100644 --- a/native-compression/libblosc2-native/build.gradle.kts +++ b/native-compression/libblosc2-native/build.gradle.kts @@ -14,7 +14,7 @@ plugins { group = "edu.ucar.unidata" -var bloscVersion = "2.22.0" +var bloscVersion = "2.23.1" var build = "0" version = "${bloscVersion}.${build}" @@ -25,10 +25,10 @@ project.extra["project.title"] = "Native libraries for libblosc2." // zip file produced by GitHub workflow val libblosc2Native = - "libblosc2-native-${bloscVersion}-b4a818caa60bbf90bc92ec51ffd01ce3f293c8a4.zip" + "libblosc2-native-${bloscVersion}-c8d21a734aa58320135f5dfdc36e3d61e316e074.zip" // sha256 checksum from GitHub workflow output -val expectedChecksum = "895226b29a314c0beae92de66a181b66833873e8c3a8a501d0b12193bde30610" +val expectedChecksum = "6cfb464e7bc666509644d3d419ec6d5a43831178cbf9105d2ecb2dbc97ffdf88" val resourceZip = file("$rootDir/project-files/native/libblosc2/$libblosc2Native") val fetchNativeResources = From 3300670abb6229c0a5a2f84a001a4c9bc2b2383b Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:51:22 -0600 Subject: [PATCH 2/5] Make sure to test libblosc2 using GitHub actions on changes to native or jna subprojects --- .github/workflows/test-native-compression.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-native-compression.yml b/.github/workflows/test-native-compression.yml index 7ce8f63f73..7c448e32a1 100644 --- a/.github/workflows/test-native-compression.yml +++ b/.github/workflows/test-native-compression.yml @@ -4,7 +4,8 @@ on: paths: - 'native-compression/libaec-jna/**' - 'native-compression/libaec-native/**' - - 'native-compression/build.gradle' + - 'native-compression/libblosc2-jna/**' + - 'native-compression/libblosc2-native/**' - '.github/workflows/test-native-compression.yml' permissions: From 613bac54a9252426dad0bb361c151965b423df56 Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:05:03 -0600 Subject: [PATCH 3/5] test aec and blosc2 separately --- ...on.yml => test-native-compression-aec.yml} | 6 +- .../test-native-compression-blosc2.yml | 63 +++++++++++++++++++ 2 files changed, 65 insertions(+), 4 deletions(-) rename .github/workflows/{test-native-compression.yml => test-native-compression-aec.yml} (90%) create mode 100644 .github/workflows/test-native-compression-blosc2.yml diff --git a/.github/workflows/test-native-compression.yml b/.github/workflows/test-native-compression-aec.yml similarity index 90% rename from .github/workflows/test-native-compression.yml rename to .github/workflows/test-native-compression-aec.yml index 7c448e32a1..ee5393d5c6 100644 --- a/.github/workflows/test-native-compression.yml +++ b/.github/workflows/test-native-compression-aec.yml @@ -4,9 +4,7 @@ on: paths: - 'native-compression/libaec-jna/**' - 'native-compression/libaec-native/**' - - 'native-compression/libblosc2-jna/**' - - 'native-compression/libblosc2-native/**' - - '.github/workflows/test-native-compression.yml' + - '.github/workflows/test-native-compression-aec.yml' permissions: contents: read @@ -23,7 +21,7 @@ jobs: macos-15, macos-15-intel ] - name: netCDF-Java Native Compression Tests + name: netCDF-Java Native Compression Tests (aec) runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/test-native-compression-blosc2.yml b/.github/workflows/test-native-compression-blosc2.yml new file mode 100644 index 0000000000..d5d3ec26b3 --- /dev/null +++ b/.github/workflows/test-native-compression-blosc2.yml @@ -0,0 +1,63 @@ +on: + workflow_dispatch: + pull_request: + paths: + - 'native-compression/libblosc2-jna/**' + - 'native-compression/libblosc2-native/**' + - 'test-native-compression-blosc2.yml' + +permissions: + contents: read + +jobs: + tests: + strategy: + matrix: + os: [ + ubuntu-24.04, + ubuntu-24.04-arm, + windows-2022, + macos-14, + macos-15, + macos-15-intel + ] + name: netCDF-Java Native Compression Tests (blosc2) + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v6 + - name: Setup JDK 8, 17 + if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15-intel' }} + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: | + 8 + 17 + - name: Setup JDK 21 + if: ${{ matrix.os != 'ubuntu-24.04' && matrix.os != 'macos-15-intel' }} + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + - name: Cache Gradle packages + uses: actions/cache@v5 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Run libblosc2 JNA tests + if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15-intel' }} + run: ./gradlew -Dorg.gradle.java.installations.auto-detect=true clean :libblosc2-jna:test + env: + JDK8: /usr/thredds-test-environment/temurin8 + - name: Run libblosc2 JNA tests (JDK 21 tests) + if: ${{ matrix.os != 'ubuntu-24.04' && matrix.os != 'macos-15-intel' }} + run: ./gradlew clean :libblosc2-jna:test21 + - uses: actions/upload-artifact@v6 + if: failure() + with: + name: NativeCompression_JUnit_Results_${{ github.sha }}_-${{ matrix.os }} + path: native-compression/libblosc2-jna/build/reports/tests From 0abcbf2e2d0fa6ecffa9da961d7d7cdb84095736 Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:21:16 -0600 Subject: [PATCH 4/5] Update docs for native libs --- docs/src/site/_config.yml | 2 +- docs/src/site/pages/netcdfJava/Upgrade.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/site/_config.yml b/docs/src/site/_config.yml index 408d1ffb17..73af090d85 100644 --- a/docs/src/site/_config.yml +++ b/docs/src/site/_config.yml @@ -79,4 +79,4 @@ base_docs_url: https://docs.unidata.ucar.edu/netcdf-java/ java_version_build: 17 java_version_runtime: 8 libaec_version: 1.1.3.0 -cblosc2_version: 2.22.0.0 +cblosc2_version: 2.23.1.0 diff --git a/docs/src/site/pages/netcdfJava/Upgrade.md b/docs/src/site/pages/netcdfJava/Upgrade.md index b3c381d64e..d28e99b1e9 100644 --- a/docs/src/site/pages/netcdfJava/Upgrade.md +++ b/docs/src/site/pages/netcdfJava/Upgrade.md @@ -34,7 +34,7 @@ Note: we are looking to update the minimum version of the JVM we support for the Please consider taking a moment to participate in the [poll on GitHub](https://github.com/Unidata/netcdf-java/discussions/1468){:target="_blank"}. The 5.10.0 release adds support for reading blosc compressed data using the C-Blosc2 native library. -The new artifact for JNA support is `edu.ucar.unidata:libblosc2-jna` (the current version is `2.22.0.0`). +The new artifact for JNA support is `edu.ucar.unidata:libblosc2-jna` (the current version is `{{ site.cblosc2_version }}`). ### Native jar group name changes From 79260aa54dc372460806379e9dfb66605209610d Mon Sep 17 00:00:00 2001 From: Sean Arms <67096+lesserwhirls@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:51:16 -0600 Subject: [PATCH 5/5] Update native library dev documentation --- native-compression/README | 10 ---------- native-compression/README.md | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) delete mode 100644 native-compression/README create mode 100644 native-compression/README.md diff --git a/native-compression/README b/native-compression/README deleted file mode 100644 index eeb47ef84e..0000000000 --- a/native-compression/README +++ /dev/null @@ -1,10 +0,0 @@ -# Publishing Native Jars - -The native jars are versioned based on the native library version (plus a build number). -These jars are also published separate to the rest of the project jars. -To publish a native jar, you must set the `` system property when running the gradle publish command. -For example, to publish the libblosc2-native jar, run: - -``` -./gradlew -D"unidata.native.publish=true" :libblosc2-native:publish -``` \ No newline at end of file diff --git a/native-compression/README.md b/native-compression/README.md new file mode 100644 index 0000000000..8820e7cf41 --- /dev/null +++ b/native-compression/README.md @@ -0,0 +1,24 @@ +# Updating Native Jars + +Updating a native jar requires at least two commits. +The first commit updates a GitHub workflow that generates the native libraries using GitHub Actions; the second will update the `*-native` subproject build to use the new native libraries. +1. The `native-compression/*-native` subprojects depend on a .zip file and checksum file that contain the native libraries, which are hosted on Unidata servers. +These files are generated on GitHub using the `.github/worlflows/lib*.yml`. +To update a native jar, you first update the associated workflow. +Once the workflow is on the main branch (currently `maint-5.x`), manually trigger the workflow on GitHub. +The workflow output will provide a zip file and sha-256 checksum value. +2. Copy the zip file generated by the workflow in step 1 to the Unidata server and generate a checksum for the file. +Update the `native-compression/lib*-native/build.gradle.kts` file with the new version information and checksum value from the GitHub output. +If everything looks good, and the draft PR with these changes passes, update the documentation to reflect the latest version of the native jar (see `docs/src/site/_config.yml`). +Once these changes are merged, the final step is to publish a new native jar. + +## Publishing Native Jars + +The native jars are versioned based on the native library version (plus a build number). +These jars are also published separate to the rest of the project jars. +To publish a native jar, you must set the `unidata.native.publish=true` system property when running the Gradle publish command. +For example, to publish the libblosc2-native jar, run: + +``` +./gradlew -D"unidata.native.publish=true" :libblosc2-native:publish +```