Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
07faf65
add native macOS application menu integration
brtnfld Jan 14, 2026
1135332
clang-format
brtnfld Jan 14, 2026
3e3a520
clang-format
brtnfld Jan 14, 2026
fb6f873
clang format
brtnfld Jan 14, 2026
85707ee
Use latest HDF5 snapshot with dynamic version detection in quality wo…
brtnfld Jan 14, 2026
b0842af
Fix HDF library extraction in CI workflows
brtnfld Jan 14, 2026
16dfb60
removed hardcoded versions
brtnfld Jan 14, 2026
181d0e9
removed hardcoded versions
brtnfld Jan 14, 2026
a0c244c
removed hardcoded versions
brtnfld Jan 14, 2026
b08e597
Merge branch 'master' into macmenu
brtnfld Jan 14, 2026
04f480f
removed hardcoded versions
brtnfld Jan 14, 2026
958c3e8
added error checks
brtnfld Jan 14, 2026
d18b10a
updated all workflow files to use PATTERN variables where the pattern…
brtnfld Jan 14, 2026
8762ab1
Acquire SWT as maven dependency
mattjala Jan 15, 2026
de6b342
Update run scripts to be version-independent
mattjala Jan 15, 2026
a7b118a
Setup dependency JARs earlier in maven lifecycle
mattjala Jan 15, 2026
4da2082
Update build guide
mattjala Jan 15, 2026
73c15c2
Update windows run from source build script
mattjala Jan 15, 2026
d722a69
Correct cross-platform build guide
mattjala Jan 15, 2026
256bd96
Revert change of lifecycle for JAR installation
mattjala Jan 15, 2026
16291c5
Resolve 404 errors in deb/rpm tests
mattjala Jan 15, 2026
c457e5f
updates to menu fix
brtnfld Jan 15, 2026
8dcbdca
clang-format
brtnfld Jan 15, 2026
c8ea261
clang-format
brtnfld Jan 15, 2026
46e4634
clang-format
brtnfld Jan 15, 2026
1a6f19e
addressed delay in settings menu
brtnfld Jan 16, 2026
d78b66d
Merge branch 'master' into macmenu
brtnfld Jan 16, 2026
cba59eb
Merge branch 'master' into macmenu
brtnfld Jan 16, 2026
48abddf
New composite action to eliminate DRY violation
brtnfld Jan 16, 2026
342cb86
the JAR installation duplication was already removed
brtnfld Jan 16, 2026
1d945b0
fixed naming convention
brtnfld Jan 16, 2026
15d7141
clang-format
brtnfld Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in the repo.
* @lrknox @byrnHDF @jhendersonHDF
* @lrknox @mattjala @jhendersonHDF

# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
Expand Down
279 changes: 279 additions & 0 deletions .github/actions/setup-hdf-libraries/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
name: Setup HDF Libraries
description: Download, extract, and install HDF4/HDF5 libraries with Maven integration

inputs:
hdf4-version:
description: 'HDF4 version to use (leave empty for latest release)'
required: false
default: ''
hdf5-version:
description: 'HDF5 version to use'
required: true
default: '2.0.0'
os-pattern:
description: 'OS-specific archive pattern (e.g., *-ubuntu-*_gcc.tar.gz, hdf-*-macos14_clang.tar.gz)'
required: true
archive-extension:
description: 'Archive extension (tar.gz or zip)'
required: false
default: 'tar.gz'
inner-archive-os:
description: 'Inner archive OS name (Linux or Darwin)'
required: false
default: 'Linux'

outputs:
hdf4-lib-path:
description: 'Path to HDF4 libraries'
value: ${{ steps.set-paths.outputs.hdf4-lib-path }}
hdf5-lib-path:
description: 'Path to HDF5 libraries'
value: ${{ steps.set-paths.outputs.hdf5-lib-path }}
hdf4-version:
description: 'Resolved HDF4 version'
value: ${{ steps.resolve-hdf4.outputs.version }}
hdf5-version:
description: 'Resolved HDF5 version'
value: ${{ inputs.hdf5-version }}

