Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
74 changes: 61 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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.
Expand Down Expand Up @@ -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)
46 changes: 46 additions & 0 deletions docs/RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -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

<b>Example:</b>
```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

<b>Example:</b>
```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

<b>Example with signed tag:</b>
```bash
git tag -s v2.0.0 -m "HDF5 Async VOL 2.0.0"
```

<b>Example with unsigned tag:</b>
```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

<b>Example:</b>
```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