Skip to content

Commit

Permalink
Prep PI support. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Oct 22, 2024
1 parent dcd4fd2 commit 4bda664
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 42 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,42 @@ jobs:
org-check:
name: Check GitHub Organization
if: github.repository_owner == 'pex-tool'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
tests-36:
name: (${{ matrix.os }}) Python 3.6 Tests
tests-36-38:
name: (${{ matrix.os }}) Python ${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} Tests
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-24.04, macos-13]
python-version: [[3, 6, 15], [3, 7, 17], [3, 8, 18]]
steps:
- name: Checkout p537
uses: actions/checkout@v4
- name: Setup Python 3.6
- name: "Setup Python ${{ join(matrix.python-version, '.') }}"
# Upgrade node16 -> node20: Out for review here:
# https://github.com/gabrielfalcao/pyenv-action/pull/444
uses: pex-tool/pyenv-action@baec18679698d2f80064cc04eb9ad0c8dc5ca8f8
env:
ENSUREPIP: no
with:
default: "3.6.15"
default: "${{ join(matrix.python-version, '.') }}"
command: pip install -U tox
- name: Run Unit Tests
run: tox -e py36
tests-37-313:
name: (${{ matrix.os }}) Python 3.7 - 3.13 Tests
run: tox -e py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
tests-39-314:
name: (${{ matrix.os }}) Python 3.9 - 3.14 Tests
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
os: [ubuntu-24.04, macos-13, windows-2022]
steps:
- name: Checkout p537
uses: actions/checkout@v4
- name: Setup Python 3.7
uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Setup Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Setup Python 3.9
uses: actions/setup-python@v5
with:
Expand All @@ -76,17 +69,21 @@ jobs:
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13.0-alpha.2"
python-version: "3.13"
- name: Setup Python 3.14
uses: actions/setup-python@v5
with:
python-version: "3.14.0-alpha.1"
- name: Run Unit Tests
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: py37,py38,py39,py310,py311,py312,py313
tox-env: py39,py310,py311,py312,py313,py314
final-status:
name: Gather Final Status
needs:
- tests-36
- tests-37-313
runs-on: ubuntu-22.04
- tests-36-38
- tests-39-314
runs-on: ubuntu-24.04
steps:
- name: Check Non-Success
if: |
Expand Down
37 changes: 20 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'pex-tool' }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
determine-tag:
name: Determine the release tag to operate against.
needs: org-check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
release-tag: ${{ steps.determine-tag.outputs.release-tag }}
release-version: ${{ steps.determine-tag.outputs.release-version }}
Expand All @@ -39,41 +39,44 @@ jobs:
echo "::error::Release tag '${RELEASE_TAG}' must match 'v\d+.\d+.\d+'."
exit 1
fi
package-36-dists:
name: Package Distributions for Python 3.6
package-36-38-dists:
name: Package Distributions for Python 3.6 - 3.8
needs: determine-tag
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-24.04, macos-13]
python-version: [[3, 6, 15], [3, 7, 17], [3, 8, 18]]
steps:
- name: Checkout p537 ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v4
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
- name: Setup Python 3.6
uses: gabrielfalcao/pyenv-action@v18
- name: "Setup Python ${{ join(matrix.python-version, '.') }}"
# Upgrade node16 -> node20: Out for review here:
# https://github.com/gabrielfalcao/pyenv-action/pull/444
uses: pex-tool/pyenv-action@baec18679698d2f80064cc04eb9ad0c8dc5ca8f8
env:
ENSUREPIP: no
with:
default: "3.6.15"
default: "${{ join(matrix.python-version, '.') }}"
command: pip install -U tox
- name: Package ${{ needs.determine-tag.outputs.release-tag }}
run: tox -e package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.os }}-${{ needs.determine-tag.outputs.release-tag }}-3.6-distributions"
name: "${{ matrix.os }}-${{ needs.determine-tag.outputs.release-tag }}-${{ join(matrix.python-version, '.') }}-distributions"
path: dist/
retention-days: 1
package-37-313-dists:
name: Package Distributions for Python 3.7 - 3.13
package-39-314-dists:
name: Package Distributions for Python ${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
needs: determine-tag
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
python-version: [[3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [3, 13, "0-alpha.2"]]
os: [ubuntu-24.04, macos-13, windows-2022]
python-version: [[3, 9], [3, 10], [3, 11], [3, 12], [3, 13], [3, 14, "0-alpha.1"]]
steps:
- name: Checkout p537 ${{ needs.determine-tag.outputs.release-tag }}
uses: actions/checkout@v4
Expand All @@ -97,9 +100,9 @@ jobs:
name: Publish sdist and wheel to PyPI
needs:
- determine-tag
- package-36-dists
- package-37-313-dists
runs-on: ubuntu-22.04
- package-36-38-dists
- package-39-314-dists
runs-on: ubuntu-24.04
environment: Release
permissions:
id-token: write
Expand All @@ -110,7 +113,7 @@ jobs:
path: dist/
- name: Re-organize distributions for upload
run: |
mv -v dist/ubuntu-22.04-${{ needs.determine-tag.outputs.release-tag }}-3.12-distributions/*.tar.gz dist/
mv -v dist/ubuntu-24.04-${{ needs.determine-tag.outputs.release-tag }}-3.13-distributions/*.tar.gz dist/
mv -v dist/*-distributions/*.whl dist/
rm -rf dist/*-distributions
- name: Publish p537 ${{ needs.determine-tag.outputs.release-tag }}
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def long_description():

setup(
name='p537',
version='1.0.7',
version='1.0.8',
author="John Sirois",
author_email="[email protected]",
description='A tiny platform-specific distribution with a console script.',
Expand All @@ -30,8 +30,9 @@ def long_description():
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
],
python_requires=">=3.6,<3.14",
python_requires=">=3.6,<3.15",
ext_modules=[
Extension('p537', sources=['p537module.c']),
],
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ envlist =
py311
py312
py313
py314

[testenv]
deps =
Expand Down

0 comments on commit 4bda664

Please sign in to comment.