-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,50 @@ | ||
name: Build and upload to PyPI | ||
# https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml | ||
# Best comparable example: https://github.com/pdfo/pdfo | ||
|
||
# Build on every branch push, tag push, and pull request change: | ||
#on: [push, pull_request] | ||
# Alternatively, to publish when a (published) GitHub Release is created, use the following: | ||
on: | ||
release: | ||
types: | ||
- published | ||
# Build on every pull request (no need for every push) and release change: | ||
on: [pull_request, release] | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | ||
|
||
steps: | ||
- name: Setup C/C++ Compiler | ||
- name: Install compiler | ||
if: false == contains( matrix.os, 'windows') | ||
id: install_cc | ||
uses: rlalik/setup-cpp-compiler@v1.2 | ||
uses: rlalik/setup-cpp-compiler@master | ||
with: | ||
compiler: gcc #clang | ||
compiler: clang | ||
|
||
- name: Install mingw-w64 on Windows | ||
if: contains( matrix.os, 'windows') | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
path-type: inherit | ||
install: | | ||
mingw-w64-x86_64-gcc | ||
mingw-w64-x86_64-gcc-fortran | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
- name: Build wheels mac and linux | ||
if: false == contains( matrix.os, 'windows') | ||
uses: pypa/[email protected] | ||
env: | ||
CC: '${{ steps.install_cc.outputs.cc }}' | ||
CXX: '${{ steps.install_cc.outputs.cxx }}' | ||
uses: pypa/[email protected] | ||
CC: ${{ steps.install_cc.outputs.cc }} | ||
CXX: ${{ steps.install_cc.outputs.cxx }} | ||
|
||
- name: Build wheels windows | ||
if: contains( matrix.os, 'windows') | ||
uses: pypa/[email protected] | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
|
@@ -41,7 +54,7 @@ jobs: | |
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
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 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