Skip to content

Commit

Permalink
[Cherry-pick] Update version number (#433) (#435)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <github-actions@github.com>
  • Loading branch information
Binyang2014 and github-actions authored Jan 3, 2025
1 parent 2ef070e commit 11e6202
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 5 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Update Version
on:
pull_request:
branches:
- main
- release/**
paths:
- 'VERSION'

permissions:
contents: write

jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Read version
id: read_version
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV

- name: Update Version in Files
run: |
VERSION=${{ env.VERSION }}
sed -i "s/^version: .*/version: ${VERSION}/" CITATION.cff
sed -i "s/^release = \".*\"/release = \"v${VERSION}\"/" docs/conf.py
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml
# Update header file
IFS='.' read -ra VER <<< "$VERSION"
MAJOR=${VER[0]}
MINOR=${VER[1]}
PATCH=${VER[2]}
sed -i "s/#define MSCCLPP_MAJOR .*/#define MSCCLPP_MAJOR ${MAJOR}/" include/mscclpp/core.hpp
sed -i "s/#define MSCCLPP_MINOR .*/#define MSCCLPP_MINOR ${MINOR}/" include/mscclpp/core.hpp
sed -i "s/#define MSCCLPP_PATCH .*/#define MSCCLPP_PATCH ${PATCH}/" include/mscclpp/core.hpp
- name: Commit and Push Changes
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add CITATION.cff docs/conf.py include/mscclpp/core.hpp pyproject.toml || true
if git diff --cached --exit-code; then
echo "No changes to commit."
else
git commit -m "Update version to ${{ env.VERSION }}"
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cff-version: 1.2.0
title: "MSCCL++: A GPU-driven communication stack for scalable AI applications"
version: 0.5.2
version: 0.6.0
message: >-
If you use this project in your research, please cite it as below.
authors:
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.6.0
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
project = "mscclpp"
copyright = "2024, MSCCL++ Team"
author = "MSCCL++ Team"
release = "v0.5.2"
release = "v0.6.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
4 changes: 2 additions & 2 deletions include/mscclpp/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#define MSCCLPP_CORE_HPP_

#define MSCCLPP_MAJOR 0
#define MSCCLPP_MINOR 5
#define MSCCLPP_PATCH 2
#define MSCCLPP_MINOR 6
#define MSCCLPP_PATCH 0
#define MSCCLPP_VERSION (MSCCLPP_MAJOR * 10000 + MSCCLPP_MINOR * 100 + MSCCLPP_PATCH)

#include <array>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "mscclpp"
version = "0.5.2"
version = "0.6.0"

[tool.scikit-build]
cmake.version = ">=3.25.0"
Expand Down

0 comments on commit 11e6202

Please sign in to comment.