Build Wheels #14
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: [workflow_dispatch] | |
jobs: | |
build: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-13 is an intel runner, macos-14 is apple silicon | |
# os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
os: [ubuntu-latest] | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
submodules: "recursive" | |
# # Setup env | |
# - uses: "actions/setup-python@v5" | |
# with: | |
# python-version: "3.12" | |
# - name: Installs for Python 3.12 | |
# run: | | |
# python --version | |
# pip install --upgrade pip wheel setuptools pybind11 | |
# - name: Setup Cpp | |
# uses: aminya/setup-cpp@v1 | |
# with: | |
# cmake: true | |
# - name: Build and Install PyIQTree | |
# run: pip install ".[dev]" | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: # Can specify per os - e.g. CIBW_BEFORE_ALL_LINUX, CIBW_BEFORE_ALL_MACOS, CIBW_BEFORE_ALL_WINDOWS | |
CIBW_BEFORE_ALL_LINUX: | | |
yum update -y | |
yum install -y eigen3-devel boost-devel | |
cd iqtree2 | |
git apply ../fpic-iqtree.patch | |
mkdir build && cd build | |
cmake -DIQTREE_FLAGS="single" -DBUILD_LIB=ON .. | |
make -j | |
cd ../.. | |
mv iqtree2/build/libiqtree2.a pyiqtree/libiqtree/ | |
# - name: Test | |
# run: | | |
# pytest tests/test_RF_distance.py | |
# pytest tests/test_generate_random_tree_file.py | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |