diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 11c46f5..de2be35 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Check out repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9442506..84165ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,33 +8,24 @@ on: workflow_dispatch: jobs: - check-version: - name: Check for Version Bump - if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} + check-tag-existance: + name: "Check if tag exists" runs-on: ubuntu-latest outputs: - tag_exists: ${{ steps.check-tag.outputs.exists }} - version: ${{ steps.get-version.outputs.version }} + exists: ${{ steps.check-tag.outputs.exists }} steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Extract Version from CMakeLists.txt - id: get-version - run: | - VERSION=$(grep -E 'VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | awk '{print $2}') - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Check if git tag exists + - uses: actions/checkout@v6 + - name: "Get CAPIO-CL version" + run: echo "PYCAPIO_VERSION=$(grep -E 'VERSION [0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt | awk '{print $2}')" >> $GITHUB_ENV + - name: "Check if tag exists" id: check-tag uses: mukunku/tag-exists-action@v1.7.0 with: - tag: "v${{ steps.get-version.outputs.version }}" + tag: "v${{ env.PYCAPIO_VERSION }}" build-wheels: name: Build wheels on ${{ matrix.os }} - needs: check-version - # GATEKEEPER: Only proceed if the tag DOES NOT exist + needs: check-tag-existance if: needs.check-version.outputs.tag_exists == 'false' runs-on: ${{ matrix.os }} strategy: @@ -76,7 +67,7 @@ jobs: build-sdist: name: Build source distribution - needs: check-version + needs: check-tag-existance if: needs.check-version.outputs.tag_exists == 'false' runs-on: ubuntu-latest steps: @@ -101,7 +92,7 @@ jobs: publish: name: Release and Publish to PyPI - needs: [check-version, build-wheels, build-sdist] + needs: [check-tag-existance, build-wheels, build-sdist] if: needs.check-version.outputs.tag_exists == 'false' runs-on: ubuntu-latest permissions: @@ -126,8 +117,8 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - tag_name: "v${{ needs.check-version.outputs.version }}" - name: "v${{ needs.check-version.outputs.version }}" + tag_name: "v${{ env.PYCAPIO_VERSION }}" + name: "v${{ env.PYCAPIO_VERSION }}" generate_release_notes: true files: dist/* diff --git a/CMakeLists.txt b/CMakeLists.txt index 25e220d..89753b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required(VERSION 3.15) -project(PyCAPIO) +project(PyCAPIO + LANGUAGES CXX + DESCRIPTION "Native integration of the CAPIO methodology within the python interpreter" + VERSION 0.0.1 +) include(FetchContent) include(ExternalProject) diff --git a/README.md b/README.md index 79c719a..90a9e9c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # PyCAPIO [![codecov](https://codecov.io/gh/High-Performance-IO/PyCAPIO/graph/badge.svg?token=YOUR_TOKEN)](https://codecov.io/gh/OWNER/REPO) -[![CI Tests](https://github.com/High-Performance-IO/PyCAPIO/actions/workflows/ci.yml/badge.svg)](https://github.com/High-Performance-IO/PyCAPIO/actions) +[![CI Tests](https://github.com/High-Performance-IO/PyCAPIO/actions/workflows/ci_cd.yml/badge.svg)](https://github.com/High-Performance-IO/PyCAPIO/actions) [![PyPI version](https://img.shields.io/pypi/v/pycapio.svg)](https://pypi.org/project/pycapio/) [![Python Versions](https://img.shields.io/pypi/pyversions/pycapio.svg)](https://pypi.org/project/pycapio/) diff --git a/pyproject.toml b/pyproject.toml index 66dbdd2..decb135 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pycapio" -version = "0.0.1" +dynamic = ["version"] description = "Python interface library for the libcapio library" authors = [{ name = "Marco Edoardo Santimaria", email = "marcoedoardo.santimaria@unito.it" }] @@ -26,6 +26,13 @@ Source = "https://github.com/high-performance-io/libcapio" [project.scripts] pycapio = "pycapio.__main__:main" +[tool.scikit-build.metadata.version] +provider = "scikit_build_core.metadata.regex" +input = "CMakeLists.txt" +regex = "(?m)VERSION\\s+(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" +result = "{major}.{minor}.{patch}" + + [tool.scikit-build] cmake.version = ">=3.15" wheel.packages = ["pycapio"]