Skip to content

Controller output features and integration fixes #721

Controller output features and integration fixes

Controller output features and integration fixes #721

Workflow file for this run

name: Build
on: [pull_request]
jobs:
populate_cfitsio_cache:
name: Populate cfitsio cache
runs-on: ubuntu-latest
outputs:
version: ${{ steps.cfitsio.outputs.version }}
steps:
- uses: actions/checkout@v5
- name: Read cfitsio version
id: cfitsio
shell: bash
run: |
ver=$(grep '^CFITSIO_VERSION=' tools/wheels/cibw_before_all.sh | cut -d'"' -f2)
echo "version=$ver" >> "$GITHUB_OUTPUT"
- name: Cache cfitsio source tarball
id: cache
uses: actions/cache@v5
with:
path: .cfitsio-cache
key: cfitsio-${{ steps.cfitsio.outputs.version }}-v1
- name: Download cfitsio if not cached
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
bash tools/wheels/fetch_cfitsio.sh \
"${{ steps.cfitsio.outputs.version }}" \
".cfitsio-cache/cfitsio-${{ steps.cfitsio.outputs.version }}.tar.gz"
populate_gsl_cache:
name: Populate GSL cache
runs-on: ubuntu-latest
outputs:
version: ${{ steps.gsl.outputs.version }}
steps:
- uses: actions/checkout@v5
- name: Read GSL version
id: gsl
shell: bash
run: |
ver=$(grep '^GSL_VERSION=' tools/wheels/cibw_before_all.sh | cut -d'"' -f2)
echo "version=$ver" >> "$GITHUB_OUTPUT"
- name: Cache GSL source tarball
id: cache
uses: actions/cache@v5
with:
path: .gsl-cache
key: gsl-${{ steps.gsl.outputs.version }}-v1
- name: Download GSL if not cached
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
bash tools/wheels/fetch_gsl.sh \
"${{ steps.gsl.outputs.version }}" \
".gsl-cache/gsl-${{ steps.gsl.outputs.version }}.tar.gz"
build_wheels_macos:
name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }}) - ${{ matrix.py }}
needs: [populate_cfitsio_cache, populate_gsl_cache]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-15, macos-15-intel]
py: [cp38, cp39, cp310, cp311, cp312]
arch: [arm64, x86_64]
exclude:
# macos-14 / macos-15 are Apple Silicon runners
- os: macos-14
arch: x86_64
- os: macos-15
arch: x86_64
# macos-15-intel is an Intel runner
- os: macos-15-intel
arch: arm64
steps:
- uses: actions/checkout@v5
# IMPORTANT: CPython 3.8 on arm64 uses an x86_64 Python under Rosetta by default.
# Installing a native arm64 Python 3.8 avoids CMake thinking it's x86_64.
- name: Install native Python 3.8 (arm64 runner only)
uses: actions/setup-python@v6
if: runner.os == 'macOS' && runner.arch == 'ARM64' && matrix.py == 'cp38'
with:
python-version: '3.8'
- name: Restore cfitsio source tarball
uses: actions/cache/restore@v5
with:
path: .cfitsio-cache
key: cfitsio-${{ needs.populate_cfitsio_cache.outputs.version }}-v1
- name: Restore GSL source tarball
uses: actions/cache/restore@v5
with:
path: .gsl-cache
key: gsl-${{ needs.populate_gsl_cache.outputs.version }}-v1
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_BUILD: ${{ matrix.py }}-*
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v6
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.py }}
path: ./wheelhouse/*.whl
build_wheels_linux:
name: Build wheels on ${{ matrix.os }} - ${{ matrix.py }} - ${{ matrix.image }}_${{ matrix.arch }}
needs: populate_cfitsio_cache
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
py: [cp38, cp39, cp310, cp311, cp312]
image: [manylinux, musllinux]
arch: [x86_64, aarch64]
include:
# Native runners per arch - aarch64 emulated under qemu was 13x
# slower (~80min vs ~6min), and GitHub now offers free arm64
# Linux runners for public repos.
- arch: x86_64
os: ubuntu-latest
- arch: aarch64
os: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v5
- name: Restore cfitsio source tarball
uses: actions/cache/restore@v5
with:
path: .cfitsio-cache
key: cfitsio-${{ needs.populate_cfitsio_cache.outputs.version }}-v1
- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_BUILD: ${{ matrix.py }}-${{ matrix.image }}_${{ matrix.arch }}
CIBW_ARCHS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v6
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.py }}-${{ matrix.image }}_${{ matrix.arch }}
path: ./wheelhouse/*.whl
merge:
runs-on: ubuntu-latest
needs: [build_wheels_macos, build_wheels_linux]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v6
with:
delete-merged: true