runs:
using: composite
steps:
- name: Resolve HDF4 Version
id: resolve-hdf4
shell: bash
run: |
if [ -n "${{ inputs.hdf4-version }}" ]; then
HDF4_VERSION="${{ inputs.hdf4-version }}"
RELEASE_TAG="hdf${HDF4_VERSION}"
else
# Get latest non-snapshot release tag using JSON output for reliable parsing
RELEASE_TAG=$(gh release list --repo HDFGroup/hdf4 --limit 10 --json tagName,isPrerelease -q '.[] | select(.isPrerelease == false) | .tagName' | head -1)
if [ -z "$RELEASE_TAG" ]; then
echo "Error: Could not determine latest HDF4 release tag"
exit 1
fi
HDF4_VERSION="${RELEASE_TAG#hdf}"
fi
echo "version=$HDF4_VERSION" >> $GITHUB_OUTPUT
echo "release-tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
echo "Using HDF4 release: ${RELEASE_TAG} (version: ${HDF4_VERSION})"
env:
GH_TOKEN: ${{ github.token }}

- name: Download and Extract HDF4
shell: bash
run: |
RELEASE_TAG="${{ steps.resolve-hdf4.outputs.release-tag }}"
HDF4_VERSION="${{ steps.resolve-hdf4.outputs.version }}"

# Build pattern - handle wildcards by extracting OS-specific part
OS_PATTERN="${{ inputs.os-pattern }}"
if [[ "$OS_PATTERN" == *"*"* ]]; then
# Extract OS-specific part (remove leading wildcards/hyphens) and prepend RELEASE_TAG
OS_SPECIFIC=$(echo "$OS_PATTERN" | sed 's/^[*-]*//')
PATTERN="${RELEASE_TAG}-${OS_SPECIFIC}"
else
PATTERN="${RELEASE_TAG}-${OS_PATTERN}"
fi

echo "Downloading HDF4 ${HDF4_VERSION} with pattern: $PATTERN"
gh release download "${RELEASE_TAG}" \
--repo HDFGroup/hdf4 \
--pattern "$PATTERN" \
--clobber

# Select the downloaded file deterministically
if [[ "${{ inputs.archive-extension }}" == "tar.gz" ]]; then
ARCHIVE=$(ls *_gcc.tar.gz *_clang.tar.gz 2>/dev/null | sort -V | tail -1)
else
ARCHIVE=$(ls *.zip 2>/dev/null | sort -V | tail -1)
fi
echo "Selected archive: $ARCHIVE"

# Extract based on archive type
if [[ "${{ inputs.archive-extension }}" == "tar.gz" ]]; then
tar -zxf "$ARCHIVE"
else
7z x -y "$ARCHIVE"
fi
[ -d hdf4 ] || mv hdf4-* hdf4

# Extract inner archive
cd "${{ github.workspace }}/hdf4"
if [[ "${{ inputs.archive-extension }}" == "tar.gz" ]]; then
tar -zxf HDF-${HDF4_VERSION}-${{ inputs.inner-archive-os }}.tar.gz --strip-components 1
else
7z x -y HDF-*-win64.zip
fi
env:
GH_TOKEN: ${{ github.token }}

- name: Download and Extract HDF5
shell: bash
run: |
HDF5_VERSION="${{ inputs.hdf5-version }}"

# Build pattern - trust the input pattern directly
# Handle wildcards or construct with version prefix
OS_PATTERN="${{ inputs.os-pattern }}"

