Skip to content

bump dependencies, overhaul build action #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 20, 2024
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
109 changes: 0 additions & 109 deletions .github/workflows/build.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/workflows/cibuildwheel_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[tool.cibuildwheel]
skip = "cp36-*" # scikit-build-core requires >=3.7
build-verbosity = 3

[tool.cibuildwheel.linux]
before-all = [
"yum remove -y cmake",
]
79 changes: 79 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Build and Publish

# NOTE: build logic is duplicated here and in test_build.yml

# Run on the main branch for commits only
on:
push:
branches:
- master

jobs:
build_wheels:

# only run if the most recent commit contains '[ci publish]'
if: "contains(github.event.head_commit.message, '[ci publish]')"

strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]

name: Build wheels ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Package source distribution
if: runner.os == 'Linux'
run: |
python -m pip install build
python -m build --sdist

- name: Run cibuildwheel
uses: pypa/[email protected]
with:
config-file: ".github/workflows/cibuildwheel_config.toml"

# Upload binaries to the github artifact store
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: |
./wheelhouse/*.whl
./wheelhouse/*.tar.gz
overwrite: true

# Push the resulting binaries to pypi on a tag starting with 'v'
upload_pypi:
name: Upload release to PyPI

# only run if the most recent commit contains '[ci publish]'
if: "contains(github.event.head_commit.message, '[ci publish]')"

needs: [build_wheels]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/robust-laplacian/
permissions: # we authenticate via PyPI's 'trusted publisher' workflow, this permission is required
id-token: write
steps:
- name: Download built wheels artifact # downloads from the jobs storage from the previous step
uses: actions/[email protected]
with:
# omitting the `name: ` field downloads all artifacts from this workflow
path: dist

- name: List downloaded files from artifact
run: ls dist | cat # piping through cat prints one per line

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# with:
# To test: repository_url: https://test.pypi.org/legacy/

53 changes: 53 additions & 0 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test Build

# NOTE: build logic is duplicated here and in publish.yml

# Run on the master branch commit push and PRs to master (note conditional below)
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build_wheels:

# Only run if the commit message contains '[ci build]'
if: "contains(toJSON(github.event.commits.*.message), '[ci build]') || contains(toJSON(github.event.pull_request.title), '[ci build]')"

strategy:
fail-fast: false
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]

name: Build wheels ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Package source distribution
if: runner.os == 'Linux'
run: |
python -m pip install build
python -m build --sdist

- name: Run cibuildwheel
uses: pypa/[email protected]
with:
config-file: ".github/workflows/cibuildwheel_config.toml"

# Upload binaries to the github artifact store
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: |
./wheelhouse/*.whl
./wheelhouse/*.tar.gz
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/test_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
python-version: '3.9'

- name: install python packages
run: python3 -m pip install numpy scipy
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
with:
submodules: 'recursive'

# Use system python on mac; 3.9 seems to be available and this way there aren't multiple versions floating around
#- uses: actions/setup-python@v2
#name: Install Python
#with:
#python-version: '3.7'
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.9'

- name: install python packages
run: python3 -m pip install numpy scipy
Expand Down
2 changes: 1 addition & 1 deletion deps/geometry-central
Submodule geometry-central updated 177 files
2 changes: 1 addition & 1 deletion deps/pybind11
Submodule pybind11 updated 193 files
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[project]
name = "robust_laplacian"
version = "0.2.8"
description = "Robust Laplace matrices for meshes and point clouds"
readme = "README.md"
license.file = "LICENSE"
authors = [
{ name = "Nicholas Sharp", email = "[email protected]" },
]
maintainers = [
{ name = "Nicholas Sharp", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.7"

dependencies = [
"numpy",
]

[project.urls]
Homepage = "https://github.com/nmwsharp/robust-laplacians-py"

[build-system]
requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"

[tool.scikit-build]
build.verbose = true
logging.level = "INFO"
Loading
Loading