Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 13 additions & 7 deletions .github/workflows/java-implementation-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
steps:
- name: Generate test matrix
id: generate-matrix
env:
JAVA_VERSIONS: ${{ inputs.java_versions || '11,17,21,25' }}
PLATFORMS: ${{ inputs.platforms || 'ubuntu-latest' }}
run: |
# Parse inputs
JAVA_VERSIONS="${{ inputs.java_versions || '11,17,21,25' }}"
PLATFORMS="${{ inputs.platforms || 'ubuntu-latest' }}"

# Expand platforms if needed
if [[ "$PLATFORMS" == "all-platforms" ]]; then
Expand Down Expand Up @@ -178,12 +178,14 @@ jobs:

- name: Run implementation tests
shell: bash
env:
TEST_MODE: ${{ inputs.test_mode || 'build' }}
run: |
chmod +x .github/scripts/test-java-implementations.sh
.github/scripts/test-java-implementations.sh \
${{ matrix.java-version }} \
${{ matrix.implementation }} \
${{ inputs.test_mode || 'build' }}
"$TEST_MODE"

- name: Upload build artifacts on failure
if: failure()
Expand Down Expand Up @@ -283,14 +285,18 @@ jobs:

steps:
- name: Generate test report
env:
JAVA_VERSIONS: ${{ inputs.java_versions || '11,17,21,25' }}
TEST_MODE: ${{ inputs.test_mode || 'build' }}
PLATFORMS: ${{ inputs.platforms || 'ubuntu-latest' }}
run: |
echo "## Java Implementation Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

echo "### Test Configuration" >> $GITHUB_STEP_SUMMARY
echo "- **Java Versions**: ${{ inputs.java_versions || '11,17,21,25' }}" >> $GITHUB_STEP_SUMMARY
echo "- **Test Mode**: ${{ inputs.test_mode || 'build' }}" >> $GITHUB_STEP_SUMMARY
echo "- **Platforms**: ${{ inputs.platforms || 'ubuntu-latest' }}" >> $GITHUB_STEP_SUMMARY
echo "- **Java Versions**: $JAVA_VERSIONS" >> $GITHUB_STEP_SUMMARY
echo "- **Test Mode**: $TEST_MODE" >> $GITHUB_STEP_SUMMARY
echo "- **Platforms**: $PLATFORMS" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

# Report job statuses
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/maven-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,19 @@ jobs:
if: always()
steps:
- name: Generate test summary
env:
INPUT_PLATFORMS: ${{ inputs.platforms }}
INPUT_JAVA_IMPL: ${{ inputs.java_implementation }}
INPUT_TEST_DEPLOYMENT: ${{ inputs.test_deployment }}
INPUT_TEST_EXAMPLES: ${{ inputs.test_examples }}
run: |
echo "# Maven Build and Test Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Configuration:**" >> $GITHUB_STEP_SUMMARY
echo "- Platforms: ${{ inputs.platforms }}" >> $GITHUB_STEP_SUMMARY
echo "- Java Implementation: ${{ inputs.java_implementation }}" >> $GITHUB_STEP_SUMMARY
echo "- Deployment Test: ${{ inputs.test_deployment }}" >> $GITHUB_STEP_SUMMARY
echo "- Examples Test: ${{ inputs.test_examples }}" >> $GITHUB_STEP_SUMMARY
echo "- Platforms: $INPUT_PLATFORMS" >> $GITHUB_STEP_SUMMARY
echo "- Java Implementation: $INPUT_JAVA_IMPL" >> $GITHUB_STEP_SUMMARY
echo "- Deployment Test: $INPUT_TEST_DEPLOYMENT" >> $GITHUB_STEP_SUMMARY
echo "- Examples Test: $INPUT_TEST_EXAMPLES" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

echo "## Results" >> $GITHUB_STEP_SUMMARY
Expand All @@ -262,7 +267,7 @@ jobs:
fi

