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 Cache 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_CACHE_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: "Cache VOL v${{ steps.get_version.outputs.version }}"
draft: true
prerelease: false
files: |
${{github.workspace}}/build/hdf5_vol_cache-${{ steps.get_version.outputs.version }}.tar.gz
63 changes: 56 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(CTest)
enable_testing()

find_package(MPI REQUIRED)
find_package(ASYNC REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C)
if (NOT HDF5_VOL_CACHE_PACKAGE_SOURCE)
find_package(MPI REQUIRED)
find_package(ASYNC REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C)

include_directories(${MPI_INCLUDE_PATH})
include_directories(${HDF5_INCLUDE_DIRS})
include_directories(${ASYNC_INCLUDE_DIRS})
include_directories(${MPI_INCLUDE_PATH})
include_directories(${HDF5_INCLUDE_DIRS})
include_directories(${ASYNC_INCLUDE_DIRS})
endif ()

if(NOT HDF5_VOL_CACHE_INSTALL_BIN_DIR)
set(HDF5_VOL_CACHE_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
Expand Down Expand Up @@ -63,4 +65,51 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/benchmarks)
#-----------------------------------------------------------------------------
# Utilities
#-----------------------------------------------------------------------------
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/utils)
if (NOT HDF5_VOL_CACHE_PACKAGE_SOURCE)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/utils)
endif ()

#-----------------------------------------------------------------------------
# CPack
#-----------------------------------------------------------------------------
set (CPACK_PACKAGE_NAME "${HDF5_VOL_CACHE_PACKAGE_NAME}")
set (CPACK_PACKAGE_DESCRIPTION_FILE ${HDF5_VOL_CACHE_SOURCE_DIR}/README.md)
set (CPACK_RESOURCE_FILE_LICENSE ${HDF5_VOL_CACHE_SOURCE_DIR}/LICENSE)
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${HDF5_VOL_CACHE_PACKAGE_DESCRIPTION}")
set (CPACK_PACKAGE_VENDOR "${HDF5_VOL_CACHE_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_CACHE_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 Cache 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_CACHE VERSION 1.2.1)
```

becomes

```CMake
project (HDF5_VOL_CACHE VERSION 2.0.0)
```

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 Cache VOL 2.0.0"
```

<b>Example with unsigned tag:</b>
```bash
git tag -a v2.0.0 -m "HDF5 Cache 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