Skip to content

Commit 11e6202

Browse files
Binyang2014github-actions
and
github-actions
authored
[Cherry-pick] Update version number (#433) (#435)
Co-authored-by: github-actions <[email protected]>
1 parent 2ef070e commit 11e6202

File tree

6 files changed

+62
-5
lines changed

6 files changed

+62
-5
lines changed

Diff for: .github/workflows/update-version.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Update Version
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- release/**
7+
paths:
8+
- 'VERSION'
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
update-version:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
21+
fetch-depth: 0
22+
23+
- name: Read version
24+
id: read_version
25+
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
26+
27+
- name: Update Version in Files
28+
run: |
29+
VERSION=${{ env.VERSION }}
30+
sed -i "s/^version: .*/version: ${VERSION}/" CITATION.cff
31+
sed -i "s/^release = \".*\"/release = \"v${VERSION}\"/" docs/conf.py
32+
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml
33+
34+
# Update header file
35+
IFS='.' read -ra VER <<< "$VERSION"
36+
MAJOR=${VER[0]}
37+
MINOR=${VER[1]}
38+
PATCH=${VER[2]}
39+
40+
sed -i "s/#define MSCCLPP_MAJOR .*/#define MSCCLPP_MAJOR ${MAJOR}/" include/mscclpp/core.hpp
41+
sed -i "s/#define MSCCLPP_MINOR .*/#define MSCCLPP_MINOR ${MINOR}/" include/mscclpp/core.hpp
42+
sed -i "s/#define MSCCLPP_PATCH .*/#define MSCCLPP_PATCH ${PATCH}/" include/mscclpp/core.hpp
43+
44+
- name: Commit and Push Changes
45+
run: |
46+
git config user.name "github-actions"
47+
git config user.email "[email protected]"
48+
git add CITATION.cff docs/conf.py include/mscclpp/core.hpp pyproject.toml || true
49+
if git diff --cached --exit-code; then
50+
echo "No changes to commit."
51+
else
52+
git commit -m "Update version to ${{ env.VERSION }}"
53+
git push
54+
fi
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: CITATION.cff

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cff-version: 1.2.0
22
title: "MSCCL++: A GPU-driven communication stack for scalable AI applications"
3-
version: 0.5.2
3+
version: 0.6.0
44
message: >-
55
If you use this project in your research, please cite it as below.
66
authors:

Diff for: VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.6.0

Diff for: docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = "mscclpp"
1010
copyright = "2024, MSCCL++ Team"
1111
author = "MSCCL++ Team"
12-
release = "v0.5.2"
12+
release = "v0.6.0"
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

Diff for: include/mscclpp/core.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#define MSCCLPP_CORE_HPP_
66

77
#define MSCCLPP_MAJOR 0
8-
#define MSCCLPP_MINOR 5
9-
#define MSCCLPP_PATCH 2
8+
#define MSCCLPP_MINOR 6
9+
#define MSCCLPP_PATCH 0
1010
#define MSCCLPP_VERSION (MSCCLPP_MAJOR * 10000 + MSCCLPP_MINOR * 100 + MSCCLPP_PATCH)
1111

1212
#include <array>

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "scikit_build_core.build"
77

88
[project]
99
name = "mscclpp"
10-
version = "0.5.2"
10+
version = "0.6.0"
1111

1212
[tool.scikit-build]
1313
cmake.version = ">=3.25.0"

0 commit comments

Comments
 (0)