Build macOS #26
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 macOS | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build-macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install cmake build # or other tools you need | |
| - name: Build wheel | |
| run: | | |
| # Grab the path to the "python" selected by setup-python | |
| export PYTHON_EXECUTABLE="$(which python)" | |
| # Extract major.minor from the currently active Python | |
| export PYTHON_VERSION="$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" | |
| echo "Python version: $PYTHON_VERSION" | |
| echo "Python executable: $PYTHON_EXECUTABLE" | |
| ${PYTHON_EXECUTABLE} -m pip wheel ./Python -w Python/dist --verbose | |
| - name: Check Folder | |
| run: ls -R ./Python | |
| - name: Upload wheels as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-wheels-py${{ matrix.python-version }} | |
| path: Python/dist/tensorfrost-*.whl |