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 7ba0fdc
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 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,21 @@ jobs:
--out dist
--find-interpreter
sccache: "true"
before-script-linux: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
# before-script-linux: |
# sudo apt-get update
# sudo apt-get install -y pkg-config libssl-dev
# https://github.com/delta-io/delta-rs/blob/main/.github/workflows/python_release.yml
before-script-linux: yum install -y perl-IPC-Cmd
# 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 +95,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 +127,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 +158,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 7ba0fdc

Please sign in to comment.