-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move to scikit-build-core (#887)
* feat: move to scikit-build-core Signed-off-by: Henry Schreiner <[email protected]> * Update emscripten.yaml * Update .github/workflows/emscripten.yaml * fix: modernize CMake usage Signed-off-by: Henry Schreiner <[email protected]> * fix: use CMake 3.24 & smart downloading Signed-off-by: Henry Schreiner <[email protected]> * fix: a few mistakes Signed-off-by: Henry Schreiner <[email protected]> * style: pre-commit fixes * Update tests.yml * Update tests.yml * style: pre-commit fixes * Update tests.yml * ci: split up win job Signed-off-by: Henry Schreiner <[email protected]> * fix: add features from setup.py to CMake Signed-off-by: Henry Schreiner <[email protected]> * Update dev-requirements.txt * Update CMakeLists.txt * fix: better build options Signed-off-by: Henry Schreiner <[email protected]> * ci: nicer setup Signed-off-by: Henry Schreiner <[email protected]> --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c88b660
commit 64d41af
Showing
13 changed files
with
218 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
clang-tidy: | ||
name: Clang-Tidy | ||
runs-on: ubuntu-latest | ||
container: silkeh/clang:15-bullseye | ||
container: silkeh/clang:18-bookworm | ||
|
||
steps: | ||
- name: Install requirements | ||
|
@@ -31,10 +31,10 @@ jobs: | |
submodules: true | ||
|
||
- name: Install extra requirements | ||
run: python3 -m pip install setuptools_scm | ||
run: python3 -m pip install setuptools_scm --break-system-packages | ||
|
||
- name: Configure | ||
run: cmake -S . -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--warnings-as-errors=*" | ||
run: cmake -S. -Bbuild -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--warnings-as-errors=*" | ||
|
||
- name: Build | ||
run: cmake --build build -j 2 | ||
|
@@ -55,6 +55,7 @@ jobs: | |
pipx run nox -s pylint | ||
cmake: | ||
name: CMake 🐍 ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
env: | ||
PIP_ONLY_BINARY: numpy | ||
|
@@ -66,8 +67,6 @@ jobs: | |
- python-version: "3.8" | ||
cmake-extras: "-DCMAKE_CXX_STANDARD=17" | ||
|
||
name: CMake Python ${{ matrix.python-version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -80,10 +79,10 @@ jobs: | |
allow-prereleases: true | ||
|
||
- name: Install python tools | ||
run: python -m pip install -r dev-requirements.txt pytest-github-actions-annotate-failures numpy>=2.0a1 | ||
run: python -m pip install -r dev-requirements.txt pytest-github-actions-annotate-failures numpy>=2.0.0rc1 | ||
|
||
- name: Configure | ||
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }} | ||
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }} | ||
|
||
- name: Build | ||
run: cmake --build build -j 2 | ||
|
@@ -93,30 +92,56 @@ jobs: | |
run: python -m pytest -ra | ||
|
||
build_wheels: | ||
name: Wheels on ${{ matrix.os }} | ||
name: ${{ matrix.build }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-2019, macos-latest] | ||
include: | ||
- os: ubuntu-latest | ||
build: cp312-manylinux_x86_64 | ||
- os: windows-2019 | ||
build: cp38-win32 | ||
- os: windows-2019 | ||
build: cp37-win_amd64 | ||
- os: macos-13 | ||
build: cp39-macosx_x86_64 | ||
- os: macos-14 | ||
build: cp39-macosx_arm64 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: cp38-win32 cp312-manylinux_x86_64 cp37-macosx_x86_64 | ||
CIBW_BUILD: "${{ matrix.build }}" | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=:all:" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: wheelhouse/* | ||
name: test-wheels-${{ strategy.job-index }} | ||
|
||
# Pipx is either missing or broken on macos-14 runners ATM | ||
- name: Install twine | ||
run: pip install twine | ||
|
||
- name: Check wheels | ||
run: pipx run twine check wheelhouse/* | ||
run: twine check wheelhouse/* | ||
shell: bash | ||
|
||
pass: | ||
if: always() | ||
needs: [clang-tidy, pylint, cmake, build_wheels] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
cloudpickle | ||
dataclasses; python_version<'3.7' | ||
hypothesis >=6.0 | ||
numpy | ||
pytest >=6,!=6.1.0,!=7.1.0 | ||
pytest-benchmark | ||
setuptools >=42 | ||
setuptools_scm[toml] >=3.4,!=4.0.0 | ||
typing_extensions; python_version<'3.8' | ||
uproot |
Oops, something went wrong.