# If pattern already contains hdf5- prefix or wildcards, use as-is
# Otherwise, construct as hdf5-${VERSION}-${pattern}
if [[ "$OS_PATTERN" == hdf5-* ]] || [[ "$OS_PATTERN" == *hdf5* ]]; then
# Pattern already has hdf5 prefix, use as-is (may need version substitution)
PATTERN="$OS_PATTERN"
elif [[ "$OS_PATTERN" == *"*"* ]]; then
# Pattern has wildcards but no hdf5 prefix - extract OS-specific part
# Remove leading wildcards/hyphens and construct HDF5 pattern
OS_SPECIFIC=$(echo "$OS_PATTERN" | sed 's/^[*-]*//')
PATTERN="hdf5-${HDF5_VERSION}-${OS_SPECIFIC}"
else
# Simple pattern without wildcards or prefix
PATTERN="hdf5-${HDF5_VERSION}-${OS_PATTERN}"
fi

echo "Downloading HDF5 ${HDF5_VERSION} with pattern: $PATTERN"
gh release download ${HDF5_VERSION} \
--repo HDFGroup/hdf5 \
--pattern "$PATTERN" \
--clobber

# Select the downloaded file deterministically
if [[ "${{ inputs.archive-extension }}" == "tar.gz" ]]; then
ARCHIVE=$(ls hdf5-${HDF5_VERSION}*.tar.gz 2>/dev/null | sort -V | tail -1)
else
ARCHIVE=$(ls hdf5-*.zip 2>/dev/null | sort -V | tail -1)
fi
echo "Selected archive: $ARCHIVE"

# Extract based on archive type
if [[ "${{ inputs.archive-extension }}" == "tar.gz" ]]; then
tar -zxf "$ARCHIVE"
else
7z x -y "$ARCHIVE"
fi
[ -d hdf5 ] || mv hdf5-* hdf5

# Extract inner archive
cd "${{ github.workspace }}/hdf5"
if [[ "${{ inputs.archive-extension }}" == "tar.gz" ]]; then
tar -zxf HDF5-${HDF5_VERSION}-${{ inputs.inner-archive-os }}.tar.gz --strip-components 1
else
7z x -y HDF5-*-win64.zip
fi
env:
GH_TOKEN: ${{ github.token }}

- name: Set Library Paths
id: set-paths
shell: bash
run: |
HDF4_VERSION="${{ steps.resolve-hdf4.outputs.version }}"
HDF5_VERSION="${{ inputs.hdf5-version }}"

# Detect directory structure (differs between Linux/macOS and Windows)
# Linux/macOS: hdf4/HDF_Group/HDF/<version>/
# Windows: hdf4/HDF-<version>-win64/
if [ -d "${{ github.workspace }}/hdf4/HDF_Group" ]; then
# Linux/macOS structure
HDF4LIB_PATH=${{ github.workspace }}/hdf4/HDF_Group/HDF/${HDF4_VERSION}
else
# Windows structure - find HDF-*-win64 directory
HDF4LIB_PATH=$(find ${{ github.workspace }}/hdf4 -maxdepth 1 -type d -name "HDF-*-win64" | head -1)
fi

if [ -d "${{ github.workspace }}/hdf5/HDF_Group" ]; then
# Linux/macOS structure
HDF5LIB_PATH=${{ github.workspace }}/hdf5/HDF_Group/HDF5/${HDF5_VERSION}
else
# Windows structure - find HDF5-*-win64 directory
HDF5LIB_PATH=$(find ${{ github.workspace }}/hdf5 -maxdepth 1 -type d -name "HDF5-*-win64" | head -1)
fi

echo "hdf4-lib-path=$HDF4LIB_PATH" >> $GITHUB_OUTPUT
echo "hdf5-lib-path=$HDF5LIB_PATH" >> $GITHUB_OUTPUT
echo "HDF4LIB_PATH=$HDF4LIB_PATH" >> $GITHUB_ENV
echo "HDF5LIB_PATH=$HDF5LIB_PATH" >> $GITHUB_ENV

echo "HDF4 installed to: $HDF4LIB_PATH"
echo "HDF5 installed to: $HDF5LIB_PATH"

- name: Install HDF JARs to Maven Repository
shell: bash
run: |
echo "Installing HDF JARs to local Maven repository..."

