Updated workflow #194
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
name: Build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
env: | |
PREFIX: "/usr/local/" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macOS-14] | |
#os: [ubuntu-latest, macOS-11] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set correct paths for Homebrew on macOS | |
if: matrix.os == 'macOS-14' | |
run: | | |
export BREW_PREFIX="$(brew --prefix)" | |
export PREFIX="$(brew --prefix)" | |
export PATH="$BREW_PREFIX/bin:$PATH" | |
export LIBRARY_PATH="$BREW_PREFIX/lib:$LIBRARY_PATH" | |
export PKG_CONFIG_PATH="$BREW_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" | |
export MACOSX_DEPLOYMENT_TARGET=13.0 | |
echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV | |
- name: Install project dependencies | |
run: which python; python -m pip install -r requirements.txt | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.21.3 | |
env: | |
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<3.13" # >=3.8 <3.12 | |
CIBW_SKIP: "*-win32 *-manylinux_i686 pp* *musl* " # cp311-macosx* | |
CIBW_ARCHS_MACOS: "x86_64 arm64" | |
CIBW_ARCHS_LINUX: "auto" | |
CIBW_BEFORE_ALL_MACOS: | | |
sudo bash ci/osx-deps | |
CIBW_BEFORE_ALL_LINUX: | | |
bash ci/manylinux-deps | |
CIBW_BEFORE_BUILD_MACOS: | | |
ln -s /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11/cpython/longintrepr.h /Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 | |
which python3 | |
python3 -m pip install -r requirements.txt | |
CIBW_BEFORE_BUILD_LINUX: pip install -r requirements.txt | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: | | |
delocate-wheel --require-archs x86_64 -w {dest_dir} -v {wheel} --require-target-macos-version 13.0 | |
CIBW_TEST_SKIP: "*-macosx_arm64" | |
CIBW_TEST_REQUIRES: | | |
cython click>=8.0 numpy scipy pandas pysam>=0.22.0 networkx>=2.4 scikit-learn>=0.22 sortedcontainers lightgbm | |
CIBW_TEST_COMMAND: dysgu test --verbose | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheelhouse-${{ matrix.os }}-${{ github.run_id }} | |
path: ./wheelhouse/*.whl |