# Deployment results
if [ "${{ inputs.test_deployment }}" == "true" ]; then
if [ "$INPUT_TEST_DEPLOYMENT" == "true" ]; then
if [ "${{ needs.deploy-to-packages.result }}" == "success" ]; then
echo "✅ **Package Deployment:** PASSED" >> $GITHUB_STEP_SUMMARY
echo " - Repository: https://github.com/${{ github.repository }}/packages" >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -296,7 +301,7 @@ jobs:
FFM_OK=$([[ "${{ needs.test-ffm-package.result }}" =~ ^(success|skipped)$ ]] && echo "true" || echo "false")

if [ "${{ needs.build-maven-packages.result }}" == "success" ] && \
([ "${{ inputs.test_deployment }}" == "false" ] || \
([ "$INPUT_TEST_DEPLOYMENT" == "false" ] || \
([ "${{ needs.deploy-to-packages.result }}" == "success" ] && \
[ "$JNI_OK" == "true" ] && [ "$FFM_OK" == "true" ])); then
echo "## 🎉 All Tests Passed!" >> $GITHUB_STEP_SUMMARY
Expand All @@ -321,6 +326,8 @@ jobs:
fi

- name: Check overall status
env:
INPUT_TEST_DEPLOYMENT: ${{ inputs.test_deployment }}
run: |
BUILD_RESULT="${{ needs.build-maven-packages.result }}"
DEPLOY_RESULT="${{ needs.deploy-to-packages.result }}"
Expand All @@ -332,7 +339,7 @@ jobs:
exit 1
fi

if [ "${{ inputs.test_deployment }}" == "true" ]; then
if [ "$INPUT_TEST_DEPLOYMENT" == "true" ]; then
if [ "$DEPLOY_RESULT" != "success" ] && [ "$DEPLOY_RESULT" != "skipped" ]; then
echo "❌ Deployment failed"
exit 1
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/maven-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ jobs:

- name: Determine if Maven testing should run
id: should-test
env:
TEST_MAVEN_DEPLOYMENT: ${{ inputs.test_maven_deployment }}
MAVEN_CHANGED: ${{ steps.changes.outputs.maven }}
run: |
if [ "${{ steps.changes.outputs.maven }}" == "true" ] || [ "${{ inputs.test_maven_deployment }}" == "true" ]; then
if [ "$MAVEN_CHANGED" == "true" ] || [ "$TEST_MAVEN_DEPLOYMENT" == "true" ]; then
echo "result=true" >> $GITHUB_OUTPUT
echo "Maven testing will be performed"
else
Expand All @@ -145,9 +148,10 @@ jobs:
steps:
- name: Determine build matrix
id: set-matrix
env:
JAVA_IMPL: ${{ inputs.java_implementation || 'auto' }}
PLATFORMS: ${{ inputs.platforms || 'all-platforms' }}
run: |
JAVA_IMPL="${{ inputs.java_implementation || 'auto' }}"
PLATFORMS="${{ inputs.platforms || 'all-platforms' }}"

# Determine which implementations to build
case "$JAVA_IMPL" in
Expand Down Expand Up @@ -274,6 +278,8 @@ jobs:
- name: Set preset name
id: set-preset
shell: bash
env:
USE_SNAPSHOT_VERSION: ${{ inputs.use_snapshot_version }}
run: |
# Determine implementation suffix for preset based on matrix
JAVA_IMPL="${{ matrix.implementation }}"
Expand All @@ -289,7 +295,7 @@ jobs:

# Determine snapshot setting
SNAPSHOT_SUFFIX=""
if [ "${{ inputs.use_snapshot_version }}" == "true" ] || [ "${{ github.event_name }}" == "pull_request" ]; then
if [ "$USE_SNAPSHOT_VERSION" == "true" ] || [ "${{ github.event_name }}" == "pull_request" ]; then
SNAPSHOT_SUFFIX="-Snapshot"
fi

Expand Down Expand Up @@ -683,6 +689,8 @@ jobs:

- name: Extract version for testing
id: extract-version
env:
USE_SNAPSHOT_VERSION: ${{ inputs.use_snapshot_version }}
run: |
# Extract version from first available POM file
POM_FILE=$(find ./artifacts -name "pom.xml" 2>/dev/null | head -1)
Expand All @@ -699,7 +707,7 @@ jobs:
H5_RELEASE=$(grep '#define H5_VERS_RELEASE' source/src/H5public.h | awk '{print $3}')

# Determine if this should be a SNAPSHOT version
if [ "${{ inputs.use_snapshot_version }}" == "true" ] || [ "${{ github.event_name }}" == "pull_request" ]; then
if [ "$USE_SNAPSHOT_VERSION" == "true" ] || [ "${{ github.event_name }}" == "pull_request" ]; then
VERSION="${H5_MAJOR}.${H5_MINOR}.${H5_RELEASE}-SNAPSHOT"
else
VERSION="${H5_MAJOR}.${H5_MINOR}.${H5_RELEASE}"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/publish-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}

