Skip to content

Commit

Permalink
Merge pull request #5 from munechika-koyo/develop
Browse files Browse the repository at this point in the history
👷 fix cibuildwheel config
  • Loading branch information
munechika-koyo authored Nov 15, 2023
2 parents 314b73b + a241170 commit 42ce2f6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/build_dist.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,32 @@
# This workflow will build sdist & bdist of Python Package with specific python version.
# This workflow will build wheel files using cibuildwheel and upload them as artifacts

name: Build Distribution 📦
name: Build Wheel Distribution 📦

on:
workflow_dispatch:
push:
branches: [main]

permissions:
contents: read

jobs:
build_dist:
runs-on: ubuntu-latest
build_wheels:
name: Build wheels 📦 on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ['3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest]

steps:
- name: check out repo
uses: actions/checkout@v3
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Set up Python 🐍 ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Build Python 🐍 distribution 📦
run: |
python -m pip install build --user
python -m build
- name: Build 🐍 wheels
uses: pypa/[email protected]

- name: Upload distribution 📦 as artifact
uses: actions/upload-artifact@v3
with:
name: dist-python${{ matrix.python }}
path: dist/*
path: ./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-11]
os: [ubuntu-latest, macos-latest]

steps:
- name: Check out repo
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,7 @@ cython_debug/

# Python object files (.pickle)
**/regularizer*.pickle

# Python distribution / packaging
/wheelhouse
**/*.whl
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,11 @@ select = "*-musllinux*"
before-all = "apk add suitesparse-dev"

[tool.cibuildwheel.macos]
before-all = "brew install suite-sparse"
before-all = [
"brew install suite-sparse",
]
[tool.cibuildwheel.macos.environment]
CC = "gcc-12"
CXX = "gcc-12"
SUITESPARSE_INCLUDE_DIR="$(brew --prefix suite-sparse)/include"
SUITESPARSE_LIBRARY_DIR="$(brew --prefix suite-sparse)/lib"

0 comments on commit 42ce2f6

Please sign in to comment.