Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 13 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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/*

Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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/)
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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" }]

Expand All @@ -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<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
result = "{major}.{minor}.{patch}"


[tool.scikit-build]
cmake.version = ">=3.15"
wheel.packages = ["pycapio"]
Expand Down
Loading