summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-06-05 23:24:59 (GMT)
committerGitHub <noreply@github.com>2023-06-05 23:24:59 (GMT)
commitb5b1f4c7dfcc4a40af7c6c8ab1c89e49054f33c6 (patch)
treeb4dbd9c0f0b3fc4eb5999bb169c6f639a3c41772 /.github
parentcd18732c2ee6e06384d5dfb033f9a9dc1c60ab0d (diff)
downloadhdf5-b5b1f4c7dfcc4a40af7c6c8ab1c89e49054f33c6.zip
hdf5-b5b1f4c7dfcc4a40af7c6c8ab1c89e49054f33c6.tar.gz
hdf5-b5b1f4c7dfcc4a40af7c6c8ab1c89e49054f33c6.tar.bz2
Update actions and change defaults of compression (fix vars) (#3043)
* Update actions and change defaults of compression (fix vars) * disable TS and parallel * remove parallel for TS * Correct list of default options
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/clang-format-check.yml2
-rw-r--r--.github/workflows/clang-format-fix.yml4
-rw-r--r--.github/workflows/cmake-ctest.yml3
-rw-r--r--.github/workflows/codespell.yml2
-rw-r--r--.github/workflows/daily-build.yml4
-rw-r--r--.github/workflows/main.yml69
-rw-r--r--.github/workflows/release.yml115
-rw-r--r--.github/workflows/tarball.yml9
8 files changed, 192 insertions, 16 deletions
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
index 70809a1..56d2b48 100644
--- a/.github/workflows/clang-format-check.yml
+++ b/.github/workflows/clang-format-check.yml
@@ -1,6 +1,8 @@
name: clang-format Check
on:
pull_request:
+permissions:
+ contents: read
jobs:
formatting-check:
name: Formatting Check
diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml
index 00d2352..5981118 100644
--- a/.github/workflows/clang-format-fix.yml
+++ b/.github/workflows/clang-format-fix.yml
@@ -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
diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml
index 365039e..4363d0f 100644
--- a/.github/workflows/cmake-ctest.yml
+++ b/.github/workflows/cmake-ctest.yml
@@ -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:
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 3ceda82..57b8137 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -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
diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml
index 63b7dab..25768c2 100644
--- a/.github/workflows/daily-build.yml
+++ b/.github/workflows/daily-build.yml
@@ -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' }}
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 80278ad..635890b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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.
@@ -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
@@ -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
@@ -113,6 +125,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v112
+ szip: yes
toolchain: ""
generator: "autogen"
flags: ""
@@ -133,6 +146,7 @@ jobs:
direct_vfd: disable
deprec_sym: enable
default_api: v112
+ szip: yes
toolchain: ""
generator: "autogen"
flags: "CC=mpicc"
@@ -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
@@ -175,6 +191,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v16
+ szip: yes
toolchain: ""
generator: "autogen"
flags: ""
@@ -197,6 +214,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v18
+ szip: yes
toolchain: ""
generator: "autogen"
flags: ""
@@ -219,6 +237,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v110
+ szip: yes
toolchain: ""
generator: "autogen"
flags: ""
@@ -241,6 +260,7 @@ jobs:
direct_vfd: enable
deprec_sym: enable
default_api: v112
+ szip: yes
toolchain: ""
generator: "autogen"
flags: ""
@@ -263,6 +283,7 @@ jobs:
direct_vfd: enable
deprec_sym: disable
default_api: v112
+ szip: yes
toolchain: ""
generator: "autogen"
flags: ""
@@ -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)
@@ -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)
@@ -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
@@ -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')
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..e15c6b3
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -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`
diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml
index 62fd270..4a9d0d8 100644
--- a/.github/workflows/tarball.yml
+++ b/.github/workflows/tarball.yml
@@ -10,6 +10,15 @@ on:
file_base:
description: "The common base name of the source tarballs"
value: ${{ jobs.create_tarball.outputs.file_base }}
+ file_branch:
+ description: "The branch used for the source tarballs"
+ value: ${{ jobs.check_commits.outputs.branch_ref }}
+ file_sha:
+ description: "The sha used for the source tarballs"
+ value: ${{ jobs.check_commits.outputs.branch_sha }}
+
+permissions:
+ contents: read
# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel