Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
444 commits
Select commit Hold shift + click to select a range
f6029d3
Committing clang-format changes
github-actions[bot] Oct 5, 2025
5a5d122
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 6, 2025
74227e2
Initial work on FFM tests
byrnHDF Oct 6, 2025
26ef1cb
Committing clang-format changes
github-actions[bot] Oct 6, 2025
18c55b2
Cleanup and add H5P tests
byrnHDF Oct 6, 2025
7979601
Committing clang-format changes
github-actions[bot] Oct 6, 2025
fdc577d
Fix conflicts
byrnHDF Oct 6, 2025
534e3d2
Committing clang-format changes
github-actions[bot] Oct 6, 2025
cfe3788
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 6, 2025
f6520a7
Remove unneeded testfiles
byrnHDF Oct 6, 2025
ad092d8
Add more H5P tests
byrnHDF Oct 6, 2025
a3eb203
Committing clang-format changes
github-actions[bot] Oct 6, 2025
4746349
More H5P tests
byrnHDF Oct 6, 2025
28b9106
Committing clang-format changes
github-actions[bot] Oct 6, 2025
3274574
Add more H5P tests
byrnHDF Oct 6, 2025
621171b
Committing clang-format changes
github-actions[bot] Oct 6, 2025
8c91274
Rework depends name
byrnHDF Oct 6, 2025
63d7fe8
Add more H5A tests
byrnHDF Oct 6, 2025
f1f2178
Committing clang-format changes
github-actions[bot] Oct 6, 2025
8753db9
Implement more tests
byrnHDF Oct 6, 2025
39fd3d3
Committing clang-format changes
github-actions[bot] Oct 6, 2025
f18e0e5
Fix JNI depends usage
byrnHDF Oct 7, 2025
979f86b
Attempt to fix doxygen ref issue
byrnHDF Oct 7, 2025
c79c21a
Add more checks
byrnHDF Oct 7, 2025
85931ca
Correct ENABLE JNI usage
byrnHDF Oct 7, 2025
e0dd033
re-enable docs for fixing
byrnHDF Oct 7, 2025
a0c354e
Merge develop chnages
byrnHDF Oct 8, 2025
3235570
Committing clang-format changes
github-actions[bot] Oct 8, 2025
41ec545
Update FFM source
byrnHDF Oct 8, 2025
6cbe8a9
Committing clang-format changes
github-actions[bot] Oct 8, 2025
2b5f3c8
Try fix win CI
byrnHDF Oct 8, 2025
1b17ff5
Must be shared lib
byrnHDF Oct 9, 2025
2199178
Merge H5EX prefix change
byrnHDF Oct 9, 2025
03e2fa3
Fix usage variable to function call
byrnHDF Oct 9, 2025
2bf4a3f
Merge with develop changes
byrnHDF Oct 9, 2025
0e39b50
Updates
byrnHDF Oct 9, 2025
19a4ba4
Committing clang-format changes
github-actions[bot] Oct 9, 2025
73cd784
Corrections everywhere
byrnHDF Oct 9, 2025
33546ac
Committing clang-format changes
github-actions[bot] Oct 9, 2025
893f9b5
More FFM tests
byrnHDF Oct 9, 2025
ee1a0b2
Committing clang-format changes
github-actions[bot] Oct 9, 2025
13e29d3
Fix constants option
byrnHDF Oct 9, 2025
5015bb3
Committing clang-format changes
github-actions[bot] Oct 9, 2025
2b6f7a3
Require ros3 for ffm java
byrnHDF Oct 10, 2025
0b24486
Committing clang-format changes
github-actions[bot] Oct 10, 2025
69389eb
Merge branch 'develop'
byrnHDF Oct 10, 2025
7634eaa
Fix conflicts
byrnHDF Oct 10, 2025
6dd92b1
remove duplicates
byrnHDF Oct 10, 2025
7af8277
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 11, 2025
d50ecdc
Skip including ros3 VFD APIs
byrnHDF Oct 13, 2025
2a69cde
Committing clang-format changes
github-actions[bot] Oct 13, 2025
fab29a7
Fix workflow
byrnHDF Oct 13, 2025
03ba0e4
Remove obsolete file
byrnHDF Oct 13, 2025
b7eba50
Update java jar usage
byrnHDF Oct 13, 2025
82b8b73
Check for artifacts before creating again
byrnHDF Oct 13, 2025
4cc7123
Rework how to use FFM headers
byrnHDF Oct 13, 2025
d593a48
Correct version for action
byrnHDF Oct 13, 2025
24d9cf8
Update artifact names for binary testing
byrnHDF Oct 13, 2025
68f4cd1
Cleanup
byrnHDF Oct 13, 2025
60d3fea
Add FFM H5O tests
byrnHDF Oct 13, 2025
85fbcae
Committing clang-format changes
github-actions[bot] Oct 13, 2025
3899d3e
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 13, 2025
0a4906e
Correct typo
byrnHDF Oct 13, 2025
0373c00
More FFM tests for H5P and H5F
byrnHDF Oct 13, 2025
0407612
Committing clang-format changes
github-actions[bot] Oct 13, 2025
48b1c7a
Add some H5T ffm tests
byrnHDF Oct 14, 2025
1887a84
Committing clang-format changes
github-actions[bot] Oct 14, 2025
62f5cbb
Remove duplicate test
byrnHDF Oct 14, 2025
d179c72
Split HDF5Examples into FFM and compatibility
byrnHDF Oct 14, 2025
3ecb327
Committing clang-format changes
github-actions[bot] Oct 14, 2025
244299d
adjust ros3 file location
byrnHDF Oct 14, 2025
856d499
More FFM tests
byrnHDF Oct 14, 2025
87e356c
Committing clang-format changes
github-actions[bot] Oct 14, 2025
752ae4d
Optionally include structs file
byrnHDF Oct 14, 2025
5f99cb0
Fix FFM test issues
byrnHDF Oct 14, 2025
1590ef9
Committing clang-format changes
github-actions[bot] Oct 14, 2025
3ccb360
More tests added
byrnHDF Oct 14, 2025
855fb27
Committing clang-format changes
github-actions[bot] Oct 14, 2025
8208e55
Fix merge conflicts
byrnHDF Oct 15, 2025
d839b84
Committing clang-format changes
github-actions[bot] Oct 15, 2025
57abf99
Add H5VL ffm tests
byrnHDF Oct 15, 2025
f53608e
Committing clang-format changes
github-actions[bot] Oct 15, 2025
d0a468e
Cover more API modules.
byrnHDF Oct 15, 2025
31550ad
Committing clang-format changes
github-actions[bot] Oct 15, 2025
8e9c768
Fix install logic
byrnHDF Oct 15, 2025
ed4afa4
Update tests
byrnHDF Oct 15, 2025
65523ae
Committing clang-format changes
github-actions[bot] Oct 15, 2025
1df7388
Add presets
byrnHDF Oct 15, 2025
c2bd155
More tests implemented
byrnHDF Oct 15, 2025
5d5b013
Committing clang-format changes
github-actions[bot] Oct 15, 2025
a5486c5
Finish FFM tests
byrnHDF Oct 16, 2025
61fdfa1
Committing clang-format changes
github-actions[bot] Oct 16, 2025
4a86808
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 16, 2025
293c740
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 16, 2025
7066c5d
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 16, 2025
74e82da
Fix merge conflicts
byrnHDF Oct 16, 2025
1a69419
Committing clang-format changes
github-actions[bot] Oct 16, 2025
912bf9f
First examples for FFM
byrnHDF Oct 16, 2025
739404f
Committing clang-format changes
github-actions[bot] Oct 16, 2025
b2555f2
All examples converted
byrnHDF Oct 16, 2025
706cfff
Committing clang-format changes
github-actions[bot] Oct 16, 2025
f764403
Enable Java FFM examples
byrnHDF Oct 17, 2025
f255349
Add windows jextract files
byrnHDF Oct 17, 2025
407ae57
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 17, 2025
b741ee6
Update INSTALL docs - make presets primary
byrnHDF Oct 17, 2025
9a6fbea
Correct version check for examples
byrnHDF Oct 18, 2025
98bd481
Fix FFM examples
byrnHDF Oct 18, 2025
6f5352a
Committing clang-format changes
github-actions[bot] Oct 18, 2025
d4e771c
Update FFM examples
byrnHDF Oct 19, 2025
78ef1d6
Committing clang-format changes
github-actions[bot] Oct 19, 2025
7b634c6
Fix tutor examples
byrnHDF Oct 19, 2025
9050020
Do not build iterate/visit FFM examples
byrnHDF Oct 19, 2025
e026baf
Committing clang-format changes
github-actions[bot] Oct 19, 2025
f762db5
Fix more examples
byrnHDF Oct 19, 2025
aa66663
correct typo
byrnHDF Oct 19, 2025
bd868ac
Committing clang-format changes
github-actions[bot] Oct 19, 2025
b226552
Some more fixes
byrnHDF Oct 19, 2025
a432632
Committing clang-format changes
github-actions[bot] Oct 19, 2025
9aca060
Fix TUTR compile issues
byrnHDF Oct 19, 2025
872315e
Committing clang-format changes
github-actions[bot] Oct 19, 2025
4c412fa
Update test name
byrnHDF Oct 19, 2025
6494e68
Correct default java state
byrnHDF Oct 19, 2025
05661e3
Complete examples.
byrnHDF Oct 19, 2025
fd4d057
Committing clang-format changes
github-actions[bot] Oct 19, 2025
02381f4
Update presets
byrnHDF Oct 19, 2025
1b8b3c6
Skip example with missing file
byrnHDF Oct 19, 2025
2014531
Add tests to presets
byrnHDF Oct 20, 2025
3fc0003
Add workflow to create FFM bindings.
byrnHDF Oct 20, 2025
fc40753
Integrate FFM bindings generation into daily build workflow
byrnHDF Oct 20, 2025
5e25826
Update CLAUDE.md with daily build integration
byrnHDF Oct 20, 2025
d54d64a
Fix jextract download with fallback URLs
byrnHDF Oct 20, 2025
b4a50a9
Update jextract URLs to current builds
byrnHDF Oct 20, 2025
90f3687
Fix broken pipe error in ls output
byrnHDF Oct 20, 2025
f326036
Remove unnecessary ls commands from jextract workflow
byrnHDF Oct 20, 2025
f8128d4
Add ROS3 VFD support to FFM bindings generation workflow
byrnHDF Oct 20, 2025
7e13b4b
Fix Windows jextract extraction issue
byrnHDF Oct 20, 2025
0dd52f3
Fix Windows jextract extraction with adaptive path detection
byrnHDF Oct 21, 2025
24b1a8a
Fix Windows jextract to use .bat file instead of .exe
byrnHDF Oct 21, 2025
4d97031
Fix Windows install prefix path format for bash shell
byrnHDF Oct 21, 2025
300ca9a
Fix merge step to download only jextract artifacts
byrnHDF Oct 21, 2025
417ad46
Fix merge script to handle platform-specific FFM bindings
byrnHDF Oct 21, 2025
298b887
Correct version for examples
byrnHDF Oct 21, 2025
9aec4e3
FFM platform files.
byrnHDF Oct 21, 2025
0b9dae3
Committing clang-format changes
github-actions[bot] Oct 21, 2025
3d0c5eb
Fix script
byrnHDF Oct 21, 2025
ffabacf
Correct file list
byrnHDF Oct 21, 2025
e794f95
Correct path to files
byrnHDF Oct 21, 2025
fa8d793
Add missing folder
byrnHDF Oct 22, 2025
79bb3df
Fix windows compile issue
byrnHDF Oct 22, 2025
b3c01d8
Committing clang-format changes
github-actions[bot] Oct 22, 2025
442c691
Fix doxygen error
byrnHDF Oct 22, 2025
b4808ec
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 22, 2025
282cd85
Fix maven-staging workflow: Add missing graphviz dependency
byrnHDF Oct 22, 2025
6ac3b74
Fix HDF5Examples to properly detect JNI vs FFM implementation
byrnHDF Oct 23, 2025
274b8bb
Correct doxygen tags
byrnHDF Oct 23, 2025
ec0fd36
Skip Windows-failing FFM tests in TestH5Tffm
byrnHDF Oct 23, 2025
f14f59b
Committing clang-format changes
github-actions[bot] Oct 23, 2025
4e0efc8
Fix HDF5Examples to correctly detect JNI vs FFM using HDF5_JAVA_IMPLE…
byrnHDF Oct 23, 2025
3dcfa4c
Fix Windows FFM test failures by using platform-independent H5T_STD t…
byrnHDF Oct 23, 2025
e601e2d
Enable detailed test output for FFM Java tests
byrnHDF Oct 23, 2025
dcee9c2
Fix Maven minimal presets: Remove test step when BUILD_TESTING=OFF
byrnHDF Oct 23, 2025
f55df49
Add compilation error output to Maven staging test failures
byrnHDF Oct 25, 2025
9ae3b54
Fix Maven staging to use correct examples directory based on implemen…
byrnHDF Oct 25, 2025
a9acd55
Fix Maven staging Windows test to check all 4 example categories
byrnHDF Oct 25, 2025
52e43ea
Clarify Maven preset platform-specificity in INSTALL_CMake.txt
byrnHDF Oct 25, 2025
d1fd3e7
Skip 5 Windows-failing FFM tests - FFM memory layout limitations
byrnHDF Oct 25, 2025
355cccd
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 26, 2025
55ae3c8
Improve presets usage
byrnHDF Oct 26, 2025
5c3057d
Change NATIVE types
byrnHDF Oct 26, 2025
3a59485
Fix workflow
byrnHDF Oct 26, 2025
758f7b6
Fix maven staging workflow
byrnHDF Oct 26, 2025
edf0c12
More fixes for maven workflow
byrnHDF Oct 26, 2025
e23cbab
Fix windows LONG errors
byrnHDF Oct 26, 2025
249db7c
Committing clang-format changes
github-actions[bot] Oct 26, 2025
40048c8
Correct maven staging workflow
byrnHDF Oct 27, 2025
41e0455
Improve maven testing
byrnHDF Oct 27, 2025
8ea0e0a
Another fix to test
byrnHDF Oct 27, 2025
8b05236
Fix for implentation tests
byrnHDF Oct 27, 2025
e0c39ee
Fix test binaries
byrnHDF Oct 27, 2025
dcfa3bc
Correct option usage.
byrnHDF Oct 27, 2025
33f3721
Fix FFM binary tests
byrnHDF Oct 27, 2025
1781e36
Correct java version for bintest.yml
byrnHDF Oct 27, 2025
05a0b00
Fix relative paths in jni source
byrnHDF Oct 27, 2025
53aa605
Fix maven artifacts for release workflow
byrnHDF Oct 27, 2025
ae7a885
Merge branch 'HDFGroup:develop' into develop-jextract22
byrnHDF Oct 27, 2025
4098ea9
Revert Maven changes from ctest.yml
byrnHDF Oct 27, 2025
2ed7ec9
Remove maven_enabled parameter from release.yml ctest call
byrnHDF Oct 27, 2025
65fb9ad
Fix Java version mismatch in macOS binary tests
byrnHDF Oct 28, 2025
fd7518c
Fix Java build failures in release workflow standard builds
byrnHDF Oct 28, 2025
41f8226
Fix java build race condition issue
byrnHDF Oct 28, 2025
9d3605e
Clean up CLAUDE.md: remove date-specific and test-specific info
byrnHDF Oct 28, 2025
9af5b17
Cleanup doc and set default
byrnHDF Oct 28, 2025
d75b375
Refactor out aws_c_s3 workflow
byrnHDF Oct 28, 2025
924d0d5
Cleanup preset naming and usage
byrnHDF Oct 29, 2025
b2339d5
Correct preset names in script
byrnHDF Oct 29, 2025
229a2bf
Convert FFM to generate inline and use jextract-25
byrnHDF Oct 29, 2025
2bf37fe
Committing clang-format changes
github-actions[bot] Oct 29, 2025
d169f16
Update workflows for jextract
byrnHDF Oct 29, 2025
6a61b15
Add jextract error handling
byrnHDF Oct 30, 2025
a366b3d
Update jextract on windows
byrnHDF Oct 30, 2025
1ff1772
Add way to check for features
byrnHDF Oct 30, 2025
ffeb059
Committing clang-format changes
github-actions[bot] Oct 30, 2025
704856c
Use reflection-based helper methods for java compat constants
byrnHDF Oct 30, 2025
4a69dc4
Committing clang-format changes
github-actions[bot] Oct 30, 2025
e30eccc
Update testing and compat functions
byrnHDF Oct 30, 2025
b950236
Committing clang-format changes
github-actions[bot] Oct 30, 2025
f3538b4
Remove obsolete workflows/scripts and fix maven scripts
byrnHDF Oct 30, 2025
5072f09
Merge branch 'HDFGroup:develop' into develop-jextract25
byrnHDF Oct 30, 2025
2d2f034
Update java based on merge for default 1.8 libver
byrnHDF Oct 30, 2025
18e1997
Add comprehensive Java/Maven documentation to doxygen
byrnHDF Oct 30, 2025
6e62cd8
Fix Maven validation script to handle FFM bindings JAR
byrnHDF Oct 30, 2025
48734f4
Merge doc develop changes
byrnHDF Oct 31, 2025
a369db3
Merge branch 'HDFGroup:develop' into develop-jextract25
byrnHDF Oct 31, 2025
a9a6592
Remove tmp files
byrnHDF Oct 31, 2025
9067590
Use Java 25 for all FFM binary tests
byrnHDF Oct 31, 2025
9fa5a74
Make Java 25 the minimum requirement for FFM builds
byrnHDF Oct 31, 2025
c41aaec
Remove more files
byrnHDF Oct 31, 2025
30a4df7
Remove vague text about static
byrnHDF Oct 31, 2025
85e831c
Remove static reference
byrnHDF Oct 31, 2025
37629c4
Fix FFM cache setting
byrnHDF Oct 31, 2025
dec12fb
Fix java option and correct java 25 req
byrnHDF Oct 31, 2025
94ced1d
correct java version number for checks
byrnHDF Oct 31, 2025
01481f1
Update test scripts to require Java 25 for FFM
byrnHDF Oct 31, 2025
b55e85c
Update workflows for java 25 and not 24
byrnHDF Oct 31, 2025
6f24185
Clean up comments in VLDataConverter.java
byrnHDF Oct 31, 2025
912bf2e
Committing clang-format changes
github-actions[bot] Oct 31, 2025
a99fac1
cleanup
byrnHDF Oct 31, 2025
d122c0d
Remove claude file refs
byrnHDF Oct 31, 2025
2c75abd
Fix incorrect variables
byrnHDF Oct 31, 2025
7181e0d
Remove unused script
byrnHDF Oct 31, 2025
a67ca11
Merge branch 'HDFGroup:develop' into develop-jextract25
byrnHDF Nov 1, 2025
d6a0fa9
Update Pfapl tests
byrnHDF Nov 1, 2025
b1eaff2
Delete CLAUDE.md
byrnHDF Nov 2, 2025
a989f64
Address multiple review comments
byrnHDF Nov 2, 2025
1e79dee
Merge branch 'develop' into develop-jextract25
byrnHDF Nov 3, 2025
f3eff4b
Update actions versions
byrnHDF Nov 3, 2025
66f27c1
Fix typo
byrnHDF Nov 3, 2025
c361a45
Ignore failing VL FFM compat tests - address reviews
byrnHDF Nov 3, 2025
e2426c5
Committing clang-format changes
github-actions[bot] Nov 3, 2025
1f61789
Merge in FP8 changes
byrnHDF Nov 3, 2025
1110f29
Merge in FP non-java changes
byrnHDF Nov 3, 2025
02acb61
Add files temp
byrnHDF Nov 3, 2025
8f76355
Merge branch 'HDFGroup:develop' into develop-jextract25
byrnHDF Nov 3, 2025
a863bb7
Remove temp
byrnHDF Nov 3, 2025
8d113cc
Fix ros3 fapl access for compat class and tests
byrnHDF Nov 4, 2025
7faff4b
Committing clang-format changes
github-actions[bot] Nov 4, 2025
c995e82
Fix doxygen error
byrnHDF Nov 4, 2025
5cc63c9
Merge branch 'HDFGroup:develop' into develop-jextract25
byrnHDF Nov 4, 2025
f305ecf
Merge branch 'HDFGroup:develop' into develop-jextract25
byrnHDF Nov 4, 2025
ebe6d49
remove uneeded file
byrnHDF Nov 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
187 changes: 187 additions & 0 deletions .github/actions/setup-jextract/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: 'Setup jextract'
description: 'Install jextract for FFM binding generation across all platforms'
inputs:
java-version:
description: 'Java version for jextract (24, 25, latest)'
required: false
default: '25'

