Skip to content

Commit

Permalink
Add mac dmg binary and remove old macos-13 workflows (#4699)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Aug 8, 2024
1 parent 5c39fdd commit 3355a5e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 183 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/cmake-bintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,67 +143,6 @@ jobs:
cmake --workflow --preset=ci-StdShar-GNUC --fresh
shell: bash

test_binary_mac:
# MacOS w/ Clang + CMake
#
name: "MacOS Clang Binary Test"
runs-on: macos-13
steps:
- name: Install Dependencies (MacOS)
run: brew install ninja doxygen

- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'

- name: Get published binary (MacOS)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: tgz-osx13-${{ inputs.build_mode }}-binary
path: ${{ github.workspace }}

- name: Uncompress hdf5 binary (MacOS)
run: |
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 }}/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 }}/HDF_Group/HDF5
- 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 }}/share/HDF5Examples"
cmake --workflow --preset=ci-StdShar-OSX-Clang --fresh
shell: bash

test_binary_mac_latest:
# MacOS w/ Clang + CMake
#
Expand Down
108 changes: 19 additions & 89 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,95 +261,6 @@ jobs:
path: ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/hdf5lib_docs/html
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_mac:
# MacOS w/ Clang + CMake
#
name: "MacOS Clang CMake"
runs-on: macos-13
steps:
- name: Install Dependencies (MacOS)
run: brew install ninja

- name: Install Dependencies
uses: ssciwr/doxygen-install@v1
with:
version: "1.9.7"

- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'temurin'

- 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
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
# Get files created by release script
- name: Get tgz-tarball (MacOS)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: tgz-tarball
path: ${{ github.workspace }}

- name: List files for the space (MacOS)
run: |
ls ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress source (MacOS)
run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz

# 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
run: |
cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}"
cmake --workflow --preset=${{ inputs.preset_name }}-OSX-Clang --fresh
shell: bash

- name: Publish binary (MacOS)
id: publish-ctest-binary
run: |
mkdir "${{ runner.workspace }}/build"
mkdir "${{ runner.workspace }}/build/hdf5"
cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/README.md ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5
cd "${{ runner.workspace }}/build"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx13.tar.gz hdf5
shell: bash

- name: List files in the space (MacOS)
run: |
ls ${{ github.workspace }}
ls -l ${{ runner.workspace }}
# Save files created by ctest script
- name: Save published binary (MacOS)
uses: actions/upload-artifact@v4
with:
name: tgz-osx13-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx13.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_mac_latest:
# MacOS w/ Clang + CMake
#
Expand Down Expand Up @@ -426,6 +337,18 @@ jobs:
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz hdf5
shell: bash

- name: Publish dmg binary (MacOS_latest)
id: publish-ctest-dmg-binary
run: |
mkdir "${{ runner.workspace }}/build/hdf5dmg"
cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5dmg
cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5dmg
cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/README.md ${{ runner.workspace }}/build/hdf5dmg
cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/*.dmg.tar.gz ${{ runner.workspace }}/build/hdf5dmg
cd "${{ runner.workspace }}/build"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz hdf5dmg
shell: bash

- name: List files in the space (MacOS_latest)
run: |
ls ${{ github.workspace }}
Expand All @@ -439,6 +362,13 @@ jobs:
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- name: Save published dmg binary (MacOS_latest)
uses: actions/upload-artifact@v4
with:
name: tgz-osx-dmg-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx.dmg.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

build_and_test_S3_linux:
# Linux S3 (Ubuntu) w/ gcc + CMake
#
Expand Down
42 changes: 10 additions & 32 deletions .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
name:
- "Windows MSVC"
- "Ubuntu gcc"
- "MacOS-13 Clang"
- "MacOS Clang"

# This is where we list the bulk of the options for each configuration.
Expand Down Expand Up @@ -83,27 +82,6 @@ jobs:
generator: "-G Ninja"
run_tests: true

# MacOS w/ Clang + CMake
#
# We could also build with the Autotools via brew installing them,
# but that seems unnecessary
- name: "MacOS-13 Clang"
os: macos-13
cpp: OFF
fortran: ON
java: ON
docs: ON
libaecfc: ON
localaec: OFF
zlibfc: ON
localzlib: OFF
parallel: OFF
mirror_vfd: ON
direct_vfd: OFF
ros3_vfd: OFF
generator: "-G Ninja"
run_tests: true

# MacOS w/ Clang + CMake
#
# We could also build with the Autotools via brew installing them,
Expand Down Expand Up @@ -155,7 +133,7 @@ jobs:

- name: Install Dependencies (macOS)
run: brew install ninja
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-latest' }}

# symlinks the compiler executables to a common location
- name: Install GNU Fortran (macOS)
Expand All @@ -164,7 +142,7 @@ jobs:
with:
compiler: gcc
version: 12
if: ${{ matrix.os == 'macos-13' || matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-latest' }}

- name: Install Dependencies
uses: ssciwr/doxygen-install@v1
Expand Down Expand Up @@ -285,18 +263,18 @@ jobs:
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'ubuntu-latest') && (inputs.thread_safety != 'TS') }}

- name: Save published binary (Mac)
uses: actions/upload-artifact@v4
with:
name: tgz-osx13-${{ 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') }}

- name: Save published binary (Mac_latest)
uses: actions/upload-artifact@v4
with:
name: tgz-osx-${{ 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-latest') && (inputs.thread_safety != 'TS') }}

- name: Save published dmg binary (Mac_latest)
uses: actions/upload-artifact@v4
with:
name: tgz-osx-${{ inputs.build_mode }}-dmg-binary
path: ${{ runner.workspace }}/build/HDF5-*-Darwin.dmg
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'macos-latest') && (inputs.thread_safety != 'TS') }}
9 changes: 9 additions & 0 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ jobs:
name: tgz-osx-binary
path: ${{ github.workspace }}

- name: Get published dmg binary (MacOS)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: tgz-osx-dmg-binary
path: ${{ github.workspace }}

- name: Get published binary (Linux)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
Expand Down Expand Up @@ -180,6 +186,7 @@ jobs:
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx.dmg.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
Expand Down Expand Up @@ -225,6 +232,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.dmg.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
Expand Down Expand Up @@ -253,6 +261,7 @@ jobs:
hdf5.tar.gz
hdf5.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.dmg.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/remove-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.dmg.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
endif ()
elseif (APPLE)
list (APPEND CPACK_GENERATOR "STGZ")
option (HDF5_PACK_MACOSX_DMG "Package the HDF5 Library using DragNDrop" OFF)
option (HDF5_PACK_MACOSX_DMG "Package the HDF5 Library using DragNDrop" ON)
if (HDF5_PACK_MACOSX_DMG)
list (APPEND CPACK_GENERATOR "DragNDrop")
endif ()
Expand Down

0 comments on commit 3355a5e

Please sign in to comment.