Skip to content

Commit

Permalink
HDF5 1 8 merge of recent changes and tools (#353)
Browse files Browse the repository at this point in the history
* Update supported platforms

* Merge PR#3 changes from develop

* # WARNING: head commit changed in the meantime

Merge gcc 10 diagnostics option from develop

Merge CMake changes from develop
Merge warnings from develop
Merge #318 OSX changes from develop
Merge tools changes from develop
Merge test macros from develop

* Format updates

* Fix missing semicolon and format fix

* Format update

* Correct actions, remove java option

* Update autotools build files

* Add testfiles

* Fix configure issue with make flags

* Init fapls to default

* Update generated files and fix h5repack id closure

* update format
  • Loading branch information
byrnHDF authored Feb 22, 2021
1 parent 8896048 commit df1a4af
Show file tree
Hide file tree
Showing 213 changed files with 8,754 additions and 7,879 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
uses: DoozyX/clang-format-lint-action@v0.10
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'c,h,cpp,hpp'
Expand Down
77 changes: 73 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,27 @@ jobs:
strategy:
# fail-fast: false
matrix:
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"]
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"]
include:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
os: windows-latest
build_type: "Release"
toolchain: ""
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
- name: "Ubuntu Latest GCC"
artifact: "Linux.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
Expand All @@ -41,6 +47,8 @@ jobs:
build_type: "Release"
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
Expand All @@ -50,15 +58,75 @@ jobs:
build_type: "Debug"
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "Ubuntu Autotools GCC"
artifact: "Linux.tar.xz"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: enable
fortran: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
# Threadsafe runs
- name: "Windows TS MSVC"
artifact: "Windows-MSVCTS.tar.xz"
os: windows-latest
build_type: "Release"
toolchain: ""
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
- name: "Ubuntu TS GCC"
artifact: "LinuxTS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS TS Clang"
artifact: "macOSTS.tar.xz"
os: macos-latest
build_type: "Release"
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
- name: "TS Debug GCC"
artifact: "LinuxTSDBG.tar.xz"
os: ubuntu-latest
build_type: "Debug"
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "TS Autotools GCC"
artifact: "LinuxATS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: disable
fortran: disable
ts: enable
hl: disable
parallel: disable
toolchain: ""
generator: "autogen"
Expand Down Expand Up @@ -105,17 +173,18 @@ jobs:
- name: Autotools Configure
if: matrix.generator == 'autogen'
run: |
sh ./bin/chkmanifest
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java
$GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran
shell: bash

- name: Configure
if: matrix.generator != 'autogen'
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} $GITHUB_WORKSPACE
shell: bash

- name: Autotools Build
Expand Down
78 changes: 74 additions & 4 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@ jobs:
strategy:
# fail-fast: false
matrix:
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"]
name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"]
include:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
os: windows-latest
build_type: "Release"
toolchain: ""
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
- name: "Ubuntu Latest GCC"
artifact: "Linux.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
Expand All @@ -36,6 +42,8 @@ jobs:
build_type: "Release"
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
Expand All @@ -45,15 +53,75 @@ jobs:
build_type: "Debug"
cpp: ON
fortran: OFF
ts: OFF
hl: ON
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "Ubuntu Autotools GCC"
artifact: "Linux.tar.xz"
artifact: "LinuxA.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: enable
fortran: enable
ts: disable
hl: enable
parallel: disable
toolchain: ""
generator: "autogen"
# Threadsafe runs
- name: "Windows TS MSVC"
artifact: "Windows-MSVCTS.tar.xz"
os: windows-latest
build_type: "Release"
toolchain: ""
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
generator: "-G \"Visual Studio 16 2019\" -A x64"
- name: "Ubuntu TS GCC"
artifact: "LinuxTS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS TS Clang"
artifact: "macOSTS.tar.xz"
os: macos-latest
build_type: "Release"
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
- name: "TS Debug GCC"
artifact: "LinuxTSDBG.tar.xz"
os: ubuntu-latest
build_type: "Debug"
cpp: OFF
fortran: OFF
ts: ON
hl: OFF
parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "TS Autotools GCC"
artifact: "LinuxATS.tar.xz"
os: ubuntu-latest
build_type: "Release"
cpp: disable
fortran: disable
ts: enable
hl: disable
parallel: disable
toolchain: ""
generator: "autogen"
Expand All @@ -70,6 +138,7 @@ jobs:
name: ${{ matrix.name }}
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip-ci')"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down Expand Up @@ -99,17 +168,18 @@ jobs:
- name: Autotools Configure
if: matrix.generator == 'autogen'
run: |
sh ./bin/chkmanifest
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java
$GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran
shell: bash

- name: Configure
if: matrix.generator != 'autogen'
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} $GITHUB_WORKSPACE
shell: bash

- name: Autotools Build
Expand Down
28 changes: 21 additions & 7 deletions CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT
set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
if (NOT EXISTS "${ZLIB_URL}")
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter ZLIB file ${ZLIB_URL} not found")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
endif ()
endif ()
set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
if (USE_LIBAEC)
set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
endif ()
if (NOT EXISTS "${SZIP_URL}")
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter SZIP file ${SZIP_URL} not found")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter SZIP file ${SZIP_URL} not found")
endif ()
endif ()
else ()
set (ZLIB_USE_EXTERNAL 0)
Expand Down Expand Up @@ -76,7 +80,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
message (STATUS "Filter ZLIB is built")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter ZLIB is built")
endif ()
else ()
message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
endif ()
Expand All @@ -92,7 +98,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter ZLIB is ON")
endif ()
endif ()

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -122,9 +130,13 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is built")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter SZIP is built")
endif ()
if (USE_LIBAEC)
message (STATUS "... with library AEC")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "... with library AEC")
endif ()
set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME})
else ()
set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME})
Expand All @@ -135,7 +147,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
endif ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Filter SZIP is ON")
endif ()
if (H5_HAVE_FILTER_SZIP)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
endif ()
Expand Down
Loading

0 comments on commit df1a4af

Please sign in to comment.