Skip to content

Commit

Permalink
Bumping python versions in GitHub workflows and pyproject.toml
Browse files Browse the repository at this point in the history
* Updated the python-version in .github/workflows/disperse.yml
* Updated the python-version in .github/workflows/pythonpackage.yml
* Updated the python-version in .github/workflows/wheels.yaml
* Updated the requires-python field in pyproject.toml to 3.9
  • Loading branch information
jelmer committed Nov 14, 2024
1 parent ee8f79e commit 5e20884
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 60 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/disperse.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: Disperse configuration

"on":
- push
- push

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: jelmer/action-disperse-validate@v1
- uses: actions/checkout@v4
- uses: jelmer/action-disperse-validate@v1
7 changes: 6 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
python-version:
- '3.13'
- '3.12'
- '3.11'
- '3.10'
- '3.9'
fail-fast: false

steps:
Expand Down
110 changes: 55 additions & 55 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
pull_request:
schedule:
- cron: "0 6 * * *" # Daily 6AM UTC build
- cron: "0 6 * * *" # Daily 6AM UTC build

jobs:
build-wheels:
Expand All @@ -15,77 +15,77 @@ jobs:
fail-fast: true

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel cibuildwheel
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: "matrix.os == 'ubuntu-latest'"
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}
path: ./wheelhouse/*.whl
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel cibuildwheel
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: "matrix.os == 'ubuntu-latest'"
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}
path: ./wheelhouse/*.whl

build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: ./dist/*.tar.gz
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: ./dist/*.tar.gz

test-sdist:
needs:
- build-sdist
- build-sdist
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Download sdist
uses: actions/download-artifact@v4
with:
name: artifact-sdist
path: dist
- name: Test sdist
run: twine check dist/*
- name: Test installation from sdist
run: pip install dist/*.tar.gz
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Download sdist
uses: actions/download-artifact@v4
with:
name: artifact-sdist
path: dist
- name: Test sdist
run: twine check dist/*
- name: Test installation from sdist
run: pip install dist/*.tar.gz

publish:
runs-on: ubuntu-latest
needs:
- build-wheels
- build-sdist
- build-wheels
- build-sdist
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/fastbencode
steps:
- name: Download distributions
uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: artifact-*
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Download distributions
uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: artifact-*
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 5e20884

Please sign in to comment.