From 193ec37b86db363cb166777240a2766922a55849 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 09:35:14 -0600 Subject: [PATCH 01/15] Add binary test job --- .github/workflows/cmake-bintest.yml | 217 ++++++++++++++++++++++++++++ .github/workflows/cmake.yml | 7 + .github/workflows/main-cmake.yml | 35 ++++- 3 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cmake-bintest.yml diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml new file mode 100644 index 00000000000..9efde977575 --- /dev/null +++ b/.github/workflows/cmake-bintest.yml @@ -0,0 +1,217 @@ +name: hdf5 examples bintest runs + +# Controls when the action will run. Triggers the workflow on a schedule +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +permissions: + contents: read + +# A workflow run is made up of one or more jobs that can run sequentially or +# in parallel +jobs: + build_and_test_win: + # Windows w/ MSVC + CMake + # + name: "Windows MSVC CTest" + runs-on: windows-latest + steps: + - name: Install Dependencies (Windows) + run: choco install ninja + + - name: Set up JDK 19 + uses: actions/setup-java@v3 + with: + java-version: '19' + distribution: 'temurin' + + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1.12.1 + + # Get files created by cmake-ctest script + - name: Get published binary (Windows) + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + with: + name: zip-vs2022_cl-binary + path: ${{ github.workspace }}/hdf5 + + - name: Uncompress hdf5 binary (Win) + working-directory: ${{ github.workspace }}/hdf5 + run: 7z x HDF5-*-win64.zip + shell: bash + + - name: List files for the space (Win) + run: | + ls -l ${{ github.workspace }}/hdf5 + + - name: create hdf5 location (Win) + working-directory: ${{ github.workspace }}/hdf5 + run: | + New-Item -Path "${{ github.workspace }}/HDF_Group/HDF5" -ItemType Directory + Copy-Item -Path "${{ github.workspace }}/hdf5/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse + shell: pwsh + + - name: List files for the space (Win) + run: ls -l ${{ github.workspace }}/HDF_Group/HDF5 + + - name: set hdf5lib name + id: set-hdf5lib-name + run: | + HDF5DIR="${{ github.workspace }}/HDF_Group/HDF5" + echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT + echo "HDF5_PLUGIN_PATH=$HDF5_ROOT/lib/plugin" >> $GITHUB_OUTPUT + shell: bash + + - name: List files for the binaries (Win) + run: | + ls -l ${{ github.workspace }}/HDF_Group/HDF5 + + - name: using powershell + shell: pwsh + run: Get-Location + + - name: List files for the space (Windows) + run: | + Get-ChildItem -Path ${{ github.workspace }} + Get-ChildItem -Path ${{ runner.workspace }} + shell: pwsh + + - name: Run ctest (Windows) + env: + HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} + HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} + run: | + cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDF5Examples" + cmake --workflow --preset=ci-StdShar-MSVC --fresh + shell: bash + + build_and_test_linux: + # Linux (Ubuntu) w/ gcc + CMake + # + name: "Ubuntu gcc CMake" + runs-on: ubuntu-latest + steps: + - name: Install CMake Dependencies (Linux) + run: sudo apt-get install ninja-build doxygen graphviz + + - name: Set up JDK 19 + uses: actions/setup-java@v3 + with: + java-version: '19' + distribution: 'temurin' + + - name: Get published binary (Linux) + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + with: + name: tgz-ubuntu-2204_gcc-binary + path: ${{ github.workspace }}/hdf5 + + - name: Uncompress hdf5 binary (Linux) + run: | + cd "${{ github.workspace }}/hdf5" + tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Linux.tar.gz --strip-components 1 + + - name: set hdf5lib name + id: set-hdf5lib-name + run: | + HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/ + FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5) + echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT + echo "HDF5_PLUGIN_PATH=$HDF5_ROOT/lib/plugin" >> $GITHUB_OUTPUT + + - name: List files for the binaries (Linux) + run: | + ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5 + + - name: Set file base name (Linux) + id: set-file-base + run: | + FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") + echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + + - name: List files for the space (Linux) + run: | + ls -l ${{ github.workspace }} + ls ${{ runner.workspace }} + + - name: Run ctest (Linux) + env: + HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} + HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} + run: | + cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDF5Examples" + cmake --workflow --preset=ci-StdShar-GNUC --fresh + shell: bash + + build_and_test_mac: + # MacOS w/ Clang + CMake + # + name: "MacOS Clang CMake" + runs-on: macos-11 + steps: + - name: Install Dependencies (MacOS) + run: brew install ninja doxygen + + - name: Set up JDK 19 + uses: actions/setup-java@v3 + with: + java-version: '19' + distribution: 'temurin' + + - name: Get published binary (MacOS) + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + with: + name: tgz-osx12-binary + path: ${{ github.workspace }}/hdf5 + + - name: Uncompress hdf5 binary (MacOS) + run: | + cd "${{ github.workspace }}/hdf5" + tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Darwin.tar.gz --strip-components 1 + + - name: set hdf5lib name + id: set-hdf5lib-name + run: | + HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/ + FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5) + echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT + echo "HDF5_PLUGIN_PATH=$HDF5_ROOT/lib/plugin" >> $GITHUB_OUTPUT + + - name: List files for the binaries (MacOS) + run: | + ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5 + + - name: Set file base name (MacOS) + id: set-file-base + run: | + FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") + echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + + - name: List files for the space (MacOS) + run: | + ls ${{ github.workspace }} + ls ${{ runner.workspace }} + + # symlinks the compiler executables to a common location + - name: Setup GNU Fortran + uses: fortran-lang/setup-fortran@v1 + id: setup-fortran + with: + compiler: gcc + version: 12 + + - name: Run ctest (MacOS) + id: run-ctest + env: + HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} + HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} + run: | + cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDF5Examples" + cmake --workflow --preset=ci-StdShar-Clang --fresh + shell: bash + diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c22c753b6d1..8947ae9fbd3 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -43,6 +43,13 @@ jobs: thread_safety: false build_mode: "Release" + call-release-bintest: + name: CMake Test Release Binaries + needs: call-release-cmake + uses: ./.github/workflows/cmake-bintest.yml + with: + build_mode: "Release" + call-release-cmake-intel: name: "CMake Intel Workflows" uses: ./.github/workflows/intel-cmake.yml diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 3294fb1cade..db9d0afb434 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -165,7 +165,7 @@ jobs: echo "CXX=cl.exe" >> $GITHUB_ENV echo "CC=cl.exe" >> $GITHUB_ENV if: matrix.os == 'windows-latest' - + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources uses: actions/checkout@v4.1.1 @@ -256,6 +256,39 @@ jobs: # INSTALL (note that this runs even when we don't run the tests) # + - name: CMake Run Package + run: cpack -C ${{ inputs.build_mode }} -V + working-directory: ${{ runner.workspace }}/build + + - name: List files in the space (Windows) + run: | + ls -l ${{ runner.workspace }}/build + + # Save files created by ctest script + - name: Save published binary (Windows) + uses: actions/upload-artifact@v4 + with: + name: zip-vs2022_cl-binary + path: ${{ runner.workspace }}/build/HDF5-*-win64.zip + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + if: matrix.os == 'windows-latest' + + - name: Save published binary (linux) + uses: actions/upload-artifact@v4 + with: + name: tgz-ubuntu-2204_gcc-binary + path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + if: matrix.os == 'ubuntu-latest' + + - name: Save published binary (linux) + uses: actions/upload-artifact@v4 + with: + name: tgz-osx12-binary + path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + if: matrix.os == 'macos-13' + # # The GitHub runners are inadequate for running parallel HDF5 tests, # so we catch most issues in daily testing. What we have here is just From 95ae3ce2a64a84209e5f6f01d476a908aad9c258 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 09:44:00 -0600 Subject: [PATCH 02/15] Correct names of jobs --- .github/workflows/cmake-bintest.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 9efde977575..827032abb1f 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -15,10 +15,10 @@ permissions: # A workflow run is made up of one or more jobs that can run sequentially or # in parallel jobs: - build_and_test_win: + test_binary_win: # Windows w/ MSVC + CMake # - name: "Windows MSVC CTest" + name: "Windows MSVC Binary Test" runs-on: windows-latest steps: - name: Install Dependencies (Windows) @@ -90,10 +90,10 @@ jobs: cmake --workflow --preset=ci-StdShar-MSVC --fresh shell: bash - build_and_test_linux: + test_binary_linux: # Linux (Ubuntu) w/ gcc + CMake # - name: "Ubuntu gcc CMake" + name: "Ubuntu gcc Binary Test" runs-on: ubuntu-latest steps: - name: Install CMake Dependencies (Linux) @@ -148,10 +148,10 @@ jobs: cmake --workflow --preset=ci-StdShar-GNUC --fresh shell: bash - build_and_test_mac: + test_binary_mac: # MacOS w/ Clang + CMake # - name: "MacOS Clang CMake" + name: "MacOS Clang Binary Test" runs-on: macos-11 steps: - name: Install Dependencies (MacOS) From dcf3bbee7c202ac0939979da1c0a01f4eadc4993 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 10:08:02 -0600 Subject: [PATCH 03/15] Add build mode to binary names --- .github/workflows/cmake-bintest.yml | 6 +++--- .github/workflows/main-cmake.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 827032abb1f..b903f12809b 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -37,7 +37,7 @@ jobs: - name: Get published binary (Windows) uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: zip-vs2022_cl-binary + name: zip-vs2022_cl-${{ inputs.build_mode }}-binary path: ${{ github.workspace }}/hdf5 - name: Uncompress hdf5 binary (Win) @@ -108,7 +108,7 @@ jobs: - name: Get published binary (Linux) uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: tgz-ubuntu-2204_gcc-binary + name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary path: ${{ github.workspace }}/hdf5 - name: Uncompress hdf5 binary (Linux) @@ -166,7 +166,7 @@ jobs: - name: Get published binary (MacOS) uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: - name: tgz-osx12-binary + name: tgz-osx12-${{ inputs.build_mode }}-binary path: ${{ github.workspace }}/hdf5 - name: Uncompress hdf5 binary (MacOS) diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index db9d0afb434..de666a0ec5f 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -268,7 +268,7 @@ jobs: - name: Save published binary (Windows) uses: actions/upload-artifact@v4 with: - name: zip-vs2022_cl-binary + name: zip-vs2022_cl-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-win64.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` if: matrix.os == 'windows-latest' @@ -276,15 +276,15 @@ jobs: - name: Save published binary (linux) uses: actions/upload-artifact@v4 with: - name: tgz-ubuntu-2204_gcc-binary + name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` if: matrix.os == 'ubuntu-latest' - - name: Save published binary (linux) + - name: Save published binary (Mac) uses: actions/upload-artifact@v4 with: - name: tgz-osx12-binary + name: tgz-osx12-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` if: matrix.os == 'macos-13' From a5bee54cbc25287dbe30cf0387cc91717a5350a9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 12:48:15 -0600 Subject: [PATCH 04/15] Limit packaging execution --- .github/workflows/cmake-bintest.yml | 2 +- .github/workflows/cmake-ctest.yml | 2 +- .github/workflows/main-cmake.yml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index b903f12809b..f4cbdf001a2 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -152,7 +152,7 @@ jobs: # MacOS w/ Clang + CMake # name: "MacOS Clang Binary Test" - runs-on: macos-11 + runs-on: macos-13 steps: - name: Install Dependencies (MacOS) run: brew install ninja doxygen diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index 00fb7b485c2..ec694155abc 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -177,7 +177,7 @@ jobs: # MacOS w/ Clang + CMake # name: "MacOS Clang CMake" - runs-on: macos-11 + runs-on: macos-13 steps: - name: Install Dependencies (MacOS) run: brew install ninja diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index de666a0ec5f..eee74a2ba88 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -47,7 +47,7 @@ jobs: # # No Fortran, parallel, or VFDs that rely on POSIX things - name: "Windows MSVC" - os: windows-2022 + os: windows-latest toolchain: "" cpp: ON fortran: OFF @@ -271,7 +271,7 @@ jobs: name: zip-vs2022_cl-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-win64.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: matrix.os == 'windows-latest' + if: (matrix.os == 'windows-latest') && ! (matrix.thread_safety) - name: Save published binary (linux) uses: actions/upload-artifact@v4 @@ -279,7 +279,7 @@ jobs: name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: matrix.os == 'ubuntu-latest' + if: (matrix.os == 'ubuntu-latest') && ! (matrix.thread_safety) - name: Save published binary (Mac) uses: actions/upload-artifact@v4 @@ -287,7 +287,7 @@ jobs: name: tgz-osx12-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: matrix.os == 'macos-13' + if: (matrix.os == 'macos-13') && ! (matrix.thread_safety) # # The GitHub runners are inadequate for running parallel HDF5 tests, From 2b07b6e35b97b3d46761707ffe16a0a3c4ff9c70 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 13:24:35 -0600 Subject: [PATCH 05/15] Make mac DragNDrop optional --- CMakeInstallation.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index aae6d659f4a..9229c4e1a7e 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -356,7 +356,10 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) endif () elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") - list (APPEND CPACK_GENERATOR "DragNDrop") + option (HDF5_PACK_MACOSX_DMG "Package the HDF5 Library using DragNDrop" OFF) + if (HDF5_PACK_MACOSX_DMG) + list (APPEND CPACK_GENERATOR "DragNDrop") + endif () set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}/hdf.icns") From f2639a5491e98884c359ac6400f806fe76990e3c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 14:53:59 -0600 Subject: [PATCH 06/15] Format if checks --- .github/workflows/main-cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index eee74a2ba88..6b258e35b7b 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -271,7 +271,7 @@ jobs: name: zip-vs2022_cl-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-win64.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: (matrix.os == 'windows-latest') && ! (matrix.thread_safety) + if: ${{ (matrix.os == 'windows-latest') && ! (matrix.thread_safety) }} - name: Save published binary (linux) uses: actions/upload-artifact@v4 @@ -279,7 +279,7 @@ jobs: name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: (matrix.os == 'ubuntu-latest') && ! (matrix.thread_safety) + if: ${{ (matrix.os == 'ubuntu-latest') && ! (matrix.thread_safety) }} - name: Save published binary (Mac) uses: actions/upload-artifact@v4 @@ -287,7 +287,7 @@ jobs: name: tgz-osx12-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: (matrix.os == 'macos-13') && ! (matrix.thread_safety) + if: ${{ (matrix.os == 'macos-13') && ! (matrix.thread_safety) }} # # The GitHub runners are inadequate for running parallel HDF5 tests, From 06dab280da7df8836547645f281630b2fa9f9c3c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 15:23:20 -0600 Subject: [PATCH 07/15] fix checks for TS --- .github/workflows/cmake.yml | 8 ++++---- .github/workflows/main-cmake.yml | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8947ae9fbd3..af97cb66f21 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -19,28 +19,28 @@ jobs: name: "CMake Debug Thread-Safety Workflows" uses: ./.github/workflows/main-cmake.yml with: - thread_safety: true + thread_safety: "TS" build_mode: "Debug" call-release-thread-cmake: name: "CMake Release Thread-Safety Workflows" uses: ./.github/workflows/main-cmake.yml with: - thread_safety: true + thread_safety: "TS" build_mode: "Release" call-debug-cmake: name: "CMake Debug Workflows" uses: ./.github/workflows/main-cmake.yml with: - thread_safety: false + thread_safety: "" build_mode: "Debug" call-release-cmake: name: "CMake Release Workflows" uses: ./.github/workflows/main-cmake.yml with: - thread_safety: false + thread_safety: "" build_mode: "Release" call-release-bintest: diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 6b258e35b7b..958bad78652 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -5,9 +5,10 @@ on: workflow_call: inputs: thread_safety: - description: "thread-safety on/off" + description: "TS or empty" required: true - type: boolean + type: string + build_mode: description: "release vs. debug build" required: true @@ -112,7 +113,7 @@ jobs: # Sets the job's name from the properties - name: "${{ matrix.name }}-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}" + name: "${{ matrix.name }}-${{ inputs.build_mode }}-${{ inputs.thread_safety }}" # Don't run the action if the commit message says to skip CI if: "!contains(github.event.head_commit.message, 'skip-ci')" @@ -197,7 +198,7 @@ jobs: -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \ $GITHUB_WORKSPACE shell: bash - if: "! (matrix.thread_safety)" + if: ${{ ! inputs.thread_safety == 'TS' }} - name: CMake Configure (Thread-Safe) @@ -224,7 +225,7 @@ jobs: -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \ $GITHUB_WORKSPACE shell: bash - if: (matrix.thread_safety) + if: ${{ inputs.thread_safety == 'TS' }} # # BUILD @@ -243,14 +244,14 @@ jobs: - name: CMake Run Tests run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V working-directory: ${{ runner.workspace }}/build - if: (matrix.run_tests) && ! (matrix.thread_safety) + if: ${{ matrix.run_tests && (! inputs.thread_safety == 'TS') }} # THREAD-SAFE - name: CMake Run Thread-Safe Tests run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -R ttsafe working-directory: ${{ runner.workspace }}/build - if: (matrix.run_tests) && (matrix.thread_safety) + if: ${{ matrix.run_tests && (inputs.thread_safety == 'TS') }} # # INSTALL (note that this runs even when we don't run the tests) @@ -260,7 +261,7 @@ jobs: run: cpack -C ${{ inputs.build_mode }} -V working-directory: ${{ runner.workspace }}/build - - name: List files in the space (Windows) + - name: List files in the space run: | ls -l ${{ runner.workspace }}/build @@ -271,7 +272,7 @@ jobs: name: zip-vs2022_cl-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-win64.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: ${{ (matrix.os == 'windows-latest') && ! (matrix.thread_safety) }} + if: ${{ (matrix.os == 'windows-latest') && (! inputs.thread_safety == 'TS') }} - name: Save published binary (linux) uses: actions/upload-artifact@v4 @@ -279,7 +280,7 @@ jobs: name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: ${{ (matrix.os == 'ubuntu-latest') && ! (matrix.thread_safety) }} + if: ${{ (matrix.os == 'ubuntu-latest') && (! inputs.thread_safety == 'TS') }} - name: Save published binary (Mac) uses: actions/upload-artifact@v4 @@ -287,7 +288,7 @@ jobs: name: tgz-osx12-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: ${{ (matrix.os == 'macos-13') && ! (matrix.thread_safety) }} + if: ${{ (matrix.os == 'macos-13') && (! inputs.thread_safety == 'TS') }} # # The GitHub runners are inadequate for running parallel HDF5 tests, @@ -297,7 +298,7 @@ jobs: # Parallel Linux (Ubuntu) w/ gcc + Autotools # CMake_build_parallel: - name: "Parallel GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}" + name: "Parallel GCC-${{ inputs.build_mode }}" # Don't run the action if the commit message says to skip CI if: "!contains(github.event.head_commit.message, 'skip-ci')" From 6a22c8cd41970f13ec66d2b67df3830521622e94 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 15:37:05 -0600 Subject: [PATCH 08/15] Allow examples to be packaged --- .github/workflows/cmake-bintest.yml | 34 ++++++++++++++--------------- .github/workflows/main-cmake.yml | 3 +++ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index f4cbdf001a2..98785dcf726 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -38,22 +38,22 @@ jobs: uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: zip-vs2022_cl-${{ inputs.build_mode }}-binary - path: ${{ github.workspace }}/hdf5 + path: ${{ github.workspace }} - name: Uncompress hdf5 binary (Win) - working-directory: ${{ github.workspace }}/hdf5 + working-directory: ${{ github.workspace }} run: 7z x HDF5-*-win64.zip shell: bash - name: List files for the space (Win) run: | - ls -l ${{ github.workspace }}/hdf5 + ls -l ${{ github.workspace }} - name: create hdf5 location (Win) - working-directory: ${{ github.workspace }}/hdf5 + working-directory: ${{ github.workspace }} run: | New-Item -Path "${{ github.workspace }}/HDF_Group/HDF5" -ItemType Directory - Copy-Item -Path "${{ github.workspace }}/hdf5/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse + Copy-Item -Path "${{ github.workspace }}/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse shell: pwsh - name: List files for the space (Win) @@ -109,24 +109,24 @@ jobs: uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary - path: ${{ github.workspace }}/hdf5 + path: ${{ github.workspace }} - name: Uncompress hdf5 binary (Linux) run: | - cd "${{ github.workspace }}/hdf5" - tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Linux.tar.gz --strip-components 1 + cd "${{ github.workspace }}" + tar -zxvf ${{ github.workspace }}/HDF5-*-Linux.tar.gz --strip-components 1 - name: set hdf5lib name id: set-hdf5lib-name run: | - HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/ - FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5) + HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/ + FILE_NAME_HDF5=$(ls ${{ github.workspace }}/HDF_Group/HDF5) echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT echo "HDF5_PLUGIN_PATH=$HDF5_ROOT/lib/plugin" >> $GITHUB_OUTPUT - name: List files for the binaries (Linux) run: | - ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5 + ls -l ${{ github.workspace }}/HDF_Group/HDF5 - name: Set file base name (Linux) id: set-file-base @@ -167,24 +167,24 @@ jobs: uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: tgz-osx12-${{ inputs.build_mode }}-binary - path: ${{ github.workspace }}/hdf5 + path: ${{ github.workspace }} - name: Uncompress hdf5 binary (MacOS) run: | - cd "${{ github.workspace }}/hdf5" - tar -zxvf ${{ github.workspace }}/hdf5/HDF5-*-Darwin.tar.gz --strip-components 1 + cd "${{ github.workspace }}" + tar -zxvf ${{ github.workspace }}/HDF5-*-Darwin.tar.gz --strip-components 1 - name: set hdf5lib name id: set-hdf5lib-name run: | - HDF5DIR=${{ github.workspace }}/hdf5/HDF_Group/HDF5/ - FILE_NAME_HDF5=$(ls ${{ github.workspace }}/hdf5/HDF_Group/HDF5) + HDF5DIR=${{ github.workspace }}/HDF_Group/HDF5/ + FILE_NAME_HDF5=$(ls ${{ github.workspace }}/HDF_Group/HDF5) echo "HDF5_ROOT=$HDF5DIR$FILE_NAME_HDF5" >> $GITHUB_OUTPUT echo "HDF5_PLUGIN_PATH=$HDF5_ROOT/lib/plugin" >> $GITHUB_OUTPUT - name: List files for the binaries (MacOS) run: | - ls -l ${{ github.workspace }}/hdf5/HDF_Group/HDF5 + ls -l ${{ github.workspace }}/HDF_Group/HDF5 - name: Set file base name (MacOS) id: set-file-base diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 958bad78652..5ca37542632 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -196,6 +196,7 @@ jobs: -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \ -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \ -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \ + -DHDF5_PACK_EXAMPLES:BOOL=ON \ $GITHUB_WORKSPACE shell: bash if: ${{ ! inputs.thread_safety == 'TS' }} @@ -223,6 +224,7 @@ jobs: -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} \ -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \ -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \ + -DHDF5_PACK_EXAMPLES:BOOL=ON \ $GITHUB_WORKSPACE shell: bash if: ${{ inputs.thread_safety == 'TS' }} @@ -342,6 +344,7 @@ jobs: -DHDF5_ENABLE_MIRROR_VFD:BOOL=OFF \ -DHDF5_ENABLE_DIRECT_VFD:BOOL=OFF \ -DHDF5_ENABLE_ROS3_VFD:BOOL=OFF \ + -DHDF5_PACK_EXAMPLES:BOOL=ON \ $GITHUB_WORKSPACE shell: bash From 03d38587a6c1370abe1f7fc9ffa0057c013206e5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 15:56:25 -0600 Subject: [PATCH 09/15] Correct if NOT format --- .github/workflows/main-cmake.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 5ca37542632..e00eee28613 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -199,7 +199,7 @@ jobs: -DHDF5_PACK_EXAMPLES:BOOL=ON \ $GITHUB_WORKSPACE shell: bash - if: ${{ ! inputs.thread_safety == 'TS' }} + if: ${{ inputs.thread_safety != 'TS' }} - name: CMake Configure (Thread-Safe) @@ -246,7 +246,7 @@ jobs: - name: CMake Run Tests run: ctest . --parallel 2 -C ${{ inputs.build_mode }} -V working-directory: ${{ runner.workspace }}/build - if: ${{ matrix.run_tests && (! inputs.thread_safety == 'TS') }} + if: ${{ matrix.run_tests && (inputs.thread_safety != 'TS') }} # THREAD-SAFE @@ -274,7 +274,7 @@ jobs: name: zip-vs2022_cl-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-win64.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: ${{ (matrix.os == 'windows-latest') && (! inputs.thread_safety == 'TS') }} + if: ${{ (matrix.os == 'windows-latest') && (inputs.thread_safety != 'TS') }} - name: Save published binary (linux) uses: actions/upload-artifact@v4 @@ -282,7 +282,7 @@ jobs: name: tgz-ubuntu-2204_gcc-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Linux.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: ${{ (matrix.os == 'ubuntu-latest') && (! inputs.thread_safety == 'TS') }} + if: ${{ (matrix.os == 'ubuntu-latest') && (inputs.thread_safety != 'TS') }} - name: Save published binary (Mac) uses: actions/upload-artifact@v4 @@ -290,7 +290,7 @@ jobs: name: tgz-osx12-${{ inputs.build_mode }}-binary path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - if: ${{ (matrix.os == 'macos-13') && (! inputs.thread_safety == 'TS') }} + if: ${{ (matrix.os == 'macos-13') && (inputs.thread_safety != 'TS') }} # # The GitHub runners are inadequate for running parallel HDF5 tests, From 7a4e79ecebdf0302a1362b5bc323e3a21995b0e2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 16:06:19 -0600 Subject: [PATCH 10/15] Correct configure and workflow call --- .github/workflows/main-cmake.yml | 10 +++++----- .github/workflows/main.yml | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index e00eee28613..d479488dea8 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -83,7 +83,7 @@ jobs: mirror_vfd: ON direct_vfd: ON ros3_vfd: ON - toolchain: "config/toolchain/gcc.cmake" + toolchain: "-DCMAKE_TOOLCHAIN_FILE=config/toolchain/gcc.cmake" generator: "-G Ninja" run_tests: true @@ -106,7 +106,7 @@ jobs: mirror_vfd: ON direct_vfd: OFF ros3_vfd: OFF - toolchain: "config/toolchain/clang.cmake" + toolchain: "-DCMAKE_TOOLCHAIN_FILE=config/toolchain/clang.cmake" generator: "-G Ninja" run_tests: true @@ -182,7 +182,7 @@ jobs: cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ ${{ matrix.generator }} \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ - -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \ + ${{ matrix.toolchain }} \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_ENABLE_ALL_WARNINGS=ON \ -DHDF5_ENABLE_DOXY_WARNINGS=ON \ @@ -209,7 +209,7 @@ jobs: cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ ${{ matrix.generator }} \ -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ - -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \ + ${{ matrix.toolchain }} \ -DBUILD_SHARED_LIBS=ON \ -DHDF5_ENABLE_ALL_WARNINGS=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ @@ -302,7 +302,7 @@ jobs: CMake_build_parallel: name: "Parallel GCC-${{ inputs.build_mode }}" # Don't run the action if the commit message says to skip CI - if: "!contains(github.event.head_commit.message, 'skip-ci')" + if: ${{ inputs.thread_safety != 'TS' }} # The type of runner that the job will run on runs-on: ubuntu-latest diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43513c51a26..3f878b1b8fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,10 @@ jobs: workflow-autotools: name: "Autotools Workflows" uses: ./.github/workflows/autotools.yml + if: "!contains(github.event.head_commit.message, 'skip-ci')" workflow-cmake: name: "CMake Workflows" uses: ./.github/workflows/cmake.yml + if: "!contains(github.event.head_commit.message, 'skip-ci')" + From d857ef261639f7cab68d185075731b22f7a59e32 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 29 Jan 2024 17:08:34 -0600 Subject: [PATCH 11/15] Separate out CMake/Autotools Parallel job --- .github/workflows/autotools.yml | 12 +++ .github/workflows/cmake.yml | 14 ++- .github/workflows/main-auto-par-spc.yml | 137 ++++++++++++++++++++++++ .github/workflows/main-auto-par.yml | 104 ++++-------------- .github/workflows/main-auto.yml | 60 ----------- .github/workflows/main-cmake-par.yml | 77 +++++++++++++ .github/workflows/main-cmake.yml | 62 +---------- 7 files changed, 262 insertions(+), 204 deletions(-) create mode 100644 .github/workflows/main-auto-par-spc.yml create mode 100644 .github/workflows/main-cmake-par.yml diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index d0cf5577738..4075b259d79 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -17,7 +17,19 @@ jobs: call-parallel-special-autotools: name: "Autotools Parallel Special Workflows" + uses: ./.github/workflows/main-auto-par-spc.yml + + call-debug-parallel-autotools: + name: "Autotools Parallel Workflows" uses: ./.github/workflows/main-auto-par.yml + with: + build_mode: "debug" + + call-release-parallel-autotools: + name: "Autotools Parallel Workflows" + uses: ./.github/workflows/main-auto-par.yml + with: + build_mode: "production" call-debug-thread-autotools: name: "Autotools Debug Thread-Safety Workflows" diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index af97cb66f21..7911be7354e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -44,12 +44,24 @@ jobs: build_mode: "Release" call-release-bintest: - name: CMake Test Release Binaries + name: "CMake Test Release Binaries" needs: call-release-cmake uses: ./.github/workflows/cmake-bintest.yml with: build_mode: "Release" + call-release-par: + name: "CMake Parallel Release Workflows" + uses: ./.github/workflows/main-cmake-par.yml + with: + build_mode: "Release" + + call-debug-par: + name: "CMake Parallel Debug Workflows" + uses: ./.github/workflows/main-cmake-par.yml + with: + build_mode: "Debug" + call-release-cmake-intel: name: "CMake Intel Workflows" uses: ./.github/workflows/intel-cmake.yml diff --git a/.github/workflows/main-auto-par-spc.yml b/.github/workflows/main-auto-par-spc.yml new file mode 100644 index 00000000000..f6c3316a638 --- /dev/null +++ b/.github/workflows/main-auto-par-spc.yml @@ -0,0 +1,137 @@ +name: hdf5 dev autotools parallel special CI + +# Controls when the action will run. Triggers the workflow on a call +on: + workflow_call: + +permissions: + contents: read + +# A workflow run is made up of one or more jobs that can run sequentially or +# in parallel. We just have one job, but the matrix items defined below will +# run in parallel. +jobs: + # + # SPECIAL AUTOTOOLS BUILDS + # + # These do not run tests and are not built into the matrix and instead + # become NEW configs as their name would clobber one of the matrix + # names (so make sure the names are UNIQUE). + # + + build_parallel_debug_werror: + name: "gcc DBG parallel -Werror (build only)" + runs-on: ubuntu-latest + steps: + # SETUP + # Only CMake need ninja-build, but we just install it unilaterally + # libssl, etc. are needed for the ros3 VFD + - name: Install Linux Dependencies + run: | + sudo apt update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + sudo apt install automake autoconf libtool libtool-bin + sudo apt install libaec0 libaec-dev + sudo apt install openmpi-bin openmpi-common mpi-default-dev + echo "CC=mpicc" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4.1.1 + + # AUTOTOOLS CONFIGURE + - name: Autotools Configure + run: | + sh ./autogen.sh + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + CFLAGS=-Werror $GITHUB_WORKSPACE/configure \ + --enable-build-mode=debug \ + --enable-deprecated-symbols \ + --with-default-api-version=v114 \ + --enable-shared \ + --enable-parallel \ + --enable-subfiling-vfd \ + --disable-cxx \ + --disable-fortran \ + --disable-java \ + --disable-mirror-vfd \ + --enable-direct-vfd \ + --disable-ros3-vfd \ + shell: bash + + # BUILD + - name: Autotools Build + run: make -j3 + working-directory: ${{ runner.workspace }}/build + + # INSTALL (note that this runs even when we don't run the tests) + - name: Autotools Install + run: make install + working-directory: ${{ runner.workspace }}/build + + - name: Autotools Verify Install + run: make check-install + working-directory: ${{ runner.workspace }}/build + + build_parallel_release_werror: + name: "gcc REL parallel -Werror (build only)" + runs-on: ubuntu-latest + steps: + # SETUP + # Only CMake need ninja-build, but we just install it unilaterally + # libssl, etc. are needed for the ros3 VFD + - name: Install Linux Dependencies + run: | + sudo apt update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + sudo apt install automake autoconf libtool libtool-bin + sudo apt install libaec0 libaec-dev + sudo apt install openmpi-bin openmpi-common mpi-default-dev + echo "CC=mpicc" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4.1.1 + + # AUTOTOOLS CONFIGURE + - name: Autotools Configure + run: | + sh ./autogen.sh + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + CFLAGS=-Werror $GITHUB_WORKSPACE/configure \ + --enable-build-mode=production \ + --enable-deprecated-symbols \ + --with-default-api-version=v114 \ + --enable-shared \ + --enable-parallel \ + --enable-subfiling-vfd \ + --disable-cxx \ + --disable-fortran \ + --disable-java \ + --disable-mirror-vfd \ + --enable-direct-vfd \ + --disable-ros3-vfd \ + shell: bash + + # BUILD + - name: Autotools Build + run: make -j3 + working-directory: ${{ runner.workspace }}/build + + # INSTALL (note that this runs even when we don't run the tests) + - name: Autotools Install + run: make install + working-directory: ${{ runner.workspace }}/build + + - name: Autotools Verify Install + run: make check-install + working-directory: ${{ runner.workspace }}/build + diff --git a/.github/workflows/main-auto-par.yml b/.github/workflows/main-auto-par.yml index 70cf4bdb667..9f1522a3e58 100644 --- a/.github/workflows/main-auto-par.yml +++ b/.github/workflows/main-auto-par.yml @@ -1,8 +1,13 @@ -name: hdf5 dev autotools CI +name: hdf5 dev autotools parallel CI # Controls when the action will run. Triggers the workflow on a call on: workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string permissions: contents: read @@ -12,78 +17,23 @@ permissions: # run in parallel. jobs: # - # SPECIAL AUTOTOOLS BUILDS - # - # These do not run tests and are not built into the matrix and instead - # become NEW configs as their name would clobber one of the matrix - # names (so make sure the names are UNIQUE). + # The GitHub runners are inadequate for running parallel HDF5 tests, + # so we catch most issues in daily testing. What we have here is just + # a compile check to make sure nothing obvious is broken. + # A workflow that builds the library + # Parallel Linux (Ubuntu) w/ gcc + Autotools # + Autotools_build_parallel: + name: "Parallel GCC-${{ inputs.build_mode }}" + # Don't run the action if the commit message says to skip CI + if: "!contains(github.event.head_commit.message, 'skip-ci')" - build_parallel_debug_werror: - name: "gcc DBG parallel -Werror (build only)" + # The type of runner that the job will run on runs-on: ubuntu-latest - steps: - # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - - name: Install Linux Dependencies - run: | - sudo apt update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.1 - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CFLAGS=-Werror $GITHUB_WORKSPACE/configure \ - --enable-build-mode=debug \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --enable-parallel \ - --enable-subfiling-vfd \ - --disable-cxx \ - --disable-fortran \ - --disable-java \ - --disable-mirror-vfd \ - --enable-direct-vfd \ - --disable-ros3-vfd \ - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - - build_parallel_release_werror: - name: "gcc REL parallel -Werror (build only)" - runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job steps: # SETUP - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - name: Install Linux Dependencies run: | sudo apt update @@ -106,32 +56,22 @@ jobs: sh ./autogen.sh mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - CFLAGS=-Werror $GITHUB_WORKSPACE/configure \ - --enable-build-mode=production \ + CC=mpicc $GITHUB_WORKSPACE/configure \ + --enable-build-mode=${{ inputs.build_mode }} \ --enable-deprecated-symbols \ --with-default-api-version=v114 \ --enable-shared \ --enable-parallel \ - --enable-subfiling-vfd \ --disable-cxx \ - --disable-fortran \ + --enable-fortran \ --disable-java \ --disable-mirror-vfd \ - --enable-direct-vfd \ + --disable-direct-vfd \ --disable-ros3-vfd \ + --with-szlib=yes shell: bash # BUILD - name: Autotools Build run: make -j3 working-directory: ${{ runner.workspace }}/build - - # INSTALL (note that this runs even when we don't run the tests) - - name: Autotools Install - run: make install - working-directory: ${{ runner.workspace }}/build - - - name: Autotools Verify Install - run: make check-install - working-directory: ${{ runner.workspace }}/build - diff --git a/.github/workflows/main-auto.yml b/.github/workflows/main-auto.yml index 57b1c3d8fd6..51ddfdb628c 100644 --- a/.github/workflows/main-auto.yml +++ b/.github/workflows/main-auto.yml @@ -120,63 +120,3 @@ jobs: - name: Autotools Verify Install run: make check-install working-directory: ${{ runner.workspace }}/build - - # - # The GitHub runners are inadequate for running parallel HDF5 tests, - # so we catch most issues in daily testing. What we have here is just - # a compile check to make sure nothing obvious is broken. - # A workflow that builds the library - # Parallel Linux (Ubuntu) w/ gcc + Autotools - # - Autotools_build_parallel: - name: "Parallel GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}d" - # Don't run the action if the commit message says to skip CI - if: "!contains(github.event.head_commit.message, 'skip-ci')" - - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # SETUP - - name: Install Linux Dependencies - run: | - sudo apt update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.1 - - # AUTOTOOLS CONFIGURE - - name: Autotools Configure - run: | - sh ./autogen.sh - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CC=mpicc $GITHUB_WORKSPACE/configure \ - --enable-build-mode=${{ inputs.build_mode }} \ - --enable-deprecated-symbols \ - --with-default-api-version=v114 \ - --enable-shared \ - --enable-parallel \ - --disable-cxx \ - --enable-fortran \ - --disable-java \ - --disable-mirror-vfd \ - --disable-direct-vfd \ - --disable-ros3-vfd \ - --with-szlib=yes - shell: bash - - # BUILD - - name: Autotools Build - run: make -j3 - working-directory: ${{ runner.workspace }}/build diff --git a/.github/workflows/main-cmake-par.yml b/.github/workflows/main-cmake-par.yml new file mode 100644 index 00000000000..faecefcd952 --- /dev/null +++ b/.github/workflows/main-cmake-par.yml @@ -0,0 +1,77 @@ +name: hdf5 dev PAR CMake CI + +# Controls when the action will run. Triggers the workflow on a call +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +permissions: + contents: read + +# A workflow run is made up of one or more jobs that can run sequentially or +# in parallel. We just have one job, but the matrix items defined below will +# run in parallel. +jobs: + # + # The GitHub runners are inadequate for running parallel HDF5 tests, + # so we catch most issues in daily testing. What we have here is just + # a compile check to make sure nothing obvious is broken. + # A workflow that builds the library + # Parallel Linux (Ubuntu) w/ gcc + Autotools + # + CMake_build_parallel: + name: "Parallel GCC-${{ inputs.build_mode }}" + # Don't run the action if the commit message says to skip CI + if: ${{ inputs.thread_safety != 'TS' }} + + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # SETUP + - name: Install Linux Dependencies + run: | + sudo apt update + sudo apt-get install ninja-build doxygen graphviz + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev + sudo apt install gcc-12 g++-12 gfortran-12 + sudo apt install libaec0 libaec-dev + sudo apt install openmpi-bin openmpi-common mpi-default-dev + echo "CC=mpicc" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4.1.1 + + # CMAKE CONFIGURE + - name: CMake Configure + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ + -DBUILD_SHARED_LIBS=ON \ + -DHDF5_ENABLE_ALL_WARNINGS=ON \ + -DHDF5_ENABLE_PARALLEL:BOOL=ON \ + -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ + -DHDF5_BUILD_FORTRAN=ON \ + -DHDF5_BUILD_JAVA=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DHDF5_ENABLE_MIRROR_VFD:BOOL=OFF \ + -DHDF5_ENABLE_DIRECT_VFD:BOOL=OFF \ + -DHDF5_ENABLE_ROS3_VFD:BOOL=OFF \ + -DHDF5_PACK_EXAMPLES:BOOL=ON \ + $GITHUB_WORKSPACE + shell: bash + + # BUILD + - name: CMake Build + run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }} + working-directory: ${{ runner.workspace }}/build diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index d479488dea8..316cfd82fc6 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -211,6 +211,7 @@ jobs: -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ ${{ matrix.toolchain }} \ -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=${{ (matrix.os != 'windows-latest') }} \ -DHDF5_ENABLE_ALL_WARNINGS=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \ @@ -291,64 +292,3 @@ jobs: path: ${{ runner.workspace }}/build/HDF5-*-Darwin.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` if: ${{ (matrix.os == 'macos-13') && (inputs.thread_safety != 'TS') }} - - # - # The GitHub runners are inadequate for running parallel HDF5 tests, - # so we catch most issues in daily testing. What we have here is just - # a compile check to make sure nothing obvious is broken. - # A workflow that builds the library - # Parallel Linux (Ubuntu) w/ gcc + Autotools - # - CMake_build_parallel: - name: "Parallel GCC-${{ inputs.build_mode }}" - # Don't run the action if the commit message says to skip CI - if: ${{ inputs.thread_safety != 'TS' }} - - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # SETUP - - name: Install Linux Dependencies - run: | - sudo apt update - sudo apt-get install ninja-build doxygen graphviz - sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev - sudo apt install gcc-12 g++-12 gfortran-12 - sudo apt install libaec0 libaec-dev - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.1 - - # CMAKE CONFIGURE - - name: CMake Configure - run: | - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - CC=mpicc cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ - -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ - -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \ - -DBUILD_SHARED_LIBS=ON \ - -DHDF5_ENABLE_ALL_WARNINGS=ON \ - -DHDF5_ENABLE_PARALLEL:BOOL=ON \ - -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ - -DHDF5_BUILD_FORTRAN=ON \ - -DHDF5_BUILD_JAVA=OFF \ - -DLIBAEC_USE_LOCALCONTENT=OFF \ - -DZLIB_USE_LOCALCONTENT=OFF \ - -DHDF5_ENABLE_MIRROR_VFD:BOOL=OFF \ - -DHDF5_ENABLE_DIRECT_VFD:BOOL=OFF \ - -DHDF5_ENABLE_ROS3_VFD:BOOL=OFF \ - -DHDF5_PACK_EXAMPLES:BOOL=ON \ - $GITHUB_WORKSPACE - shell: bash - - # BUILD - - name: CMake Build - run: cmake --build . --parallel 3 --config ${{ inputs.build_mode }} - working-directory: ${{ runner.workspace }}/build From 8d824c2b1c2597121304778483dd33117df08a24 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jan 2024 08:15:21 -0600 Subject: [PATCH 12/15] Correct binary examples path --- .github/workflows/cmake-bintest.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 98785dcf726..99101d0e595 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -50,10 +50,10 @@ jobs: ls -l ${{ github.workspace }} - name: create hdf5 location (Win) - working-directory: ${{ github.workspace }} + working-directory: ${{ github.workspace }}/hdf5 run: | New-Item -Path "${{ github.workspace }}/HDF_Group/HDF5" -ItemType Directory - Copy-Item -Path "${{ github.workspace }}/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse + Copy-Item -Path "${{ github.workspace }}/hdf5/HDF*/*" -Destination "${{ github.workspace }}/HDF_Group/HDF5" -Recurse shell: pwsh - name: List files for the space (Win) @@ -144,7 +144,7 @@ jobs: HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} run: | - cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDF5Examples" + cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDF5Examples" cmake --workflow --preset=ci-StdShar-GNUC --fresh shell: bash @@ -211,7 +211,7 @@ jobs: HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} run: | - cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDF5Examples" + cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDF5Examples" cmake --workflow --preset=ci-StdShar-Clang --fresh shell: bash From 5c3b110a7abef52e665d63f0e580f627efb4cdae Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jan 2024 10:20:02 -0600 Subject: [PATCH 13/15] Correct dir path for windows test --- .github/workflows/cmake-bintest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 99101d0e595..5c956c6115d 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -41,13 +41,14 @@ jobs: path: ${{ github.workspace }} - name: Uncompress hdf5 binary (Win) - working-directory: ${{ github.workspace }} + working-directory: ${{ github.workspace }}/hdf5 run: 7z x HDF5-*-win64.zip shell: bash - name: List files for the space (Win) run: | ls -l ${{ github.workspace }} + ls -l ${{ github.workspace }}/hdf5 - name: create hdf5 location (Win) working-directory: ${{ github.workspace }}/hdf5 From 7bed79a4395bd03b2003b2c2d2a95cdc4df9993b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jan 2024 11:01:59 -0600 Subject: [PATCH 14/15] Correct paths and add extlibs --- .github/workflows/cmake-bintest.yml | 2 +- .github/workflows/main-cmake.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 5c956c6115d..29a74b60b8d 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -38,7 +38,7 @@ jobs: uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: zip-vs2022_cl-${{ inputs.build_mode }}-binary - path: ${{ github.workspace }} + path: ${{ github.workspace }}/hdf5 - name: Uncompress hdf5 binary (Win) working-directory: ${{ github.workspace }}/hdf5 diff --git a/.github/workflows/main-cmake.yml b/.github/workflows/main-cmake.yml index 316cfd82fc6..14e1effd138 100644 --- a/.github/workflows/main-cmake.yml +++ b/.github/workflows/main-cmake.yml @@ -197,6 +197,7 @@ jobs: -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} \ -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} \ -DHDF5_PACK_EXAMPLES:BOOL=ON \ + -DHDF5_PACKAGE_EXTLIBS:BOOL=ON \ $GITHUB_WORKSPACE shell: bash if: ${{ inputs.thread_safety != 'TS' }} From 97f282eefacfe41c01de9a8d207b4d1bc6db0ae1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 30 Jan 2024 11:24:22 -0600 Subject: [PATCH 15/15] Windows binaries do not have a share folder --- .github/workflows/cmake-bintest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index 29a74b60b8d..e076bba76dc 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -87,7 +87,7 @@ jobs: HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} HDF5_PLUGIN_PATH: ${{ steps.set-hdf5lib-name.outputs.HDF5_PLUGIN_PATH }} run: | - cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/share/HDF5Examples" + cd "${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }}/HDF5Examples" cmake --workflow --preset=ci-StdShar-MSVC --fresh shell: bash