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 .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 34c631c
_commit: fead162
_src_path: https://github.com/python-project-templates/base.git
add_docs: true
add_extension: cpp
Expand Down
58 changes: 31 additions & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,6 @@ jobs:
run: make checks
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'

- name: Install build dependencies
run: pip install cibuildwheel

- name: Build (Linux)
run: make build-cibw
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'ubuntu-latest'

- name: Build (Macos)
run: make build-cibw
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'macos-latest'

- name: Build (Windows)
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
make build-cibw
shell: cmd
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64"
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if: matrix.os == 'windows-latest'

- name: Test
run: make coverage

Expand All @@ -132,6 +105,37 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Install build dependencies
run: pip install cibuildwheel

- name: Make dist (Linux)
run: |
make dist-py-sdist
make dist-py-wheel
make dist-check
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'ubuntu-latest'

- name: Make dist (Macos)
run: |
make dist-py-wheel
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
CIBW_BUILD_VERBOSITY: 3
if: matrix.os == 'macos-latest'

- name: Make dist (Windows)
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
make dist-py-wheel
shell: cmd
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64"
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if: matrix.os == 'windows-latest'

- uses: actions/upload-artifact@v7
with:
name: dist-${{matrix.os}}-${{matrix.python-version}}
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ build-py:
build-cpp:
python -m hatchling build --hooks-only

build-cibw:
python -m cibuildwheel --output-dir dist

build: build-cpp build-py ## build the project

.PHONY: install
Expand Down Expand Up @@ -114,15 +111,18 @@ major: ## bump a major version
########
# DIST #
########
.PHONY: dist dist-py dist-check publish
.PHONY: dist-py-wheel dist-py-sdist dist-check dist publish

dist-py-wheel: ## build python wheel
python -m cibuildwheel --output-dir dist

dist-py: ## build python dists
python -m build -w -s
dist-py-sdist: ## build python sdist
python -m build --sdist -o dist

dist-check: ## run python dist checker with twine
python -m twine check dist/*

dist: clean build dist-js dist-py dist-check ## build all dists
dist: clean build dist-py-wheel dist-py-sdist dist-check ## build all dists

publish: dist ## publish python assets

Expand Down
Loading