outputs:
jextract-home:
description: 'Path to jextract installation'
value: ${{ steps.setup-jextract.outputs.jextract-home }}
jextract-version:
description: 'Version of jextract installed'
value: ${{ steps.setup-jextract.outputs.jextract-version }}

runs:
using: 'composite'
steps:
- name: Setup jextract (Linux/macOS)
id: setup-jextract-unix
if: runner.os != 'Windows'
shell: bash
run: |
echo "Installing jextract for $RUNNER_OS..."

# Determine platform
if [[ "$RUNNER_OS" == "macOS" ]]; then
PLATFORM="macos-x64"
else
PLATFORM="linux-x64"
fi

# Try different jextract versions (from latest to older)
# Check https://jdk.java.net/jextract/ for available builds
JEXTRACT_URLS=(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, we should be checking checksums.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create issue - I agree we should.

"https://download.java.net/java/early_access/jextract/22/6/openjdk-22-jextract+6-47_${PLATFORM}_bin.tar.gz"
"https://download.java.net/java/early_access/jextract/21/5/openjdk-21-jextract+5-31_${PLATFORM}_bin.tar.gz"
"https://download.java.net/java/early_access/jextract/20/1/openjdk-20-jextract+1-2_${PLATFORM}_bin.tar.gz"
)

