Skip to content

Commit

Permalink
Update actions and change defaults of compression (fix vars) (HDFGrou…
Browse files Browse the repository at this point in the history
…p#3043)

* Update actions and change defaults of compression (fix vars)

* disable TS and parallel

* remove parallel for TS

* Correct list of default options
  • Loading branch information
byrnHDF authored and brtnfld committed Oct 5, 2023
1 parent bf75d2d commit 39a78a8
Show file tree
Hide file tree
Showing 20 changed files with 367 additions and 201 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: clang-format Check
on:
pull_request:
permissions:
contents: read
jobs:
formatting-check:
name: Formatting Check
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/clang-format-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ name: clang-format Commit Changes
on:
workflow_dispatch:
push:
permissions:
contents: read
jobs:
formatting-check:
name: Commit Format Changes
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
permissions:
contents: write # In order to allow EndBug/add-and-commit to commit changes
steps:
- uses: actions/checkout@v3
- name: Fix C and Java formatting issues detected by clang-format
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
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:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# https://github.com/codespell-project/actions-codespell
name: codespell
on: [push, pull_request]
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ jobs:
if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

call-workflow-release:
needs: call-workflow-ctest
needs: [call-workflow-tarball, call-workflow-ctest]
uses: ./.github/workflows/release.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }}
file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }}
if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

69 changes: 54 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ on:
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'


# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
cancel-in-progress: true

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.
Expand Down Expand Up @@ -74,7 +82,9 @@ jobs:
fortran: OFF
java: ON
libaecfc: ON
localaec: OFF
zlibfc: ON
localzlib: OFF
parallel: OFF
mirror_vfd: OFF
direct_vfd: OFF
Expand All @@ -91,7 +101,9 @@ jobs:
fortran: ON
java: ON
libaecfc: ON
localaec: OFF
zlibfc: ON
localzlib: OFF
parallel: OFF
mirror_vfd: ON
direct_vfd: ON
Expand All @@ -113,6 +125,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v112
szip: yes
toolchain: ""
generator: "autogen"
flags: ""
Expand All @@ -133,6 +146,7 @@ jobs:
direct_vfd: disable
deprec_sym: enable
default_api: v112
szip: yes
toolchain: ""
generator: "autogen"
flags: "CC=mpicc"
Expand All @@ -148,7 +162,9 @@ jobs:
fortran: OFF
java: ON
libaecfc: ON
localaec: OFF
zlibfc: ON
localzlib: OFF
parallel: OFF
mirror_vfd: ON
direct_vfd: OFF
Expand All @@ -175,6 +191,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v16
szip: yes
toolchain: ""
generator: "autogen"
flags: ""
Expand All @@ -197,6 +214,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v18
szip: yes
toolchain: ""
generator: "autogen"
flags: ""
Expand All @@ -219,6 +237,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v110
szip: yes
toolchain: ""
generator: "autogen"
flags: ""
Expand All @@ -241,6 +260,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v112
szip: yes
toolchain: ""
generator: "autogen"
flags: ""
Expand All @@ -263,6 +283,7 @@ jobs:
direct_vfd: enable
deprec_sym: disable
default_api: v112
szip: yes
toolchain: ""
generator: "autogen"
flags: ""
Expand Down Expand Up @@ -307,6 +328,7 @@ jobs:
echo "CC=gcc-11" >> $GITHUB_ENV
echo "CXX=g++-11" >> $GITHUB_ENV
echo "FC=gfortran-11" >> $GITHUB_ENV
sudo apt install libaec0 libaec-dev
if: (matrix.generator == 'autogen') && (matrix.parallel != 'enable')

- name: Install Autotools Dependencies (Linux, parallel)
Expand All @@ -316,6 +338,7 @@ jobs:
sudo apt install openmpi-bin openmpi-common mpi-default-dev
echo "CC=mpicc" >> $GITHUB_ENV
echo "FC=mpif90" >> $GITHUB_ENV
sudo apt install libaec0 libaec-dev
if: (matrix.generator == 'autogen') && (matrix.parallel == 'enable')

