Skip to content

skip musllinux

skip musllinux #19

name: Test and Publish to PyPI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch: # Allow manual triggering
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and run tests in Docker
run: |
docker build -t pyindi-client .
docker run --rm pyindi-client
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: test
environment: pypi
strategy:
matrix:
os: [ubuntu-latest]
arch: [x86_64, aarch64]
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
CIBW_ARCHS_LINUX: "${{ matrix.arch }}"
CIBW_SKIP: "*-musllinux_*"
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux2014_aarch64:latest
CIBW_BEFORE_ALL_LINUX: |
set -e
yum install -y \
git \
cmake \
gcc-c++ \
make \
libev-devel \
gpsd-devel \
gsl-devel \
LibRaw-devel \
libusb-devel \
zlib-devel \
libftdi-devel \
libjpeg-turbo-devel \
krb5-devel \
libnova-devel \
libdc1394-devel \
libtiff-devel \
fftw-devel \
rtl-sdr-devel \
cfitsio-devel \
libgphoto2-devel \
libusb1-devel \
boost-regex \
libcurl-devel \
libtheora-devel \
swig || { echo "Failed to install dependencies"; exit 1; }
# Build INDI from source
curl -L https://github.com/indilib/indi/archive/v2.1.1.tar.gz | tar xz
cd indi-2.1.1
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DINDI_BUILD_SERVER=OFF \
-DINDI_BUILD_DRIVERS=OFF \..
make -j4
make install
cd ../..
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
publish:
needs: build_wheels
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install build dependencies
run: python -m pip install build
- name: Build source distribution
run: python -m build --sdist
- name: Download wheels
uses: actions/download-artifact@v3
with:
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1