Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Julia CI #5001

Merged
merged 1 commit into from
Oct 24, 2024
Merged
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
15 changes: 14 additions & 1 deletion .github/workflows/julia-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ jobs:
name: "julia ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
- name: Get HDF5 source
uses: actions/[email protected]

# Checking out the Julia HDF5 wrappers will clobber the HDF5 checkout
# NOTE: Remove this when the Julia wrappers have been patched
- name: Save the Julia patch file
shell: bash
run: |
mkdir "${{ runner.workspace }}/julia_patch"
cp .github/workflows/julia_ci.patch "${{ runner.workspace }}/julia_patch"

- name: Install Dependencies
shell: bash
run: |
Expand Down Expand Up @@ -65,6 +73,11 @@ jobs:
repository: JuliaIO/HDF5.jl
path: .

# NOTE: Remove this when the Julia wrappers have been patched
- name: Patch Julia CI
run: |
git apply "${{ runner.workspace }}/julia_patch/julia_ci.patch" -v

- name: Generate LocalPreferences
run: |
echo '[HDF5]' >> LocalPreferences.toml
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/julia-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ jobs:
name: "julia ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- name: Get Sources
- name: Get HDF5 source
uses: actions/[email protected]

# Checking out the Julia HDF5 wrappers will clobber the HDF5 checkout
# NOTE: Remove this when the Julia wrappers have been patched
- name: Save the Julia patch file
shell: bash
run: |
mkdir "${{ runner.workspace }}/julia_patch"
cp .github/workflows/julia_ci.patch "${{ runner.workspace }}/julia_patch"

- name: Install Dependencies
shell: bash
run: |
Expand Down Expand Up @@ -68,6 +76,11 @@ jobs:
repository: JuliaIO/HDF5.jl
path: .

# NOTE: Remove this when the Julia wrappers have been patched
- name: Patch Julia CI
run: |
git apply "${{ runner.workspace }}/julia_patch/julia_ci.patch" -v

- name: Generate LocalPreferences
run: |
echo '[HDF5]' >> LocalPreferences.toml
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/julia_ci.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/test/objects.jl b/test/objects.jl
index d68dd749..0541e91a 100644
--- a/test/objects.jl
+++ b/test/objects.jl
@@ -16,7 +16,13 @@ using HDF5.API
h5open(fn, "r") do h5f
@test API.h5o_exists_by_name(h5f, "data")
@test API.h5o_exists_by_name(h5f, "lore")
- @test_throws API.H5Error API.h5o_exists_by_name(h5f, "noonian")
+ @static if HDF5.API.h5_get_libversion() <= v"1.14.5"
+ # Buggy behavior in earlier versions of HDF5 returns FAIL (-1)
+ @test_throws API.H5Error API.h5o_exists_by_name(h5f, "noonian")
+ else
+ # The correct behavior is to return false (0)
+ @test API.h5o_exists_by_name(h5f, "noonian") == 0
+ end

loc_id = API.h5o_open(h5f, "data", API.H5P_DEFAULT)
try
Loading