Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Version] Update main to v2.9.0 #6

Closed
wants to merge 7 commits into from
Closed
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
145 changes: 145 additions & 0 deletions .github/workflows/release-create-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Release: 1. Begin Release Cycle"

# The branch or tag selected when starting the workflow should be:
# 1. "branch/{major}.{minor}.x" if it exists, or
# 2. The ref to use when branching the release branch.

on:
workflow_dispatch:
inputs:
main_version:
description: "Next version of main. (x.y.z)"
type: string
required: true

defaults:
run:
shell: bash --noprofile --norc -euo pipefail {0}

jobs:
create-release-branch:
env:
GH_TOKEN: ${{ github.token }}
permissions:
actions: write
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Prepare environment
id: prepare-env
run: |
log_and_export_vars() {
for var in "$@"; do
printf "%-15s %s\n" "$var:" "${!var}" | tee -a $GITHUB_STEP_SUMMARY
echo "${var}=${!var}" | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
done
}

repo_version=$(jq -r .full cccl-version.json)
main_version=${{ inputs.main_version }}

if [[ ! $repo_version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version number: $repo_version"
exit 1
fi

if [[ ! $main_version =~ ^[0-9]+\.[0-9]+\.[0-9]*$ ]]; then
echo "Invalid main version number: $main_version"
exit 1
fi

major_version=$(echo ${repo_version} | cut -d. -f1)
minor_version=$(echo ${repo_version} | cut -d. -f2)
patch_version=$(echo ${repo_version} | cut -d. -f3)
branch_name="branch/${major_version}.${minor_version}.x"

main_major_version=$(echo ${main_version} | cut -d. -f1)
main_minor_version=$(echo ${main_version} | cut -d. -f2)
main_patch_version=$(echo ${main_version} | cut -d. -f3)

log_and_export_vars \
repo_version major_version minor_version patch_version \
main_version main_major_version main_minor_version main_patch_version \
branch_name

echo "Branch ref: $GITHUB_REF" | tee -a $GITHUB_STEP_SUMMARY
echo "Branch SHA: $GITHUB_SHA" | tee -a $GITHUB_STEP_SUMMARY
echo "Branch commit: $(git show --oneline --no-patch ${GITHUB_SHA})" | tee -a $GITHUB_STEP_SUMMARY

- name: Verify environment
run: |
# If the release branch already exists, it must match the branch point:
if git ls-remote --exit-code origin $branch_name; then
echo "Branch $branch_name already exists" | tee -a $GITHUB_STEP_SUMMARY
echo " GITHUB_REF: $GITHUB_REF" | tee -a $GITHUB_STEP_SUMMARY
echo " branch_name: $branch_name" | tee -a $GITHUB_STEP_SUMMARY
exit 1
fi

- name: Create release branch
id: create_branch
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git push origin ${GITHUB_SHA}:"refs/heads/$branch_name"
echo "Created branch $branch_name at:" | tee -a $GITHUB_STEP_SUMMARY

git show --oneline --no-patch HEAD | tee -a $GITHUB_STEP_SUMMARY

- name: Update version numbers in main
id: update_main
run: |
gh workflow run update-branch-version.yml --ref main -f new_version="$main_version" -f target_branch="main" | tee -a $GITHUB_STEP_SUMMARY

- name: Notify Slack
if: ${{ success()}}
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFIER_BOT_TOKEN }}
SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
BRANCH_NAME: ${{ steps.prepare-env.outputs.branch_name }}
BRANCH_VERSION: ${{ inputs.branch_version }}
MAIN_VERSION: ${{ inputs.main_version }}
MAIN_PR_URL: ${{ steps.create_pr.outputs.pull-request-url }}
with:
channel-id: ${{ secrets.SLACK_CHANNEL_RELEASE_LOG }}
slack-message: |
A new release cycle has started for `v${{ env.BRANCH_VERSION }}` on `${{ env.BRANCH_NAME }}`.

If requested, a PR to update `main` to `v${{ env.MAIN_VERSION }}` has been created: ${{ env.MAIN_PR_URL }}.

Workflow summary: ${{ env.SUMMARY_URL }}

- name: Notify Slack (failure)
if: ${{ failure() }}
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFIER_BOT_TOKEN }}
SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
BRANCH_VERSION: ${{ inputs.branch_version }}
with:
channel-id: ${{ secrets.SLACK_CHANNEL_RELEASE_LOG }}
slack-message: |
An error has occurred while initiating a new release cycle for `v${{ env.BRANCH_VERSION }}`.

Details: ${{ env.SUMMARY_URL }}
4 changes: 2 additions & 2 deletions .github/workflows/release-finalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ jobs:

- name: Tag
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git tag -a -m "CCCL Release ${release_tag}" ${release_tag} ${rc_tag}
git push origin ${release_tag}
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/update-branch-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
name: "Release: 0. Update version in target branch"

# The target branch when starting this workflow should be:
# 1. "branch/{major}.{minor}.x" if it exists, or
# 2. "main"
# 1. "branch/{major}.{minor}.x" if it exists, or "main"

on:
workflow_dispatch:
Expand Down Expand Up @@ -56,15 +55,6 @@ jobs:
with:
ref: ${{ inputs.target_branch }}

