Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: wheels

on:
pull_request:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
ref:
description: "Git ref (branch, tag, or SHA) to build"
required: true
default: "publish_on_pypi_test"

env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-musllinux_*"
CIBW_BUILD_VERBOSITY: "1"

CIBW_BEFORE_ALL_LINUX: "bash python/dependencies/build_deps_linux.sh"

CIBW_ENVIRONMENT_LINUX: >
CMAKE_PREFIX_PATH=/opt/cadet_deps
PKG_CONFIG_PATH=/opt/cadet_deps/lib/pkgconfig:/opt/cadet_deps/lib64/pkgconfig
LD_LIBRARY_PATH=/opt/cadet_deps/lib:/opt/cadet_deps/lib64

CIBW_CONFIG_SETTINGS: >
cmake.args=-DCMAKE_PREFIX_PATH=/opt/cadet_deps
-DBLA_VENDOR=OpenBLAS
-DENABLE_CADET_CLI=ON
-DENABLE_CADET_TOOLS=ON
-DENABLE_2D_MODELS=ON
-DENABLE_DG=ON
-DENABLE_THREADING=ON

CIBW_BEFORE_ALL_MACOS: >
bash -lc "brew update &&
brew install cmake ninja eigen openblas hdf5 suite-sparse superlu tbb"

CIBW_ENVIRONMENT_MACOS: >
CMAKE_PREFIX_PATH=/opt/homebrew
BLA_VENDOR=OpenBLAS

CIBW_BEFORE_ALL_WINDOWS: >
powershell -NoProfile -ExecutionPolicy Bypass -Command "
git clone https://github.com/microsoft/vcpkg C:\vcpkg ;
C:\vcpkg\bootstrap-vcpkg.bat ;
C:\vcpkg\vcpkg.exe install eigen3 openblas hdf5 suitesparse superlu tbb --triplet x64-windows ;"

CIBW_ENVIRONMENT_WINDOWS: >
CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake




jobs:
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || 'publish_on_pypi_test' }}

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
env:
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
CIBW_SKIP: "*-musllinux_*"
CIBW_BUILD_VERBOSITY: "1"
CIBW_TEST_COMMAND: >
python -c "import cadet_core; print(cadet_core.__version__); print(cadet_core.get_cadet_binary())"
&& cadet-core --version
CIBW_TEST_REQUIRES: ""

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
Loading