From 6f921876edc77f60a24b46efc0e0032013e141f7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Mar 2024 09:51:05 -0500 Subject: [PATCH 1/3] Merge julia workflows into standard ci format --- .github/workflows/autotools.yml | 6 ++ .github/workflows/cmake.yml | 6 ++ .github/workflows/julia-auto.yml | 80 +++++++++++++++++++++++++++ .github/workflows/julia-cmake.yml | 82 ++++++++++++++++++++++++++++ .github/workflows/lin-auto-jl.yml | 59 -------------------- .github/workflows/lin-jl.yml | 61 --------------------- .github/workflows/mingw-cmake.yml | 91 ------------------------------- 7 files changed, 174 insertions(+), 211 deletions(-) create mode 100644 .github/workflows/julia-auto.yml create mode 100644 .github/workflows/julia-cmake.yml delete mode 100644 .github/workflows/lin-auto-jl.yml delete mode 100644 .github/workflows/lin-jl.yml delete mode 100644 .github/workflows/mingw-cmake.yml diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index b75e75d639f..5be31f72300 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -83,4 +83,10 @@ jobs: with: build_mode: "production" + call-release-cmake-julia: + name: "Autotools Julia Workflows" + uses: ./.github/workflows/julia-auto.yml + with: + build_mode: "production" + \ No newline at end of file diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c0077ce9207..4a52424c2b2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -85,4 +85,10 @@ jobs: uses: ./.github/workflows/cygwin-cmake.yml with: build_mode: "Release" + + call-release-cmake-julia: + name: "CMake Julia Workflows" + uses: ./.github/workflows/julia-cmake.yml + with: + build_mode: "Release" \ No newline at end of file diff --git a/.github/workflows/julia-auto.yml b/.github/workflows/julia-auto.yml new file mode 100644 index 00000000000..020a81691fe --- /dev/null +++ b/.github/workflows/julia-auto.yml @@ -0,0 +1,80 @@ +name: hdf5 dev autotools julia + +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +permissions: + contents: read + +jobs: + julia_build_and_test: + name: "julia ${{ inputs.build_mode }}" + runs-on: ubuntu-latest + steps: + - name: Get Sources + uses: actions/checkout@v4.1.1 + + - name: Install Dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install autoconf automake libtool libtool-bin libaec-dev + sudo apt-get install doxygen graphviz + sudo apt install -y zlib1g-dev libcurl4-openssl-dev libjpeg-dev wget curl bzip2 + sudo apt install -y m4 flex bison cmake libzip-dev openssl build-essential + + - name: Autotools Configure + shell: bash + run: | + sh ./autogen.sh + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + $GITHUB_WORKSPACE/configure \ + FCFLAGS="-fPIC -fortranlibs" \ + --enable-build-mode=${{ inputs.build_mode }} \ + --disable-fortran \ + --enable-shared \ + --disable-parallel \ + --prefix=/tmp + + - name: Autotools Build + shell: bash + run: | + make -j3 + working-directory: ${{ runner.workspace }}/build + + - name: Install HDF5 + shell: bash + run: | + make install + working-directory: ${{ runner.workspace }}/build + + - name: Install julia + uses: julia-actions/setup-julia@latest + with: + version: '1.6' + arch: 'x64' + + - name: Get julia hdf5 source + uses: actions/checkout@v4.1.1 + with: + repository: JuliaIO/HDF5.jl + path: . + + - name: Generate LocalPreferences + run: | + echo '[HDF5]' >> LocalPreferences.toml + echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml + echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml + + - uses: julia-actions/julia-buildpkg@latest + + - name: Julia Run Tests + uses: julia-actions/julia-runtest@latest + env: + JULIA_DEBUG: Main diff --git a/.github/workflows/julia-cmake.yml b/.github/workflows/julia-cmake.yml new file mode 100644 index 00000000000..52931bbe917 --- /dev/null +++ b/.github/workflows/julia-cmake.yml @@ -0,0 +1,82 @@ +name: hdf5 dev CMake julia + +on: + workflow_call: + inputs: + build_mode: + description: "release vs. debug build" + required: true + type: string + +permissions: + contents: read + +jobs: + julia_build_and_test: + name: "julia ${{ inputs.build_mode }}" + runs-on: ubuntu-latest + steps: + - name: Get Sources + uses: actions/checkout@v4.1.1 + + - name: Install Dependencies + shell: bash + 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 -y libaec-dev zlib1g-dev wget curl bzip2 flex bison cmake libzip-dev openssl build-essential + + - name: CMake Configure + shell: bash + run: | + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ + -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ + -DHDF5_ENABLE_PARALLEL:BOOL=OFF \ + -DHDF5_BUILD_CPP_LIB:BOOL=OFF \ + -DLIBAEC_USE_LOCALCONTENT=OFF \ + -DZLIB_USE_LOCALCONTENT=OFF \ + -DHDF5_BUILD_FORTRAN:BOOL=OFF \ + -DHDF5_BUILD_JAVA:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX=/tmp \ + $GITHUB_WORKSPACE + + - name: CMake Build + shell: bash + run: | + cmake --build . --parallel 3 --config ${{ inputs.build_mode }} + working-directory: ${{ runner.workspace }}/build + + - name: Install HDF5 + shell: bash + run: | + make install + working-directory: ${{ runner.workspace }}/build + + - name: Install julia + uses: julia-actions/setup-julia@latest + with: + version: '1.6' + arch: 'x64' + + - name: Get julia hdf5 source + uses: actions/checkout@v4.1.1 + with: + repository: JuliaIO/HDF5.jl + path: . + + - name: Generate LocalPreferences + run: | + echo '[HDF5]' >> LocalPreferences.toml + echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml + echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml + + - uses: julia-actions/julia-buildpkg@latest + + - name: Julia Run Tests + uses: julia-actions/julia-runtest@latest + env: + JULIA_DEBUG: Main diff --git a/.github/workflows/lin-auto-jl.yml b/.github/workflows/lin-auto-jl.yml deleted file mode 100644 index 2cc96ea77ac..00000000000 --- a/.github/workflows/lin-auto-jl.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: lin auto jl - -on: - workflow_dispatch: - push: - pull_request: - branches: [ develop ] - paths-ignore: - - '.github/CODEOWNERS' - - '.github/FUNDING.yml' - - 'doc/**' - - 'release_docs/**' - - 'ACKNOWLEDGEMENTS' - - 'COPYING**' - - '**.md' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - Julia: - name: Julia - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: HDFGroup/hdf5 - path: hdf5 - - name: Install HDF5 - run: | - cd hdf5 - ./autogen.sh - ./configure --prefix=/tmp - make -j - make install - - - uses: julia-actions/setup-julia@latest - with: - version: '1.6' - arch: 'x64' - - uses: actions/checkout@v4 - with: - repository: JuliaIO/HDF5.jl - path: . - - - name: Generate LocalPreferences - run: | - echo '[HDF5]' >> LocalPreferences.toml - echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml - echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml - - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest - env: - JULIA_DEBUG: Main diff --git a/.github/workflows/lin-jl.yml b/.github/workflows/lin-jl.yml deleted file mode 100644 index 23839a1b57c..00000000000 --- a/.github/workflows/lin-jl.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: lin jl - -on: - workflow_dispatch: - push: - pull_request: - branches: [ develop ] - paths-ignore: - - '.github/CODEOWNERS' - - '.github/FUNDING.yml' - - 'doc/**' - - 'release_docs/**' - - 'ACKNOWLEDGEMENTS' - - 'COPYING**' - - '**.md' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - Julia: - name: Julia - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: HDFGroup/hdf5 - path: hdf5 - - name: Install HDF5 - run: | - cd hdf5 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/tmp .. - make -j - make install - cd .. - - - uses: julia-actions/setup-julia@latest - with: - version: '1.6' - arch: 'x64' - - uses: actions/checkout@v4 - with: - repository: JuliaIO/HDF5.jl - path: . - - - name: Generate LocalPreferences - run: | - echo '[HDF5]' >> LocalPreferences.toml - echo 'libhdf5 = "/tmp/lib/libhdf5.so"' >> LocalPreferences.toml - echo 'libhdf5_hl = "/tmp/lib/libhdf5_hl.so"' >> LocalPreferences.toml - - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest - env: - JULIA_DEBUG: Main diff --git a/.github/workflows/mingw-cmake.yml b/.github/workflows/mingw-cmake.yml deleted file mode 100644 index 47613189cd2..00000000000 --- a/.github/workflows/mingw-cmake.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: hdf5 dev CMake MinGW - -on: - workflow_call: - inputs: - build_mode: - description: "release vs. debug build" - required: true - type: string - shared: - description: "shared true/false" - required: true - type: string - netcdf: - description: "netcdf true/false" - required: true - type: string - -permissions: - contents: read - -jobs: - mingw_build_and_test: - name: "mingw-${{ inputs.build_mode }}-NC=${{ inputs.netcdf }}" - if: "!contains(github.event.head_commit.message, 'skip-ci')" - runs-on: ubuntu-latest - steps: - - name: Get Sources - uses: actions/checkout@v4.1.1 - - - name: Install Dependencies - shell: bash - run: | - sudo apt update - sudo apt-get install -y ninja-build libtirpc-dev graphviz - - - name: Install MinGW - uses: egor-tensin/setup-mingw@v2 - with: - platform: x64 - - - name: Install Doxygen - uses: ssciwr/doxygen-install@v1 - with: - version: "1.9.7" - - - name: CMake Configure - shell: bash - run: | - mkdir "${{ runner.workspace }}/build" - cd "${{ runner.workspace }}/build" - cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \ - -G Ninja \ - --log-level=VERBOSE \ - -DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \ - -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/config/toolchain/mingw64.cmake \ - -DBUILD_SHARED_LIBS:BOOL=${{ inputs.shared }} \ - -DHDF4_BUILD_EXAMPLES:BOOL=ON \ - -DBUILD_JPEG_WITH_PIC:BOOL=ON \ - -DHDF4_ENABLE_NETCDF:BOOL=${{ inputs.netcdf }} \ - -DHDF4_BUILD_FORTRAN:BOOL=OFF \ - -DHDF4_BUILD_JAVA:BOOL=OFF \ - -DHDF4_BUILD_DOC:BOOL=ON \ - -DJPEG_USE_LOCALCONTENT:BOOL=OFF \ - -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF \ - -DZLIB_USE_LOCALCONTENT:BOOL=OFF \ - -DHDF4_PACK_EXAMPLES:BOOL=ON \ - -DHDF4_PACKAGE_EXTLIBS:BOOL=ON \ - $GITHUB_WORKSPACE - - - name: CMake Build - shell: bash - run: | - cmake --build . --parallel 3 --config ${{ inputs.build_mode }} - working-directory: ${{ runner.workspace }}/build - - - name: CMake Run Tests - shell: bash - run: | - ctest . --parallel 2 -C ${{ inputs.build_mode }} -V - if: false - - - name: CMake Package - shell: bash - run: | - cpack -C ${{ inputs.build_mode }} -V - working-directory: ${{ runner.workspace }}/build - - - name: List files in the space - run: | - ls -l ${{ runner.workspace }}/build From 8163dc8d8e5636a1aa4aadff59f00bcfc3eb2013 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Mar 2024 10:45:43 -0500 Subject: [PATCH 2/3] Correct cmake install step --- .github/workflows/julia-cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/julia-cmake.yml b/.github/workflows/julia-cmake.yml index 52931bbe917..fb1de96f197 100644 --- a/.github/workflows/julia-cmake.yml +++ b/.github/workflows/julia-cmake.yml @@ -53,7 +53,7 @@ jobs: - name: Install HDF5 shell: bash run: | - make install + cmake --install . working-directory: ${{ runner.workspace }}/build - name: Install julia From 77909005350c705acb0c4e93258ba55004cd871f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Mar 2024 13:00:24 -0500 Subject: [PATCH 3/3] remove unused flags --- .github/workflows/julia-auto.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/julia-auto.yml b/.github/workflows/julia-auto.yml index 020a81691fe..a7dd2ab15b9 100644 --- a/.github/workflows/julia-auto.yml +++ b/.github/workflows/julia-auto.yml @@ -35,7 +35,6 @@ jobs: mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" $GITHUB_WORKSPACE/configure \ - FCFLAGS="-fPIC -fortranlibs" \ --enable-build-mode=${{ inputs.build_mode }} \ --disable-fortran \ --enable-shared \