Skip to content

Commit 90fbba9

Browse files
Add release workflow and document release process
1 parent ea047a5 commit 90fbba9

3 files changed

Lines changed: 151 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create a release of HDF5 Async VOL
2+
3+
# 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
4+
on:
5+
push:
6+
tags:
7+
- 'v*'
8+
- '!v*rc*'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
package:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v3
19+
20+
- name: Extract version number
21+
id: get_version
22+
# Skip leading "v"
23+
run: echo "version=${GITHUB_REF_NAME:1}" >> $GITHUB_OUTPUT
24+
25+
- name: Create Build Environment
26+
run: cmake -E make_directory ${{github.workspace}}/build
27+
28+
- name: Configure CMake
29+
shell: bash
30+
working-directory: ${{github.workspace}}/build
31+
run: |
32+
cmake -D HDF5_VOL_ASYNC_PACKAGE_SOURCE=1 $GITHUB_WORKSPACE
33+
make package_source
34+
35+
- name: Create Release
36+
id: create_release
37+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
38+
with:
39+
tag_name: "${{ github.ref }}"
40+
name: "v${{ steps.get_version.outputs.version }}"
41+
draft: true
42+
prerelease: false
43+
files: |
44+
${{github.workspace}}/build/hdf5_vol_async-${{ steps.get_version.outputs.version }}.tar.gz

CMakeLists.txt

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
cmake_minimum_required(VERSION 3.12)
22

3-
project(HDF5_VOL_ASYNC VERSION 0.0.1 LANGUAGES C)
3+
project(HDF5_VOL_ASYNC VERSION 1.9.0 LANGUAGES C)
44

55
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
66

77
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
88

9-
find_package(MPI REQUIRED)
10-
find_package(ABT REQUIRED)
11-
find_package(HDF5 REQUIRED COMPONENTS C)
9+
if (NOT HDF5_VOL_ASYNC_PACKAGE_SOURCE)
10+
find_package(MPI REQUIRED)
11+
find_package(ABT REQUIRED)
12+
find_package(HDF5 REQUIRED COMPONENTS C)
1213

13-
include_directories(${MPI_INCLUDE_PATH})
14-
include_directories(${HDF5_INCLUDE_DIRS})
14+
include_directories(${MPI_INCLUDE_PATH})
15+
include_directories(${HDF5_INCLUDE_DIRS})
16+
endif ()
1517

1618
include(CTest)
1719
enable_testing()
@@ -32,14 +34,16 @@ if(NOT HDF5_VOL_ASYNC_INSTALL_TEST_DIR)
3234
set(HDF5_VOL_ASYNC_INSTALL_TEST_DIR ${CMAKE_INSTALL_PREFIX}/test)
3335
endif()
3436

35-
include(CheckSymbolExists)
36-
list(APPEND CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS})
37-
if(NOT HDF5_IS_PARALLEL)
38-
check_symbol_exists(H5_HAVE_PARALLEL "H5pubconf.h" HDF5_HAVE_PARALLEL)
39-
if(NOT HDF5_HAVE_PARALLEL)
40-
message(FATAL_ERROR "HDF5 library needs to enable parallel support.")
37+
if (NOT HDF5_VOL_ASYNC_PACKAGE_SOURCE)
38+
include(CheckSymbolExists)
39+
list(APPEND CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS})
40+
if(NOT HDF5_IS_PARALLEL)
41+
check_symbol_exists(H5_HAVE_PARALLEL "H5pubconf.h" HDF5_HAVE_PARALLEL)
42+
if(NOT HDF5_HAVE_PARALLEL)
43+
message(FATAL_ERROR "HDF5 library needs to enable parallel support.")
44+
endif()
4145
endif()
42-
endif()
46+
endif ()
4347

4448
# Comment out until H5_IS_THREADSAFE is added as a CMake variable. Otherwise,
4549
# 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)
8589
#-----------------------------------------------------------------------------
8690
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
8791
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test)
92+
93+
#-----------------------------------------------------------------------------
94+
# CPack
95+
#-----------------------------------------------------------------------------
96+
set (CPACK_PACKAGE_NAME "${HDF5_VOL_ASYNC_PACKAGE_NAME}")
97+
set (CPACK_PACKAGE_DESCRIPTION_FILE ${HDF5_VOL_ASYNC_SOURCE_DIR}/README.md)
98+
set (CPACK_RESOURCE_FILE_LICENSE ${HDF5_VOL_ASYNC_SOURCE_DIR}/LICENSE.txt)
99+
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${HDF5_VOL_ASYNC_PACKAGE_DESCRIPTION}")
100+
set (CPACK_PACKAGE_VENDOR "${HDF5_VOL_ASYNC_PACKAGE_VENDOR}")
101+
set (CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
102+
set (CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
103+
set (CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
104+
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${HDF5_VOL_ASYNC_PACKAGE}-${PROJECT_VERSION})
105+
set (CPACK_SOURCE_IGNORE_FILES
106+
# Files specific to version control
107+
"/\\\\.git/"
108+
"/\\\\.git$"
109+
"/\\\\.gitattributes$"
110+
"/\\\\.github/"
111+
"/\\\\.gitignore$"
112+
"/\\\\.gitmodules$"
113+
114+
# IDE files
115+
"/\\\\.vscode/"
116+
"/\\\\.settings/"
117+
"/\\\\.autotools$"
118+
"/\\\\.autotools$"
119+
"/\\\\.project$"
120+
"/\\\\.cproject$"
121+
122+
# Misc
123+
"/\\\\.gitlab-ci.yml$"
124+
125+
# Build
126+
"/build/"
127+
128+
# Temporary files
129+
"\\\\.swp$"
130+
"\\\\.#"
131+
"/#"
132+
"~$"
133+
)
134+
135+
include (CPack)

docs/RELEASE_PROCESS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
These are the steps to follow when creating a new release of the HDF5 Async VOL connector:
2+
3+
0. Ensure all changes are ready for the release and committed to the repository
4+
5+
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
6+
7+
<b>Example:</b>
8+
```CMake
9+
project(HDF5_VOL_ASYNC VERSION 1.9.0 LANGUAGES C)
10+
```
11+
12+
becomes
13+
14+
```CMake
15+
project(HDF5_VOL_ASYNC VERSION 2.0.0 LANGUAGES C)
16+
```
17+
18+
2. Commit the change to the CMakeLists.txt file, using the version number with a leading "v" as the commit message
19+
20+
<b>Example:</b>
21+
```bash
22+
git add CMakeLists.txt
23+
git commit -m "v2.0.0"
24+
git push
25+
```
26+
27+
3. Create a tag pointing to the commit from the previous step, using a leading "v" for the tag name
28+
29+
<b>Example with signed tag:</b>
30+
```bash
31+
git tag -s v2.0.0 -m "HDF5 Async VOL 2.0.0"
32+
```
33+
34+
<b>Example with unsigned tag:</b>
35+
```bash
36+
git tag -a v2.0.0 -m "HDF5 Async VOL 2.0.0"
37+
```
38+
39+
4. Push the tag from the previous step, triggering the release workflow
40+
41+
<b>Example:</b>
42+
```bash
43+
git push origin v2.0.0
44+
```
45+
46+
5. On GitHub, edit the draft release created by the release workflow to tidy up any details, then publish the release when finished

0 commit comments

Comments
 (0)