Rename to sspilib #67
Workflow file for this run
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: Test pysspi | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build_sdist: | |
name: build sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: build sdist | |
run: | | |
python -m pip install build | |
python -m build --sdist | |
env: | |
SSPI_SKIP_EXTENSIONS: true | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifact | |
path: ./dist/*.tar.gz | |
build_wheels: | |
name: build wheels | |
needs: | |
- build_sdist | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macOS-12 | |
version: cp*-macosx_x86_64 | |
- os: macOS-12 | |
version: cp*-macosx_arm64 | |
- os: ubuntu-latest | |
version: cp*-manylinux_x86_64 | |
- os: windows-2022 | |
version: cp*-win_amd64 | |
- os: windows-2022 | |
version: cp*-win_arm64 | |
- os: windows-2022 | |
version: cp*-win32 | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: ./ | |
- name: extract sdist | |
shell: bash | |
run: | | |
tar xf sspilib-*.tar.gz | |
mv sspilib-*/* . | |
rm -r sspilib-*/ | |
rm sspilib-*.tar.gz | |
- name: build wheel | |
uses: pypa/cibuildwheel@v2.16.0 | |
env: | |
CIBW_ARCHS: all | |
CIBW_TEST_SKIP: '*_arm64' | |
CIBW_BUILD: ${{ matrix.version }} | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease || 'false' }} | |
SSPI_BUILD_MACOS_AARCH64: ${{ fromJSON('["", "true"]')[matrix.version == 'cp*-macosx_arm64'] }} | |
SSPI_SKIP_MODULE_CHECK: ${{ fromJSON('["", "true"]')[matrix.version == 'cp*-macosx_arm64' || matrix.version == 'cp*-win_arm64'] }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
name: artifact | |
test: | |
name: test | |
needs: | |
- build_sdist | |
- build_wheels | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macOS-12 | |
- ubuntu-latest | |
- windows-latest | |
python-version: | |
- 3.8 | |
- 3.9 | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
python-arch: | |
- x86 | |
- x64 | |
exclude: | |
- os: macOS-12 | |
python-arch: x86 | |
- os: ubuntu-latest | |
python-arch: x86 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.python-arch }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: ./dist | |
- name: Test | |
shell: bash | |
run: build_helpers/run-ci.sh | |
env: | |
PYTEST_ADDOPTS: --color=yes | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Unit Test Results (${{ matrix.os }} ${{ matrix.python-version }}) ${{ matrix.python-arch }} | |
path: ./junit/test-results.xml | |
publish: | |
name: publish | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: ./dist | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: pypa/gh-action-pypi-publish@release/v1 |