Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python CI build for musllinux #652

Merged
merged 2 commits into from
Aug 6, 2024
Merged
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
84 changes: 43 additions & 41 deletions .github/workflows/publish-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
with:
name: wheels-macos-${{ matrix.python-version }}
path: dist/*.whl
if-no-files-found: error

windows:
runs-on: windows-latest
Expand Down Expand Up @@ -148,6 +149,7 @@ jobs:
with:
name: wheels-windows-${{ matrix.python-version }}
path: dist/*.whl
if-no-files-found: error

linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -187,48 +189,48 @@ jobs:
with:
name: wheels-linux-${{ matrix.python-version }}
path: dist/*.whl
if-no-files-found: error

# musllinux:
# runs-on: ubuntu-latest
# needs:
# - should-publish
# if: needs.should-publish.outputs.is_new_version == 'yes'
# strategy:
# matrix:
# python-version: ["3.9", "3.10", "3.11", "3.12"]
# steps:
# - uses: actions/checkout@v4
# with:
# persist-credentials: false
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# architecture: x64
# - name: Show python version
# run: |
# python3 --version
# - name: Build wheels
# uses: messense/maturin-action@v1
# with:
# target: x86_64-unknown-linux-musl
# manylinux: musllinux_1_2
# args: --release --interpreter python${{ matrix.python-version}} --out /io/dist -m pytrustfall/Cargo.toml
# - name: Install built wheel
# uses: addnab/docker-run-action@v3
# with:
# image: alpine:latest
# options: -v ${{ github.workspace }}:/io -w /io
# run: |
# apk add py3-pip
# pip3 install -U pip
# ls -alh /io/dist/
# pip3 install trustfall --no-index --find-links /io/dist/ --force-reinstall
# python3 -c "import trustfall"
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-musllinux-${{ matrix.python-version }}
# path: /io/dist/*.whl
musllinux:
runs-on: ubuntu-latest
needs:
- should-publish
if: needs.should-publish.outputs.is_new_version == 'yes'
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Show python version
run: |
python3 --version
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: x86_64-unknown-linux-musl
manylinux: musllinux_1_2
args: --release --interpreter python${{ matrix.python-version}} --out dist -m pytrustfall/Cargo.toml
- name: Install built wheel
uses: addnab/docker-run-action@v3
with:
image: python:${{ matrix.python-version }}-alpine
options: -v ${{ github.workspace }}:/io -w /io
run: |
ls -alh /io/dist/
pip install trustfall --no-index --find-links /io/dist/ --force-reinstall
python3 -c "import trustfall"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.python-version }}
path: dist/*.whl
if-no-files-found: error

should-publish:
name: Did version change
Expand Down
Loading