From 9ade6b3f336f687f1afebf77a7f154cdc67eef2c Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Thu, 29 Jan 2026 12:44:16 -0600 Subject: [PATCH] Add release workflow and document release process --- .github/workflows/release.yml | 44 +++++++++++++++++++++ CMakeLists.txt | 74 +++++++++++++++++++++++++++++------ docs/RELEASE_PROCESS.md | 46 ++++++++++++++++++++++ 3 files changed, 151 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 docs/RELEASE_PROCESS.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..292a583 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Create a release of HDF5 Async VOL + +# Trigger when release tags of style "vX.X.X" are pushed, but not when pre-release tags of style "vX.X.X(-)rc" are pushed +on: + push: + tags: + - 'v*' + - '!v*rc*' + +permissions: + contents: write + +jobs: + package: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Extract version number + id: get_version + # Skip leading "v" + run: echo "version=${GITHUB_REF_NAME:1}" >> $GITHUB_OUTPUT + + - name: Create Build Environment + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Configure CMake + shell: bash + working-directory: ${{github.workspace}}/build + run: | + cmake -D HDF5_VOL_ASYNC_PACKAGE_SOURCE=1 $GITHUB_WORKSPACE + make package_source + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 + with: + tag_name: "${{ github.ref }}" + name: "v${{ steps.get_version.outputs.version }}" + draft: true + prerelease: false + files: | + ${{github.workspace}}/build/hdf5_vol_async-${{ steps.get_version.outputs.version }}.tar.gz diff --git a/CMakeLists.txt b/CMakeLists.txt index 023193e..62be2dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,19 @@ cmake_minimum_required(VERSION 3.12) -project(HDF5_VOL_ASYNC VERSION 0.0.1 LANGUAGES C) +project(HDF5_VOL_ASYNC VERSION 1.9.0 LANGUAGES C) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) set (CMAKE_POSITION_INDEPENDENT_CODE ON) -find_package(MPI REQUIRED) -find_package(ABT REQUIRED) -find_package(HDF5 REQUIRED COMPONENTS C) +if (NOT HDF5_VOL_ASYNC_PACKAGE_SOURCE) + find_package(MPI REQUIRED) + find_package(ABT REQUIRED) + find_package(HDF5 REQUIRED COMPONENTS C) -include_directories(${MPI_INCLUDE_PATH}) -include_directories(${HDF5_INCLUDE_DIRS}) + include_directories(${MPI_INCLUDE_PATH}) + include_directories(${HDF5_INCLUDE_DIRS}) +endif () include(CTest) enable_testing() @@ -32,14 +34,16 @@ if(NOT HDF5_VOL_ASYNC_INSTALL_TEST_DIR) set(HDF5_VOL_ASYNC_INSTALL_TEST_DIR ${CMAKE_INSTALL_PREFIX}/test) endif() -include(CheckSymbolExists) -list(APPEND CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS}) -if(NOT HDF5_IS_PARALLEL) - check_symbol_exists(H5_HAVE_PARALLEL "H5pubconf.h" HDF5_HAVE_PARALLEL) - if(NOT HDF5_HAVE_PARALLEL) - message(FATAL_ERROR "HDF5 library needs to enable parallel support.") +if (NOT HDF5_VOL_ASYNC_PACKAGE_SOURCE) + include(CheckSymbolExists) + list(APPEND CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS}) + if(NOT HDF5_IS_PARALLEL) + check_symbol_exists(H5_HAVE_PARALLEL "H5pubconf.h" HDF5_HAVE_PARALLEL) + if(NOT HDF5_HAVE_PARALLEL) + message(FATAL_ERROR "HDF5 library needs to enable parallel support.") + endif() endif() -endif() +endif () # Comment out until H5_IS_THREADSAFE is added as a CMake variable. Otherwise, # this may fail when fetch content is used in VOL testing with HDF5 actions. @@ -85,3 +89,47 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src) #----------------------------------------------------------------------------- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test) + +#----------------------------------------------------------------------------- +# CPack +#----------------------------------------------------------------------------- +set (CPACK_PACKAGE_NAME "${HDF5_VOL_ASYNC_PACKAGE_NAME}") +set (CPACK_PACKAGE_DESCRIPTION_FILE ${HDF5_VOL_ASYNC_SOURCE_DIR}/README.md) +set (CPACK_RESOURCE_FILE_LICENSE ${HDF5_VOL_ASYNC_SOURCE_DIR}/LICENSE.txt) +set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${HDF5_VOL_ASYNC_PACKAGE_DESCRIPTION}") +set (CPACK_PACKAGE_VENDOR "${HDF5_VOL_ASYNC_PACKAGE_VENDOR}") +set (CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") +set (CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") +set (CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") +set (CPACK_SOURCE_PACKAGE_FILE_NAME ${HDF5_VOL_ASYNC_PACKAGE}-${PROJECT_VERSION}) +set (CPACK_SOURCE_IGNORE_FILES + # Files specific to version control + "/\\\\.git/" + "/\\\\.git$" + "/\\\\.gitattributes$" + "/\\\\.github/" + "/\\\\.gitignore$" + "/\\\\.gitmodules$" + + # IDE files + "/\\\\.vscode/" + "/\\\\.settings/" + "/\\\\.autotools$" + "/\\\\.autotools$" + "/\\\\.project$" + "/\\\\.cproject$" + + # Misc + "/\\\\.gitlab-ci.yml$" + + # Build + "/build/" + + # Temporary files + "\\\\.swp$" + "\\\\.#" + "/#" + "~$" +) + +include (CPack) diff --git a/docs/RELEASE_PROCESS.md b/docs/RELEASE_PROCESS.md new file mode 100644 index 0000000..4b24176 --- /dev/null +++ b/docs/RELEASE_PROCESS.md @@ -0,0 +1,46 @@ +These are the steps to follow when creating a new release of the HDF5 Async VOL connector: + +0. Ensure all changes are ready for the release and committed to the repository + +1. Update the `VERSION` number specified for the `project ()` command in CMakeLists.txt in the root of the source tree with the new version number + + Example: + ```CMake + project(HDF5_VOL_ASYNC VERSION 1.9.0 LANGUAGES C) + ``` + + becomes + + ```CMake + project(HDF5_VOL_ASYNC VERSION 2.0.0 LANGUAGES C) + ``` + +2. Commit the change to the CMakeLists.txt file, using the version number with a leading "v" as the commit message + + Example: + ```bash + git add CMakeLists.txt + git commit -m "v2.0.0" + git push + ``` + +3. Create a tag pointing to the commit from the previous step, using a leading "v" for the tag name + + Example with signed tag: + ```bash + git tag -s v2.0.0 -m "HDF5 Async VOL 2.0.0" + ``` + + Example with unsigned tag: + ```bash + git tag -a v2.0.0 -m "HDF5 Async VOL 2.0.0" + ``` + +4. Push the tag from the previous step, triggering the release workflow + + Example: + ```bash + git push origin v2.0.0 + ``` + +5. On GitHub, edit the draft release created by the release workflow to tidy up any details, then publish the release when finished