diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d35b4cd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## DLA-Future-Fortran 0.1.0 + +First release of [DLA-Future-Fortran], a Fortran interface for [DLA-Future]. + +[DLA-Future]: https://github.com/eth-cscs/DLA-Future +[DLA-Future-Fortran]: https://github.com/eth-cscs/DLA-Future-Fortran diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..55ad96d --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,45 @@ +cff-version: 1.2.0 +title: DLA-Future-Fortran 0.1.0 +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: John + family-names: Biddiscombe + orcid: 'https://orcid.org/0000-0002-6552-2833' + - given-names: Alberto + family-names: Invernizzi + orcid: 'https://orcid.org/0009-0004-4948-0313' + - given-names: Rocco + family-names: Meli + orcid: 'https://orcid.org/0000-0002-2845-3410' + - given-names: Auriane + family-names: Reverdell + orcid: 'https://orcid.org/0000-0002-5531-0458' + - given-names: Mikael + family-names: Simberg + orcid: 'https://orcid.org/0000-0002-7238-8935' + - given-names: Raffaele + family-names: SolcĂ  + orcid: 'https://orcid.org/0009-0009-9346-4376' + - given-names: Mathieu + family-names: Taillefumier + orcid: 'https://orcid.org/0000-0002-3983-5625' +identifiers: + - type: doi + value: + description: The concept DOI of the work. +repository-code: 'https://github.com/eth-cscs/DLA-Future-Fortran' +abstract: Fortran interface for DLA-Future (Distributed Linear Algebra from the Future) +keywords: + - fortran + - eigensolver + - "generalized eigensolver" + - scalapack + - "high performance computing" + - "linear algebra" + - mpi +license: BSD-3-Clause +version: 0.1.0 +date-released: '2024-05-14' diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md new file mode 100644 index 0000000..6a892ea --- /dev/null +++ b/RELEASE_PROCEDURE.md @@ -0,0 +1,31 @@ +# Release procedure for DLA-Future-Fortran + +DLA-Future-Fortran follows [Semantic Versioning](https://semver.org). + +1. For minor and major releases: check out the `main` branch. All changes required for the release are + added to `main` via pull requests. For patch releases: check out the corresponding + `release-major.minor` branch. + +1. Write release notes in `CHANGELOG.md`. + +1. Update the version in `CMakeLists.txt`. + +1. Update the version and date in `CITATION.cff`. + +1. When making a major release, remove deprecated functionality if appropriate. + +1. Update the minimum required versions if necessary. + +1. Ensure you have [GitHub CLI]() installed. Run `gh auth login` to authenticate with your GitHub account, + or set the `GITHUB_TOKEN` to a token with `public_repo` access. + +1. Create a release on GitHub using the script `scripts/roll_release.sh`. + +1. Update spack recipe in `spack/packages/dla-future/package.py` adding the new release. + +1. Synchronize [upstream spack + package](https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/dla-future-fortran/package.py) + with local repository. Exclude blocks delimited by `###` comments. These are only intended for the + internal spack package. + +1. Delete your `GITHUB_TOKEN` if created only for the release. diff --git a/scripts/roll_release.sh b/scripts/roll_release.sh new file mode 100644 index 0000000..b748813 --- /dev/null +++ b/scripts/roll_release.sh @@ -0,0 +1,131 @@ +#!/usr/bin/env bash + +# +# Distributed Linear Algebra with Future (DLAF) +# +# Copyright (c) 2018-2024, ETH Zurich +# All rights reserved. +# +# Please, refer to the LICENSE file in the root directory. +# SPDX-License-Identifier: BSD-3-Clause +# + +# This script tags a release locally and creates a release on GitHub. It relies +# on the GitHub CLI (https://cli.github.com). + +set -o errexit + +VERSION_MAJOR=$(sed -n 's/project(DLAFFortran VERSION \([0-9]\+\)\.[0-9]\+\.[0-9]\+ .*)/\1/p' CMakeLists.txt) +VERSION_MINOR=$(sed -n 's/project(DLAFFortran VERSION [0-9]\+\.\([0-9]\+\)\.[0-9]\+ .*)/\1/p' CMakeLists.txt) +VERSION_PATCH=$(sed -n 's/project(DLAFFortran VERSION [0-9]\+\.[0-9]\+\.\([0-9]\+\) .*)/\1/p' CMakeLists.txt) +VERSION_FULL="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" +VERSION_FULL_TAG="v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" +VERSION_TITLE="DLA-Future-Fortran ${VERSION_FULL}" +CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +if ! which gh >/dev/null 2>&1; then + echo "GitHub CLI not installed on this system (see https://cli.github.com). Exiting." + exit 1 +fi + +# Major and minor releases are made directly from master. Patch releases are branched out from the major +# and minor releases with a version_X.Y branch. +if [[ "${VERSION_PATCH}" -eq 0 ]]; then + RELEASE_BRANCH="main" +else + RELEASE_BRANCH="release-${VERSION_MAJOR}.${VERSION_MINOR}" +fi + +if ! [[ "$CURRENT_BRANCH" == "$RELEASE_BRANCH" ]]; then + echo "Not on release branch (expected \"$RELEASE_BRANCH\", currently on \"${CURRENT_BRANCH}\"). Not continuing to make release." + exit 1 +fi + +changelog_path="CHANGELOG.md" +readme_path="README.md" +cff_path="CITATION.cff" + +echo "You are about to tag and create a final release on GitHub." + +echo "" +echo "Sanity checking release" + +sanity_errors=0 + +printf "Checking that %s has an entry for %s... " "${changelog_path}" "${VERSION_FULL}" +if grep "## DLA-Future-Fortran ${VERSION_FULL}" "${changelog_path}"; then + echo "OK" +else + echo "Missing" + sanity_errors=$((sanity_errors + 1)) +fi + +printf "Checking that %s has correct version for %s... " "${cff_path}" "${VERSION_FULL}" +if grep "^version: ${VERSION_FULL}" "${cff_path}"; then + echo "OK" +else + echo "Missing" + sanity_errors=$((sanity_errors + 1)) +fi + +printf "Checking that %s has correct title for %s... " "${cff_path}" "${VERSION_FULL}" +if grep "^title: ${VERSION_TITLE}" "${cff_path}"; then + echo "OK" +else + echo "Missing" + sanity_errors=$((sanity_errors + 1)) +fi + +if [[ ${sanity_errors} -gt 0 ]]; then + echo "Found ${sanity_errors} error(s). Fix it/them and try again." + exit 1 +fi + +# Extract the changelog for this version +VERSION_DESCRIPTION=$( + # Find the correct heading and print everything from there to the end of the file + awk "/^## DLA-Future-Fortran ${VERSION_FULL}/,EOF" ${changelog_path} | + # Remove the heading + tail -n+3 | + # Find the next heading or the end of the file and print everything until that heading + sed '/^## /Q' | + # Move headings one level up, i.e. transform ### to ##, ## to #, etc. There should be no + # top-level heading in the file except for "# Changelog". + sed 's/^##/#/' +) + +echo "" +echo "The version is: ${VERSION_FULL}" +echo "The version title is: ${VERSION_TITLE}" +echo "The version description is:" +echo "${VERSION_DESCRIPTION}" + +echo "Do you want to continue?" +select yn in "Yes" "No"; do + case $yn in + Yes) break ;; + No) exit ;; + esac +done + +echo "" +if [[ "$(git tag -l ${VERSION_FULL_TAG})" == "${VERSION_FULL_TAG}" ]]; then + echo "Tag already exists locally." +else + echo "Tagging release." + git tag --annotate "${VERSION_FULL_TAG}" --message="${VERSION_TITLE}" +fi + +remote=$(git remote -v | grep github.com:eth-cscs\/DLA-Future-Fortran.git | cut -f1 | uniq) +if [[ "$(git ls-remote --tags --refs $remote | grep -o ${VERSION_FULL_TAG})" == "${VERSION_FULL_TAG}" ]]; then + echo "Tag already exists remotely." +else + echo "Pushing tag to $remote." + git push $remote "${VERSION_FULL_TAG}" +fi + +echo "" +echo "Creating release." +gh release create "${VERSION_FULL_TAG}" \ + --title "${VERSION_TITLE}" \ + --notes "${VERSION_DESCRIPTION}"