mkdir -p $HOME/jextract
cd $HOME/jextract

SUCCESS=false
for URL in "${JEXTRACT_URLS[@]}"; do
echo "Trying to download from: $URL"
if curl -L -f -o jextract.tar.gz "$URL" 2>/dev/null; then
echo "✓ Download successful from $URL"
tar -xzf jextract.tar.gz --strip-components=1
rm jextract.tar.gz
SUCCESS=true
break
else
echo "✗ Failed to download from $URL, trying next..."
fi
done

if [ "$SUCCESS" = false ]; then
echo "ERROR: Failed to download jextract from any known source"
echo "Please check https://jdk.java.net/jextract/ for available builds"
exit 1
fi

# Set outputs
echo "jextract-home=$HOME/jextract" >> $GITHUB_OUTPUT

# Verify installation
if $HOME/jextract/bin/jextract --version 2>&1; then
VERSION=$($HOME/jextract/bin/jextract --version 2>&1 | head -1 || echo "unknown")
echo "jextract-version=$VERSION" >> $GITHUB_OUTPUT
echo "✓ jextract installed successfully: $VERSION"
else
echo "jextract-version=unknown" >> $GITHUB_OUTPUT
echo "✓ jextract installed (version check not supported)"
fi

- name: Setup jextract (Windows)
id: setup-jextract-windows
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "Installing jextract for Windows..."