# Copy HDF JARs from downloaded distributions
mkdir -p repository/lib
cp ${{ env.HDF4LIB_PATH }}/lib/*.jar repository/lib/ 2>/dev/null || echo "No HDF4 JARs found"
cp ${{ env.HDF5LIB_PATH }}/lib/*.jar repository/lib/ 2>/dev/null || echo "No HDF5 JARs found"

# List what we have
echo "JARs in repository/lib:"
ls repository/lib/*.jar 2>/dev/null || echo "No JARs found"

# Install jarhdf5 (extract version from filename - handle optional classifiers)
if ls repository/lib/jarhdf5-*.jar 1>/dev/null 2>&1; then
JAR_FILE=$(ls repository/lib/jarhdf5-*.jar | head -1)
JAR_BASENAME=$(basename "$JAR_FILE" .jar)
JAR_VERSION=$(echo "$JAR_BASENAME" | sed -E 's/^jarhdf5-([0-9]+(\.[0-9]+)*).*/\1/')
echo "Detected jarhdf5 version: $JAR_VERSION"
mvn install:install-file -Dfile="$JAR_FILE" \
-DgroupId=jarhdf5 -DartifactId=jarhdf5 -Dversion="$JAR_VERSION" \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: $JAR_FILE as version $JAR_VERSION"
fi

# Install jarhdf (HDF4 - extract version from filename - handle optional classifiers)
if ls repository/lib/jarhdf-*.jar 1>/dev/null 2>&1; then
JAR_FILE=$(ls repository/lib/jarhdf-*.jar | head -1)
JAR_BASENAME=$(basename "$JAR_FILE" .jar)
JAR_VERSION=$(echo "$JAR_BASENAME" | sed -E 's/^jarhdf-([0-9]+(\.[0-9]+)*).*/\1/')
echo "Detected jarhdf version: $JAR_VERSION"
mvn install:install-file -Dfile="$JAR_FILE" \
-DgroupId=jarhdf -DartifactId=jarhdf -Dversion="$JAR_VERSION" \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: $JAR_FILE as version $JAR_VERSION"
fi

# Install fits.jar
if [ -f repository/lib/fits.jar ]; then
mvn install:install-file -Dfile=repository/lib/fits.jar \
-DgroupId=fits -DartifactId=fits -Dversion=1.0.0 \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: fits.jar"
fi

# Install netcdf.jar
if [ -f repository/lib/netcdf.jar ]; then
mvn install:install-file -Dfile=repository/lib/netcdf.jar \
-DgroupId=netcdf -DartifactId=netcdf -Dversion=1.0.0 \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: netcdf.jar"
fi

# Install slf4j-api if present
if [ -f repository/lib/slf4j-api-*.jar ]; then
JAR_FILE=$(ls repository/lib/slf4j-api-*.jar | head -1)
VERSION=$(echo "$JAR_FILE" | grep -oP 'slf4j-api-\K[0-9.]+')
mvn install:install-file -Dfile="$JAR_FILE" \
-DgroupId=org.slf4j -DartifactId=slf4j-api -Dversion="$VERSION" \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: $JAR_FILE"
fi

# Install SWTBot JARs for UI testing
if [ -f repository/lib/org.eclipse.swtbot.swt.finder.jar ]; then
mvn install:install-file -Dfile=repository/lib/org.eclipse.swtbot.swt.finder.jar \
-DgroupId=org.eclipse.local -DartifactId=org.eclipse.swtbot.swt.finder -Dversion=4.2.1 \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: org.eclipse.swtbot.swt.finder.jar"
fi

if [ -f repository/lib/org.eclipse.swtbot.nebula.nattable.finder.jar ]; then
mvn install:install-file -Dfile=repository/lib/org.eclipse.swtbot.nebula.nattable.finder.jar \
-DgroupId=org.eclipse.local -DartifactId=org.eclipse.swtbot.nebula.nattable.finder -Dversion=4.2.1 \
-Dpackaging=jar -DgeneratePom=true
echo "Installed: org.eclipse.swtbot.nebula.nattable.finder.jar"
fi
Loading
Loading