STUB 4 #3
This file contains hidden or 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 Wheels | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: [created] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-13 is Intel, macos-14 is Apple Silicon | |
os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install system build dependencies | |
run: | | |
if [[ "$RUNNER_OS" == "Linux" ]]; then | |
sudo apt update | |
sudo apt install -y build-essential wget tar cmake | |
elif [[ "$RUNNER_OS" == "macOS" ]]; then | |
brew install wget cmake | |
fi | |
- name: Download and Compile ADMesh | |
env: | |
ADMESH_VERSION: "0.98.3" | |
run: | | |
wget https://github.com/admesh/admesh/releases/download/v$ADMESH_VERSION/admesh-$ADMESH_VERSION.tar.gz | |
tar -zxf admesh-$ADMESH_VERSION.tar.gz | |
cd admesh-$ADMESH_VERSION | |
./configure | |
make | |
mkdir -p src/admesh | |
cp src/stl.h src/admesh/stl.h | |
cd .. | |
echo "ADMesh installed successfully!" | |
- name: Build wheels using cibuildwheel | |
uses: pypa/[email protected] | |
env: | |
#cibw_build: "cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*" | |
cibw_build: "cp38-* cp39-* cp310-* cp311-* cp312-*" | |
CIBW_SKIP: "pp*" | |
CIBW_TEST_REQUIRES: "pytest" | |
CIBW_TEST_COMMAND: "pytest -v {project}/test" | |
- name: Upload built wheels as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }} | |
path: ./wheelhouse/*.whl | |
#publish_pypi: | |
# name: Publish to PyPI | |
# needs: build_wheels | |
# runs-on: ubuntu-latest | |
# if: github.event_name == 'release' | |
# steps: | |
# - name: Download built wheels | |
# uses: actions/download-artifact@v4 | |
# with: | |
# path: dist | |
# - name: Publish to PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# password: ${{ secrets.PYPI_API_TOKEN }} |