Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/workflows/docker/buildwheel.sh

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/docker/shared.env

This file was deleted.

142 changes: 27 additions & 115 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,140 +1,52 @@
name: Build and test wheels
name: Publish Python release

on:
push:
branches:
- main
- test
tags:
- '*'
branches: [test-publish]
release:
types: [published]

jobs:
manylinux:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- uses: actions/checkout@v4.2.2
with:
submodules: true
fetch-depth: 0

- name: Set up Python 3.11
uses: actions/setup-python@v5.4.0
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
python-version: "3.12"
version: "0.8.15"

- name: Build sdist
shell: bash
run: |
python -m pip install build twine
python -m build --sdist
python -m twine check dist/*.tar.gz
- name: Build
run: uv build

- name: Upload sdist
uses: actions/upload-artifact@v4.6.1
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist

- name: Build wheels in docker
shell: bash
run: |
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh

- name: Upload Wheels
uses: actions/upload-artifact@v4.6.1
with:
name: wheels
path: dist

OSX-test:
needs: ['manylinux']
runs-on: macos-latest
strategy:
matrix:
python: [3.11, 3.12, 3.13]
steps:
- name: Download wheels
uses: actions/download-artifact@v4.2.0
with:
name: wheels
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5.4.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
run: |
python -VV
# Install the local wheel
pip install tszip --only-binary tszip -f .
python -c "import tszip"
name: dist
path: dist/

windows-test:
needs: ['manylinux']
runs-on: windows-latest
strategy:
matrix:
python: [3.11, 3.12, 3.13]
wordsize: [64]
steps:
- name: Download wheels
uses: actions/download-artifact@v4.2.0
with:
name: wheels
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5.4.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
run: |
python -VV
pip install wheel
# Install the local wheel
pip install tszip --only-binary tszip -f .
python -c "import tszip"

manylinux-test:
runs-on: ubuntu-24.04
needs: ['manylinux']
strategy:
matrix:
python: [3.11, 3.12, 3.13]
steps:
- name: Download wheels
uses: actions/download-artifact@v4.2.0
with:
name: wheels
- name: Set up Python
uses: actions/setup-python@v5.4.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
run: |
python -VV
# Install the local wheel
pip install tszip --only-binary tszip -f .
python -c "import tszip"


PyPI_Upload:
publish:
runs-on: ubuntu-24.04
environment: release
needs: [ 'windows-test', 'OSX-test', 'manylinux-test' ]
needs: [build]
permissions:
id-token: write
steps:
- name: Download all
uses: actions/download-artifact@v4.2.0
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
- name: Publish distribution to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
- uses: actions/download-artifact@v7.0.0
with:
name: dist
path: dist

- name: Publish to TestPyPI
if: github.event_name == 'push' && github.ref_name == 'test-publish'
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PRODUCTION PyPI
repository-url: https://test.pypi.org/legacy/
verbose: true

- name: Publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0