Skip to content

Commit

Permalink
Add python version to env
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreenbury committed Sep 9, 2024
1 parent 1fbd3ae commit ebd38ce
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
permissions:
contents: read

env:
PYTHON_VERSION: "3.10"

jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -40,7 +43,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: ${{ env.PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand All @@ -56,14 +59,14 @@ jobs:
sudo apt-get install -y pkg-config libssl-dev
# TODO: fix CI to run with manylinux, see:
# https://github.com/PyO3/maturin?tab=readme-ov-file#manylinux-and-auditwheel
# manylinux: auto
manylinux: auto
# See: https://github.com/pola-rs/polars/blob/main/.github/workflows/release-python.yml
# TODO: currently fails with: "ERROR: popgetter-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl is not a supported wheel on this platform."
# - name: Test wheel
# if: matrix.platform.target == 'x86_64'
# run: |
# pip install --force-reinstall --verbose dist/*.whl
# python -c 'import popgetter'
- name: Test wheel
if: matrix.platform.target == 'x86_64'
run: |
pip install --force-reinstall --verbose dist/*.whl
python -c 'import popgetter'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -90,7 +93,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: ${{ env.PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: ${{ env.PYTHON_VERSION }}
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
Expand Down Expand Up @@ -153,7 +156,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
python-version: ${{ env.PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
Expand Down

0 comments on commit ebd38ce

Please sign in to comment.