diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml new file mode 100644 index 000000000..39c7f458a --- /dev/null +++ b/.github/workflows/update-version.yml @@ -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 }} diff --git a/CITATION.cff b/CITATION.cff index 629ae2fb2..10a254694 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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: diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..a918a2aa1 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.6.0 diff --git a/docs/conf.py b/docs/conf.py index 4d3a91022..efcd3eaee 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 diff --git a/include/mscclpp/core.hpp b/include/mscclpp/core.hpp index b2758d9e8..7f97382dd 100644 --- a/include/mscclpp/core.hpp +++ b/include/mscclpp/core.hpp @@ -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 diff --git a/pyproject.toml b/pyproject.toml index b60ac4209..d5e6d3230 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"