From 5e20884162faee8bd85908361dbf30826bc80559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Thu, 14 Nov 2024 18:54:10 +0000 Subject: [PATCH] Bumping python versions in GitHub workflows and pyproject.toml * 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 --- .github/workflows/disperse.yml | 7 +- .github/workflows/pythonpackage.yml | 7 +- .github/workflows/wheels.yaml | 110 ++++++++++++++-------------- 3 files changed, 64 insertions(+), 60 deletions(-) diff --git a/.github/workflows/disperse.yml b/.github/workflows/disperse.yml index c5e2cd7..13b2536 100644 --- a/.github/workflows/disperse.yml +++ b/.github/workflows/disperse.yml @@ -1,8 +1,7 @@ ---- name: Disperse configuration "on": - - push +- push jobs: build: @@ -10,5 +9,5 @@ jobs: 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 diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 85c47d3..c9fed64 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -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: diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index 0dbf75f..49f68e0 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -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: @@ -15,65 +15,65 @@ 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 @@ -81,11 +81,11 @@ jobs: 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