From 3d798ce4bfeda7c8e1cd5299383af20517c07bc1 Mon Sep 17 00:00:00 2001 From: marcoSanti Date: Tue, 28 Jul 2026 20:13:40 +0200 Subject: [PATCH 1/2] Updated and improved CI/CD --- .github/dependabot.yml | 4 ++++ .github/workflows/cpp-tests.yml | 12 ++++++------ .github/workflows/python-tests.yml | 2 +- .github/workflows/release.yml | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6a7695c..645c171 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,7 @@ updates: directory: "/" schedule: interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/cpp-tests.yml b/.github/workflows/cpp-tests.yml index c2ec14d..eb7b840 100644 --- a/.github/workflows/cpp-tests.yml +++ b/.github/workflows/cpp-tests.yml @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@v7 - - name: Install prebuilt Protobuf + - name: Install Protobuf uses: mamba-org/setup-micromamba@v2 with: environment-name: calf-ci @@ -63,7 +63,7 @@ jobs: -DCALF_PYTHON_TESTS=OFF \ -DCALF_PROTOBUF_FETCH=OFF - - name: Verify prebuilt Protobuf + - name: Verify Protobuf shell: bash run: test ! -d "${GITHUB_WORKSPACE}/build/_deps/protobuf-src" @@ -71,7 +71,7 @@ jobs: shell: bash -el {0} run: cmake --build "${GITHUB_WORKSPACE}/build" --parallel - - name: Run C++ tests + - name: Run tests shell: bash -el {0} working-directory: build run: ctest --output-on-failure @@ -87,7 +87,7 @@ jobs: steps: - uses: actions/checkout@v7 - - name: Install prebuilt Protobuf + - name: Install Protobuf uses: mamba-org/setup-micromamba@v2 with: environment-name: calf-ci @@ -110,7 +110,7 @@ jobs: -DCALF_PYTHON_TESTS=OFF \ -DCALF_PROTOBUF_FETCH=OFF - - name: Verify prebuilt Protobuf + - name: Verify Protobuf shell: bash run: test ! -d "${GITHUB_WORKSPACE}/build/_deps/protobuf-src" @@ -118,7 +118,7 @@ jobs: shell: bash -el {0} run: cmake --build "${GITHUB_WORKSPACE}/build" --parallel - - name: Run C++ tests + - name: Run tests shell: bash -el {0} working-directory: build run: ctest --output-on-failure diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 91ac142..cb26408 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -40,7 +40,7 @@ jobs: if: startsWith(matrix.os, 'macos-') run: brew install cmake ninja - - name: Build and install capio-calf with PyPI Protobuf + - name: Build wheels run: python -m pip install ".[test]" - name: Run Python tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index daeee08..71ab9b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release Python Wheels +name: Release New Version on: workflow_run: @@ -88,7 +88,7 @@ jobs: if-no-files-found: error sdist: - name: Source distribution + name: Sdist needs: release-version if: needs.release-version.outputs.should_publish == 'true' runs-on: ubuntu-24.04 From 5e3818e150746254e29b796925ba9a0d018ea642 Mon Sep 17 00:00:00 2001 From: marcoSanti Date: Tue, 28 Jul 2026 20:19:43 +0200 Subject: [PATCH 2/2] Updated pyproject.toml --- pyproject.toml | 17 ++++++++++------- requirements.txt | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 970d23f..9e07212 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [build-system] requires = [ - "scikit-build-core[pyproject]==0.11.6", + "scikit-build-core[pyproject]==1.0.3", + "dynamic-metadata==0.5.0", "pybind11==3.0.1", "setuptools==80.9.0", "wheel==0.45.1", @@ -9,7 +10,7 @@ build-backend = "scikit_build_core.build" [project] name = "capio-calf" -dynamic = ["version"] +dynamic = ["version", "dependencies"] description = "CAPIO Logging Facility and interactive trace inspector" readme = "README.md" license = { file = "LICENSE" } @@ -17,10 +18,6 @@ requires-python = ">=3.10" authors = [ { name = "Marco Edoardo Santimaria", email = "marcoedoardo.santimaria@unito.it" }, ] -dependencies = [ - "numpy>=1.24.0", - "protobuf>=6.31.1,<7", -] [project.optional-dependencies] test = ["pytest>=8.0"] @@ -48,8 +45,14 @@ wheel.exclude = [ CALF_BUILD_PYTHON_BINDINGS = true CALF_PROTOBUF = false -[tool.scikit-build.metadata.version] +[[tool.dynamic-metadata]] provider = "scikit_build_core.metadata.regex" +field = "version" input = "CMakeLists.txt" regex = "(?m)VERSION\\s+(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" result = "{major}.{minor}.{patch}" + +[[tool.dynamic-metadata]] +provider = "dynamic_metadata.from_file" +field = "dependencies" +path = "requirements.txt" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..de6c61d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +numpy>=1.24.0 +protobuf>=6.31.1,<7