# Try multiple jextract versions (latest to older)
# Windows now uses .tar.gz format
$JextractUrls = @(
"https://download.java.net/java/early_access/jextract/22/6/openjdk-22-jextract+6-47_windows-x64_bin.tar.gz",
"https://download.java.net/java/early_access/jextract/21/5/openjdk-21-jextract+5-31_windows-x64_bin.tar.gz",
"https://download.java.net/java/early_access/jextract/20/1/openjdk-20-jextract+1-2_windows-x64_bin.tar.gz"
)

$JextractHome = "$env:USERPROFILE\jextract"
New-Item -ItemType Directory -Force -Path $JextractHome | Out-Null

$Success = $false
foreach ($Url in $JextractUrls) {
Write-Host "Trying to download from: $Url"
$TarPath = "$JextractHome\jextract.tar.gz"

try {
Invoke-WebRequest -Uri $Url -OutFile $TarPath -ErrorAction Stop
Write-Host "✓ Download successful from $Url"

# Extract using tar (available in Windows 10+)
$TempExtract = "$JextractHome\temp"
New-Item -ItemType Directory -Force -Path $TempExtract | Out-Null
tar -xzf "$TarPath" -C "$TempExtract" 2>&1 | Out-Null

# Find jextract.bat
$JextractBat = Get-ChildItem -Path $TempExtract -Filter "jextract.bat" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1

if ($JextractBat) {
Write-Host "Found jextract.bat at: $($JextractBat.FullName)"

# Move contents to JextractHome
$JextractRoot = $JextractBat.Directory.Parent.FullName
Get-ChildItem -Path $JextractRoot | ForEach-Object {
Move-Item -Path $_.FullName -Destination $JextractHome -Force
}

# Clean up
Remove-Item -Path $TempExtract -Recurse -Force
Remove-Item -Path $TarPath -Force

# Verify
if (Test-Path "$JextractHome\bin\jextract.bat") {
Write-Host "✓ jextract extracted successfully to $JextractHome"
$Success = $true
break
}
} else {
Write-Host "✗ Could not find jextract.bat in extracted files"
Remove-Item -Path $TempExtract -Recurse -Force -ErrorAction SilentlyContinue
}
}
catch {
Write-Host "✗ Failed to download or extract from $Url"
Write-Host "Error: $_"
}
}

