Skip to content

.github/workflows/linux-wheels: small fixes to build logic #26

.github/workflows/linux-wheels: small fixes to build logic

.github/workflows/linux-wheels: small fixes to build logic #26

Workflow file for this run

name: Linux Wheel
on: [push, pull_request]
jobs:
manylinux:
runs-on: ${{ matrix.MANYLINUX.RUNNER }}
container:
image: quay.io/pypa/${{ matrix.MANYLINUX.NAME }}
strategy:
matrix:
PYTHON:
- { VERSION: "cp39-cp39", BINARY: "/opt/python/cp39-cp39/bin" }
- { VERSION: "cp310-cp310", BINARY: "/opt/python/cp310-cp310/bin" }
- { VERSION: "cp311-cp311", BINARY: "/opt/python/cp311-cp311/bin" }
- { VERSION: "cp312-cp312", BINARY: "/opt/python/cp312-cp312/bin" }
- { VERSION: "cp313-cp313", BINARY: "/opt/python/cp313-cp313/bin" }
MANYLINUX:
# x86_64
- { NAME: "manylinux_2_28_x86_64", IMAGE: "quay.io/pypa/manylinux_2_28_x86_64", RUNNER: "ubuntu-latest" }
- { NAME: "musllinux_1_2_x86_64", IMAGE: "quay.io/pypa/musllinux_1_2_x86_64", RUNNER: "ubuntu-latest" }
# arm64
- { NAME: "manylinux_2_28_aarch64", IMAGE: "quay.io/pypa/manylinux_2_28_aarch64", RUNNER: "ubuntu-24.04-arm" }
# GitHub actions are not yet supported on Alpine arm64
# - { NAME: "musllinux_1_2_aarch64", IMAGE: "quay.io/pypa/musllinux_1_2_aarch64", RUNNER: "ubuntu-24.04-arm" }
name: "${{ matrix.PYTHON.VERSION }} - ${{ matrix.MANYLINUX.NAME }}"
env:
WHEEL_NAME: "clipspy-*-${{ matrix.PYTHON.VERSION }}*${{ matrix.MANYLINUX.NAME }}*.whl"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build dependencies
run: |
yum install -y make unzip wget libffi libffi-devel
- name: Install Python dependencies
run: |
${{ matrix.PYTHON.BINARY }}/pip install --upgrade build pip cffi pytest setuptools auditwheel
- name: Build CLIPSPy
run: |
make clipspy PYTHON=${{ matrix.PYTHON.BINARY }}/python WHEEL_PLATFORM=${{ matrix.MANYLINUX.NAME }}
- name: Copy the wheel
run: |
mkdir -p wheels
cp dist/*.tar.gz dist/${{ env.WHEEL_NAME }} wheels
- name: Install the wheel
run: |
${{ matrix.PYTHON.BINARY }}/pip install wheels/${{ env.WHEEL_NAME }}
- name: Run tests
run: |
# Run test from outside module to test installed package
cd ../
${{ matrix.PYTHON.BINARY }}/python -m pytest -v clipspy/test
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: linux-build-${{ matrix.PYTHON.VERSION }}-${{ matrix.MANYLINUX.NAME }}
path: wheels
linux-build:
needs: [manylinux]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: linux-build-*
path: artifacts
merge-multiple: true
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: linux-build
path: artifacts