Build wheels without ABI/CPython tags, properly repair wheels #172
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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 3 | |
jobs: | |
style: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: 3.12 | |
- name: Run style checks | |
run: pipx run nox -s lint | |
build_wheels: | |
needs: [style] | |
name: ${{ matrix.runs-on }}-python-${{ matrix.python-version }} | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.12", "3.13"] | |
runs-on: [ubuntu-latest, macos-13, macos-14, windows-latest] | |
exclude: | |
# https://github.com/actions/setup-python/issues/808 | |
- python-version: "3.8" | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Set up Go toolchain | |
id: setup-go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: "1.22.1" | |
cache: false | |
check-latest: true | |
- name: Install MinGW on Windows | |
if: matrix.runs-on == 'windows-latest' | |
run: choco install mingw | |
- name: Restore Hugo builder cache | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ./hugo_cache/ | |
key: ${{ matrix.runs-on }}-hugo-${{ steps.setup-go.outputs.go-version }} | |
- name: Install Python dependencies | |
run: python -m pip install build virtualenv nox | |
- name: Build binary distribution (wheel) | |
run: | | |
python -m build --wheel . --outdir wheelhouse/ | |
- name: Test entry points for package | |
run: nox -s venv | |
inspect_distributions: | |
needs: [style] | |
name: inspect-sdist-wheel-contents | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: 3.12 | |
- name: Build source distribution (SDist) and binary distribution (wheel) | |
run: | | |
pipx run build --sdist --wheel . --outdir dist/ | |
pipx run twine check dist/* --strict | |
- name: Build, inspect, and display contents of distributions | |
shell: bash | |
run: | | |
mkdir -p output/sdist | |
tar -xf dist/*.tar.gz -C output/sdist | |
echo -e '## View source distribution (SDist) contents\n' >> $GITHUB_STEP_SUMMARY | |
echo -e '```\n' >> $GITHUB_STEP_SUMMARY | |
(cd output/sdist && tree -a * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY) | |
echo -e '\n```\n' >> $GITHUB_STEP_SUMMARY | |
mkdir -p output/wheel | |
pipx run wheel unpack dist/*.whl -d output/wheel | |
echo -e '## View binary distribution (wheel) contents\n' >> $GITHUB_STEP_SUMMARY | |
echo -e '```\n' >> $GITHUB_STEP_SUMMARY | |
(cd output/wheel && tree -a * | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY) | |
echo -e '\n```\n' >> $GITHUB_STEP_SUMMARY |