- name: Sync dir to S3 bucket
env:
LOCAL_DIR: ${{ inputs.local_dir }}
TARGET_DIR: ${{ inputs.target_dir }}
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
S3_TARGET_PATH: ${{ vars.TARGET_PATH }}
run: |
aws s3 sync ./HDF5/${{ inputs.local_dir }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ vars.TARGET_PATH }}/${{ inputs.target_dir }}
aws s3 sync "./HDF5/$LOCAL_DIR" "s3://$S3_BUCKET/$S3_TARGET_PATH/$TARGET_DIR"
62 changes: 40 additions & 22 deletions .github/workflows/test-binary-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ jobs:
cache: 'maven'

- name: Install HDF5 native libraries
env:
INSTALL_METHOD: ${{ inputs.install_method }}
run: |
echo "=== Installing HDF5 Native Libraries ==="
echo "Installation method: ${{ inputs.install_method }}"
echo "Installation method: $INSTALL_METHOD"

if [ "${{ inputs.install_method }}" == "system-package" ]; then
if [ "$INSTALL_METHOD" == "system-package" ]; then
echo "Installing from system packages..."
sudo apt-get update
sudo apt-get install -y libhdf5-dev hdf5-tools
Expand All @@ -100,13 +102,13 @@ jobs:
find /usr/lib -name "libhdf5.so*" 2>/dev/null || echo "Library not found in /usr/lib"
find /usr/local/lib -name "libhdf5.so*" 2>/dev/null || true

elif [ "${{ inputs.install_method }}" == "from-source" ]; then
elif [ "$INSTALL_METHOD" == "from-source" ]; then
echo "Building from source not yet implemented"
echo "Falling back to system package installation"
sudo apt-get update
sudo apt-get install -y libhdf5-dev hdf5-tools

elif [ "${{ inputs.install_method }}" == "from-binary" ]; then
elif [ "$INSTALL_METHOD" == "from-binary" ]; then
echo "Installing from binary package not yet implemented"
echo "Falling back to system package installation"
sudo apt-get update
Expand Down Expand Up @@ -152,26 +154,31 @@ jobs:
SETTINGSEOF

# Replace placeholder with actual URL
sed -i "s|MAVEN_REPO_URL_PLACEHOLDER|${{ inputs.maven_repository }}|g" ~/.m2/settings.xml
sed -i "s|MAVEN_REPO_URL_PLACEHOLDER|$MAVEN_REPOSITORY|g" ~/.m2/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_REPOSITORY: ${{ inputs.maven_repository }}

- name: Download JNI Maven artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_VERSION: ${{ inputs.maven_version }}
MAVEN_REPOSITORY: ${{ inputs.maven_repository }}
run: |
echo "Downloading hdf5-java-jni:${{ inputs.maven_version }}"
echo "Downloading hdf5-java-jni:$MAVEN_VERSION"
mvn dependency:get \
-Dartifact=org.hdfgroup:hdf5-java-jni:${{ inputs.maven_version }} \
-DremoteRepositories=${{ inputs.maven_repository }} \
-Dartifact=org.hdfgroup:hdf5-java-jni:"$MAVEN_VERSION" \
-DremoteRepositories="$MAVEN_REPOSITORY" \
-Dtransitive=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Verify JAR and native library integration
env:
MAVEN_VERSION: ${{ inputs.maven_version }}
run: |
echo "=== Testing JNI Integration ==="

# Find downloaded JAR
JAR_PATH=$(find ~/.m2/repository/org/hdfgroup/hdf5-java-jni/${{ inputs.maven_version }} -name "*.jar" ! -name "*sources*" ! -name "*javadoc*" | head -1)
JAR_PATH=$(find ~/.m2/repository/org/hdfgroup/hdf5-java-jni/"$MAVEN_VERSION" -name "*.jar" ! -name "*sources*" ! -name "*javadoc*" | head -1)

