v0.1.12 #101
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Upload Python Package | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }}-${{ matrix.python_version}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# Linux 64 bit manylinux2014 | |
- os: ubuntu-22.04 | |
python: 39 | |
platform_id: manylinux_x86_64 | |
manylinux_image: manylinux2014 | |
python_version: "3.9" | |
- os: ubuntu-22.04 | |
python: 310 | |
platform_id: manylinux_x86_64 | |
manylinux_image: manylinux2014 | |
python_version: "3.10" | |
- os: ubuntu-22.04 | |
python: 311 | |
platform_id: manylinux_x86_64 | |
manylinux_image: manylinux2014 | |
python_version: "3.11" | |
- os: ubuntu-22.04 | |
python: 312 | |
platform_id: manylinux_x86_64 | |
manylinux_image: manylinux2014 | |
python_version: "3.12" | |
- os: ubuntu-22.04 | |
python: 313 | |
platform_id: manylinux_x86_64 | |
manylinux_image: manylinux2014 | |
python_version: "3.13" | |
# MacOS x86_64 | |
- os: macos-12 | |
python: 39 | |
platform_id: macosx_x86_64 | |
python_version: "3.9" | |
- os: macos-12 | |
python: 310 | |
platform_id: macosx_x86_64 | |
python_version: "3.10" | |
- os: macos-12 | |
python: 311 | |
platform_id: macosx_x86_64 | |
python_version: "3.11" | |
- os: macos-12 | |
python: 312 | |
platform_id: macosx_x86_64 | |
python_version: "3.12" | |
- os: macos-12 | |
python: 313 | |
platform_id: macosx_x86_64 | |
python_version: "3.13" | |
# MacOS arm64 | |
- os: macos-14 | |
python: 39 | |
platform_id: macosx_arm64 | |
python_version: "3.9" | |
- os: macos-14 | |
python: 310 | |
platform_id: macosx_arm64 | |
python_version: "3.10" | |
- os: macos-14 | |
python: 311 | |
platform_id: macosx_arm64 | |
python_version: "3.11" | |
- os: macos-14 | |
python: 312 | |
platform_id: macosx_arm64 | |
python_version: "3.12" | |
- os: macos-14 | |
python: 313 | |
platform_id: macosx_arm64 | |
python_version: "3.13" | |
steps: | |
- name: Checkout LePhare | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
# CIBW_ARCHS_MACOS: auto universal2 | |
CIBW_BEFORE_ALL_MACOS: brew install llvm libomp | |
CIBW_ENVIRONMENT_MACOS: PYTHON_VERSION_REQUIRED=${{ matrix.python_version}} MACOSX_DEPLOYMENT_TARGET="14.0" PATH="$(brew --prefix llvm)/bin:$PATH" CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include" CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include -I/opt/homebrew/opt/libomp/include -I/opt/homebrew/opt/llvm/include -I/usr/local/opt/libomp/include" LDFLAGS="-L/usr/local/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -L /usr/local/lib -L/usr/local/opt/llvm/lib" | |
CIBW_ENVIRONMENT_LINUX: PYTHON_VERSION_REQUIRED=${{ matrix.python_version}} | |
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | |
CIBW_ARCHS: all | |
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} | |
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} | |
CIBW_BUILD_VERBOSITY: 3 | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: wheelhouse/*.whl | |
build_sdist: | |
name: Make SDist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Optional, use if you use setuptools_scm | |
submodules: recursive # Optional, use if you have submodules | |
- name: Build SDist | |
run: pipx run build --sdist | |
- name: Upload SDist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-sdist | |
path: dist/*.tar.gz | |
upload_pypi: | |
name: Upload to pypi | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
permissions: | |
id-token: write | |
steps: | |
- name: Download distribution files | |
uses: actions/download-artifact@v4 | |
with: | |
# unpacks all CIBW artifacts into dist/ | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Upload to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |