Skip to content

Update pymoose.yml building with multi GSL #21

Update pymoose.yml building with multi GSL

Update pymoose.yml building with multi GSL #21

Workflow file for this run

name: Python Package
on: [push]
permissions:
contents: write
jobs:
build_wheel:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
build_type: [Release]
c_compiler: [clang]
python-version: ['3.11']
gsl_version: ["2.6", "2.7", "2.8"] # Multiple GSL versions
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install cibuildwheel and Twine
run: python -m pip install cibuildwheel==2.21.3 twine
- name: Install GSL (MacOS)
if: runner.os == 'macOS'
run: |
brew install gsl@${{ matrix.gsl_version }}
brew install hdf5
- name: Install GSL (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install libgsl-dev libhdf5-dev
- name: Setup Micromamba (Windows)
if: runner.os == 'Windows'
uses: mamba-org/setup-micromamba@v1
with:
environment-name: moose
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
gsl=${{ matrix.gsl_version }}
pkg-config
clang
hdf5
pybind11[global]
graphviz
pytables
numpy
matplotlib
vpython
lxml
doxygen
setuptools
wheel
meson
ninja
meson-python
cibuildwheel
post-cleanup: all
generate-run-shell: false
- name: Build Linux Wheel
if: runner.os == 'Linux'
env:
CIBW_BEFORE_ALL_LINUX: >
yum install -y gsl-devel hdf5-devel
CIBW_BUILD: '*-manylinux_x86_64'
CIBW_SKIP: 'pp*'
run: |
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse
- name: Build MacOS Wheel
if: runner.os == 'macOS'
env:
CIBW_BUILD: '*-macosx_arm64'
CIBW_SKIP: 'pp* cp38*'
run: |
export "MACOSX_DEPLOYMENT_TARGET=14.0"
python -m cibuildwheel --output-dir wheelhouse
ls wheelhouse
- name: Build Windows Wheel
if: runner.os == 'Windows'
env:
CIBW_BUILD: '*-win_*'
CIBW_SKIP: '*-win32 pp*'
run: |
micromamba shell hook -s powershell | Out-String | Invoke-Expression
micromamba activate moose
python -m cibuildwheel --output-dir wheelhouse
dir wheelhouse
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload wheelhouse/*.whl