if [ -z "$JAR_PATH" ]; then
echo "❌ Could not find downloaded JAR"
Expand Down Expand Up @@ -226,11 +233,13 @@ jobs:
java -cp ".:$JAR_PATH" -Djava.library.path="$JAVA_LIBRARY_PATH" TestH5Init

- name: Run representative examples
env:
MAVEN_VERSION: ${{ inputs.maven_version }}
run: |
cd HDF5Examples/JAVA

# Find JAR
JAR_PATH=$(find ~/.m2/repository/org/hdfgroup/hdf5-java-jni/${{ inputs.maven_version }} -name "*.jar" ! -name "*sources*" ! -name "*javadoc*" | head -1)
JAR_PATH=$(find ~/.m2/repository/org/hdfgroup/hdf5-java-jni/"$MAVEN_VERSION" -name "*.jar" ! -name "*sources*" ! -name "*javadoc*" | head -1)

# Set library path
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
Expand Down Expand Up @@ -320,26 +329,31 @@ jobs:
SETTINGSEOF2

# Replace placeholder with actual URL
sed -i "s|MAVEN_REPO_URL_PLACEHOLDER|${{ inputs.maven_repository }}|g" ~/.m2/settings.xml
sed -i "s|MAVEN_REPO_URL_PLACEHOLDER|$MAVEN_REPOSITORY|g" ~/.m2/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_REPOSITORY: ${{ inputs.maven_repository }}

- name: Download FFM Maven artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_VERSION: ${{ inputs.maven_version }}
MAVEN_REPOSITORY: ${{ inputs.maven_repository }}
run: |
echo "Downloading hdf5-java-ffm:${{ inputs.maven_version }}"
echo "Downloading hdf5-java-ffm:$MAVEN_VERSION"
mvn dependency:get \
-Dartifact=org.hdfgroup:hdf5-java-ffm:${{ inputs.maven_version }} \
-DremoteRepositories=${{ inputs.maven_repository }} \
-Dartifact=org.hdfgroup:hdf5-java-ffm:"$MAVEN_VERSION" \
-DremoteRepositories="$MAVEN_REPOSITORY" \
-Dtransitive=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test FFM with system HDF5
env:
MAVEN_VERSION: ${{ inputs.maven_version }}
run: |
echo "=== Testing FFM Integration ==="

# Find downloaded JAR
JAR_PATH=$(find ~/.m2/repository/org/hdfgroup/hdf5-java-ffm/${{ inputs.maven_version }} -name "*.jar" ! -name "*sources*" ! -name "*javadoc*" | head -1)
JAR_PATH=$(find ~/.m2/repository/org/hdfgroup/hdf5-java-ffm/"$MAVEN_VERSION" -name "*.jar" ! -name "*sources*" ! -name "*javadoc*" | head -1)

if [ -z "$JAR_PATH" ]; then
echo "❌ Could not find downloaded JAR"
Expand All @@ -360,12 +374,16 @@ jobs:
if: always()
steps:
- name: Generate summary
env:
MAVEN_VERSION: ${{ inputs.maven_version }}
MAVEN_REPOSITORY: ${{ inputs.maven_repository }}
INSTALL_METHOD: ${{ inputs.install_method }}
run: |
echo "# Binary Installation Test Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Version:** ${{ inputs.maven_version }}" >> $GITHUB_STEP_SUMMARY
echo "**Repository:** ${{ inputs.maven_repository }}" >> $GITHUB_STEP_SUMMARY
echo "**Install Method:** ${{ inputs.install_method }}" >> $GITHUB_STEP_SUMMARY
echo "**Version:** $MAVEN_VERSION" >> $GITHUB_STEP_SUMMARY
echo "**Repository:** $MAVEN_REPOSITORY" >> $GITHUB_STEP_SUMMARY
echo "**Install Method:** $INSTALL_METHOD" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

JNI_RESULT="${{ needs.test-jni-binary.result }}"
Expand Down
Loading
Loading