- name: Install Dependencies (Windows)
Expand Down Expand Up @@ -346,18 +369,18 @@ jobs:
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd
${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --with-szlib=${{ matrix.szip }}
shell: bash
if: (matrix.generator == 'autogen') && (! matrix.thread_safe.enabled)
if: (matrix.generator == 'autogen') && ! (matrix.thread_safety.enabled)

- name: Autotools Configure (Thread-Safe)
run: |
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.parallel }}-parallel --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd
${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --with-szlib=${{ matrix.szip }}
shell: bash
if: (matrix.generator == 'autogen') && (matrix.thread_safe.enabled)
if: (matrix.generator == 'autogen') && (matrix.thread_safety.enabled)

#
# CMAKE CONFIGURE
Expand All @@ -367,44 +390,60 @@ jobs:
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -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=${{ matrix.java }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -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=${{ matrix.java }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
shell: bash
if: (matrix.generator != 'autogen') && (! matrix.thread_safe.enabled)
if: (matrix.generator != 'autogen') && ! (matrix.thread_safety.enabled)


- name: CMake Configure (Thread-Safe)
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE
shell: bash
if: (matrix.generator != 'autogen') && (matrix.thread_safe.enabled)
if: (matrix.generator != 'autogen') && (matrix.thread_safety.enabled)

#
# BUILD
#

- name: Autotools Build
run: make
run: make -j3
working-directory: ${{ runner.workspace }}/build
if: matrix.generator == 'autogen'

- name: CMake Build
run: cmake --build . --config ${{ matrix.build_mode.cmake }}
run: cmake --build . --parallel 3 --config ${{ matrix.build_mode.cmake }}
working-directory: ${{ runner.workspace }}/build
if: matrix.generator != 'autogen'
if: (matrix.generator != 'autogen')

#
# RUN TESTS
#

# NORMAL

- name: Autotools Run Tests
run: make check
run: make check -j2
working-directory: ${{ runner.workspace }}/build
if: (matrix.generator == 'autogen') && (matrix.run_tests)
if: (matrix.generator == 'autogen') && (matrix.run_tests) && ! (matrix.thread_safety.enabled)

- name: CMake Run Tests
run: ctest --build . -C ${{ matrix.build_mode.cmake }} -V
run: ctest --build . --parallel 2 -C ${{ matrix.build_mode.cmake }} -V
working-directory: ${{ runner.workspace }}/build
# Skip Debug MSVC while we investigate H5L Java test timeouts
if: (matrix.generator != 'autogen') && (matrix.run_tests) && ! ((matrix.name == 'Windows MSVC CMake') && (matrix.build_mode.cmake == 'Debug'))

#
# INSTALL (note that this runs even when we don't run the tests)
#

- name: Autotools Install
run: make install
working-directory: ${{ runner.workspace }}/build
if: (matrix.generator == 'autogen')

- name: Autotools Verify Install
run: make check-install
working-directory: ${{ runner.workspace }}/build
if: (matrix.generator == 'autogen')
115 changes: 115 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: hdf5 1.12 release

# Controls when the action will run. Triggers the workflow on a schedule
on:
workflow_call:
inputs:
file_base:
description: "The common base name of the source tarballs"
required: true
type: string
file_branch:
description: "The branch name for the source tarballs"
required: true
type: string
file_sha:
description: "The sha for the source tarballs"
required: true
type: string

# Previous workflows must pass to get here so tag the commit that created the files
jobs:
create-tag:
runs-on: ubuntu-latest
permissions:
contents: write # In order to allow tag creation
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v3
with:
fetch-depth: 0

- run: |
git checkout ${{ inputs.file_sha }}
- uses: rickstaa/action-create-tag@v1
id: "tag_create"
with:
commit_sha: ${{ inputs.file_sha }}
tag: "snapshot"
force_push_tag: true
message: "Latest snapshot"

# Print result using the action output.
- run: |
echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}"
getfiles:
runs-on: ubuntu-latest
steps:
- name: Set file base name
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
# Get files created by tarball script
- name: Get tgz-tarball (Linux)
uses: actions/download-artifact@v3
with:
name: tgz-tarball
path: ${{ github.workspace }}

- name: Get zip-tarball (Windows)
uses: actions/download-artifact@v3
with:
name: zip-tarball
path: ${{ github.workspace }}

# Get files created by cmake-ctest script
- name: Get published binary (Windows)
uses: actions/download-artifact@v3
with:
name: zip-vs2022-binary
path: ${{ github.workspace }}

- name: Get published binary (MacOS)
uses: actions/download-artifact@v3
with:
name: tgz-osx12-binary
path: ${{ github.workspace }}

- name: Get published binary (Linux)
uses: actions/download-artifact@v3
with:
name: tgz-ubuntu-2204-binary
path: ${{ github.workspace }}

# Get files used by release script

PreRelease:
runs-on: ubuntu-latest
needs: [create-tag, getfiles]
environment: snapshots_1_12
permissions:
contents: write
steps:
- name: Set file base name
id: get-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
- name: PreRelease tag
uses: softprops/action-gh-release@v1
with:
tag_name: "snapshot"
prerelease: true
files: |
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
Loading

0 comments on commit 39a78a8

Please sign in to comment.