v0.5.0a2 #65
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
name: Build | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
published | |
jobs: | |
build_sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/*.tar.gz | |
# XX FIXME we ought to build the wheels *from* the sdist... | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.16.5 | |
env: | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse" | |
# We build abi3 wheels, so we only want to build once, on the lowest-supported-python | |
CIBW_BUILD: "cp39-*" | |
# would need to set up libunwind for this, and remoteprocess build.rs has hard-coded opinions | |
# about how this should be done that we'd need to work with/around. | |
CIBW_SKIP: "*musllinux*" | |
CIBW_BEFORE_ALL_LINUX: "bash ./prep-manylinux-container.sh" | |
CIBW_BEFORE_ALL_MACOS: "rustup target add aarch64-apple-darwin" | |
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"' | |
CIBW_ARCHS_LINUX: "x86_64" | |
CIBW_ARCHS_WINDOWS: "AMD64" | |
CIBW_ARCHS_MACOS: "universal2" | |
# env: | |
# CIBW_SOME_OPTION: value | |
# ... | |
# with: | |
# package-dir: . | |
# output-dir: wheelhouse | |
# config-file: "{package}/pyproject.toml" | |
- name: Audit wheels | |
shell: bash | |
run: pipx run abi3audit wheelhouse/*.whl | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
publish: | |
name: Publish to pypi | |
runs-on: ubuntu-latest | |
needs: [build_sdist, build_wheels] | |
if: github.event_name == 'release' && github.event.action == 'published' | |
environment: | |
name: pypi | |
url: https://pypi.org/p/perpetuo | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 |