Build bpy for macOS #16
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 bpy for macOS | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Blender Tag to build' | |
required: true | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout Blender repository recursively | |
uses: actions/checkout@v2 | |
with: | |
repository: blender/blender | |
ref: ${{ github.event.inputs.tag }} | |
submodules: 'recursive' | |
path: blender | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: 3.10.13 | |
activate-environment: bpy-env | |
channels: conda-forge | |
miniconda-version: "latest" | |
- name: Install Conda Dependencies | |
run: | | |
conda install -y setuptools -c conda-forge | |
- name: Add conda subdirectories to PATH | |
run: | | |
for dir in $(find /Users/runner/conda_pkgs_dir/ -mindepth 1 -type d); do | |
echo "$dir" >> $GITHUB_PATH | |
done | |
- name: Install dependencies | |
run: | | |
brew install cmake subversion | |
- name: Cache Blender dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./lib | |
key: ${{ runner.os }}-blender-deps-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-blender-deps- | |
# - name: Install Cuda Toolkit | |
# uses: Jimver/[email protected] | |
# id: cuda-toolkit | |
# with: | |
# cuda: '12.1.0' | |
- name: Cache build files (for testing only) | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./build_darwin_bpy | |
key: ${{ runner.os }}-blender-build-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-blender-build- | |
# - name: Download Blender Python API Stubs | |
# uses: actions/download-artifact@v2 | |
# with: | |
# workflow: generate_stubs.yml | |
# name: blender-python-api-stubs-${{ github.event.inputs.tag }} | |
# path: ./build_darwin_bpy/bin/ | |
- name: Download Blender Python API Stubs | |
id: download-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: generate_stubs.yml | |
# github_token: ${{secrets.GITHUB_TOKEN}} | |
name: blender-python-api-stubs-${{ github.event.inputs.tag }} | |
path: ./build_darwin_bpy/bin/ | |
# - name: Build Blender | |
# run: | | |
# cd ./blender | |
# make update | |
# make bpy | |
- name: Make Wheel | |
run: | | |
pip install -U pip setuptools wheel | |
python ./blender/build_files/utils/make_bpy_wheel.py ./build_darwin_bpy/bin/ | |
- name: Upload Wheel as Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bpy-macos | |
path: | | |
./build_darwin_bpy/bin/*.whl |