- name: Verify run from main
id: verify-main
run: |
# This action can only be run from main.
if [[ $GITHUB_REF != refs/heads/main ]]; then
echo " This action may only be run fom main" | tee -a $GITHUB_STEP_SUMMARY
exit 1
fi

- name: Prepare environment
id: prepare-env
run: |
Expand Down Expand Up @@ -145,8 +135,8 @@ jobs:

git add .

git config user.name github-actions
git config user.email github-actions@github.com
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "${pr_body}"

# Push the changes to the release branch:
Expand Down
4 changes: 2 additions & 2 deletions cccl-version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"full": "2.8.0",
"full": "2.9.0",
"major": 2,
"minor": 8,
"minor": 9,
"patch": 0
}
2 changes: 1 addition & 1 deletion cub/cub/version.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
* <tt>CUB_VERSION / 100 % 1000</tt> is the minor version.
* <tt>CUB_VERSION / 100000</tt> is the major version.
*/
#define CUB_VERSION 200800 // macro expansion with ## requires this to be a single value
#define CUB_VERSION 200900 // macro expansion with ## requires this to be a single value

/*! \def CUB_MAJOR_VERSION
* \brief The preprocessor macro \p CUB_MAJOR_VERSION encodes the
Expand Down
2 changes: 1 addition & 1 deletion lib/cmake/cccl/cccl-config-version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(CCCL_VERSION_MAJOR 2)
set(CCCL_VERSION_MINOR 8)
set(CCCL_VERSION_MINOR 9)
set(CCCL_VERSION_PATCH 0)
set(CCCL_VERSION_TWEAK 0)

Expand Down
2 changes: 1 addition & 1 deletion lib/cmake/cub/cub-config-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include("${CMAKE_CURRENT_LIST_DIR}/cub-header-search.cmake")

set(CUB_VERSION_MAJOR 2)
set(CUB_VERSION_MINOR 8)
set(CUB_VERSION_MINOR 9)
set(CUB_VERSION_PATCH 0)
set(CUB_VERSION_TWEAK 0)
set(CUB_VERSION "${CUB_VERSION_MAJOR}.${CUB_VERSION_MINOR}.${CUB_VERSION_PATCH}.${CUB_VERSION_TWEAK}")
Expand Down
2 changes: 1 addition & 1 deletion lib/cmake/cudax/cudax-config-version.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(cudax_VERSION_MAJOR 2)
set(cudax_VERSION_MINOR 8)
set(cudax_VERSION_MINOR 9)
set(cudax_VERSION_PATCH 0)
set(cudax_VERSION_TWEAK 0)

Expand Down
2 changes: 1 addition & 1 deletion lib/cmake/libcudacxx/libcudacxx-config-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include("${CMAKE_CURRENT_LIST_DIR}/libcudacxx-header-search.cmake")

set(libcudacxx_VERSION_MAJOR 2)
set(libcudacxx_VERSION_MINOR 8)
set(libcudacxx_VERSION_MINOR 9)
set(libcudacxx_VERSION_PATCH 0)
set(libcudacxx_VERSION_TWEAK 0)

Expand Down
2 changes: 1 addition & 1 deletion lib/cmake/thrust/thrust-config-version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include("${CMAKE_CURRENT_LIST_DIR}/thrust-header-search.cmake")

set(THRUST_VERSION_MAJOR 2)
set(THRUST_VERSION_MINOR 8)
set(THRUST_VERSION_MINOR 9)
set(THRUST_VERSION_PATCH 0) # Thrust: "subminor" CMake: "patch"
set(THRUST_VERSION_TWEAK 0)
set(THRUST_VERSION "${THRUST_VERSION_MAJOR}.${THRUST_VERSION_MINOR}.${THRUST_VERSION_PATCH}.${THRUST_VERSION_TWEAK}")
Expand Down
2 changes: 1 addition & 1 deletion libcudacxx/include/cuda/std/__cccl/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef __CCCL_VERSION_H
#define __CCCL_VERSION_H

#define CCCL_VERSION 2008000
#define CCCL_VERSION 2009000
#define CCCL_MAJOR_VERSION (CCCL_VERSION / 1000000)
#define CCCL_MINOR_VERSION (((CCCL_VERSION / 1000) % 1000))
#define CCCL_PATCH_VERSION (CCCL_VERSION % 1000)
Expand Down
2 changes: 1 addition & 1 deletion python/cuda_cooperative/cuda/cooperative/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

# This file is generated by ci/update_version.sh
# Do not edit this file manually.
__version__ = "0.1.2.8.0"
__version__ = "0.1.2.9.0"
2 changes: 1 addition & 1 deletion python/cuda_parallel/cuda/parallel/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

# This file is generated by ci/update_version.sh
# Do not edit this file manually.
__version__ = "0.1.2.8.0"
__version__ = "0.1.2.9.0"
2 changes: 1 addition & 1 deletion thrust/thrust/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* <tt>THRUST_VERSION / 100 % 1000</tt> is the minor version.
* <tt>THRUST_VERSION / 100000</tt> is the major version.
*/
#define THRUST_VERSION 200800 // macro expansion with ## requires this to be a single value
#define THRUST_VERSION 200900 // macro expansion with ## requires this to be a single value

/*! \def THRUST_MAJOR_VERSION
* \brief The preprocessor macro \p THRUST_MAJOR_VERSION encodes the
Expand Down
Loading