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 618bb39
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 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 @@ -51,19 +54,23 @@ jobs:
--out dist
--find-interpreter
sccache: "true"
# before-script-linux: |
# sudo apt-get update
# sudo apt-get install -y pkg-config libssl-dev
# https://github.com/PyO3/maturin-action/discussions/162#discussioncomment-7978369
before-script-linux: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
yum update -y
yum install -y openssl openssl-devel
# 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 +97,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 +129,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 +160,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 618bb39

Please sign in to comment.