generated from mscheltienne/template-python
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from larsoner/cmake
BUG: Fix bug with req for manylinux image
- Loading branch information
Showing
12 changed files
with
247 additions
and
165 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
name: ci | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | ||
cancel-in-progress: true | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 8 * * 1' | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
cibuildwheel: | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | ||
name: build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pypa/cibuildwheel@v2.20.0 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-native | ||
path: ./wheelhouse/*.whl | ||
|
||
cibuildwheel_emulated_cross: # separate out because it's slower and not tested separately | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
arch: aarch64 | ||
- os: windows-latest | ||
arch: ARM64 | ||
name: build wheels on ${{ matrix.os }} ${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup emulation on Linux | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
if: runner.os == 'Linux' | ||
- uses: pypa/cibuildwheel@v2.20.0 | ||
env: | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
# https://cibuildwheel.pypa.io/en/stable/faq/#windows-arm64 | ||
CIBW_TEST_SKIP: "*-win_arm64" | ||
CIBW_BEFORE_BUILD_WINDOWS: bash ./.github/workflows/cibw_before_build_windows_cross.sh | ||
CIBW_BUILD_VERBOSITY: 3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
test: | ||
needs: cibuildwheel | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | ||
python: ["3.9", "3.12"] | ||
name: test wheels on ${{ matrix.os }} ${{ matrix.python }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-wheels-* | ||
merge-multiple: true | ||
path: dist | ||
- run: ls -alt . && ls -alt dist/ | ||
- run: pip install --only-binary antio antio[test] --find-links dist | ||
- run: pytest tests/ --cov=antio --cov-report=xml | ||
- uses: codecov/codecov-action@v4 | ||
|
||
sdist: | ||
timeout-minutes: 10 | ||
name: create sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- run: pip install --upgrade build | ||
- run: python -m build --sdist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-sdist | ||
path: ./dist/*.tar.gz | ||
|
||
check: | ||
needs: [cibuildwheel, cibuildwheel_emulated_cross, sdist] | ||
timeout-minutes: 10 | ||
name: check dist/* | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-wheels-* | ||
merge-multiple: true | ||
path: dist | ||
- run: ls -alt . && ls -alt dist/ | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- run: pip install --upgrade twine | ||
- run: twine check --strict dist/* | ||
|
||
publish: | ||
needs: [check, test] | ||
name: publish PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/antio | ||
timeout-minutes: 10 | ||
if: github.event_name == 'release' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-wheels-* | ||
merge-multiple: true | ||
path: dist | ||
- uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
pip install delvewheel | ||
echo "CMAKE_GENERATOR=Visual Studio 17 2022" | tee -a $GITHUB_ENV | ||
echo "CMAKE_GENERATOR_PLATFORM=$CIBW_ARCHS" | tee -a $GITHUB_ENV | ||
PY_VER=$(python -c "import sys; print('.'.join(map(str, sys.version_info[:3])))") | ||
Python3_SABI_LIBRARY="C:\\Users\\runneradmin\\AppData\\Local\\pypa\\cibuildwheel\\Cache\\nuget-cpython\\python${CIBW_ARCHS,,}.${PY_VER}\\tools\\libs\\python3.lib" | ||
echo "Python3_SABI_LIBRARY=$Python3_SABI_LIBRARY" | tee -a $GITHUB_ENV |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.