if (-not $Success) {
Write-Host "ERROR: Failed to download jextract from any known source"
Write-Host "Please check https://jdk.java.net/jextract/ for available builds"
exit 1
}

# Set outputs
echo "jextract-home=$JextractHome" >> $env:GITHUB_OUTPUT

# Verify installation
try {
$Version = & "$JextractHome\bin\jextract.bat" --version 2>&1 | Select-Object -First 1
echo "jextract-version=$Version" >> $env:GITHUB_OUTPUT
Write-Host "✓ jextract installed successfully: $Version"
} catch {
echo "jextract-version=unknown" >> $env:GITHUB_OUTPUT
Write-Host "✓ jextract installed (version check not supported)"
}

- name: Set environment variables
id: setup-jextract
shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
JEXTRACT_HOME="${{ steps.setup-jextract-windows.outputs.jextract-home }}"
JEXTRACT_VERSION="${{ steps.setup-jextract-windows.outputs.jextract-version }}"
else
JEXTRACT_HOME="${{ steps.setup-jextract-unix.outputs.jextract-home }}"
JEXTRACT_VERSION="${{ steps.setup-jextract-unix.outputs.jextract-version }}"
fi

echo "JEXTRACT_HOME=$JEXTRACT_HOME" >> $GITHUB_ENV
echo "jextract-home=$JEXTRACT_HOME" >> $GITHUB_OUTPUT
echo "jextract-version=$JEXTRACT_VERSION" >> $GITHUB_OUTPUT

# Add to PATH
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "$JEXTRACT_HOME\bin" >> $GITHUB_PATH
else
echo "$JEXTRACT_HOME/bin" >> $GITHUB_PATH
fi

echo "✓ jextract setup complete"
echo " JEXTRACT_HOME=$JEXTRACT_HOME"
echo " Version: $JEXTRACT_VERSION"
Loading
Loading