-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57c90b6
commit c9b5328
Showing
2 changed files
with
189 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build bpy for macOS | ||
name: Build bpy for macOS Silicon | ||
|
||
on: | ||
workflow_dispatch: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
name: Build bpy for macOS Intel | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Blender Tag to build' | ||
required: true | ||
default: 'v4.3.2' | ||
python_version: | ||
description: 'Python version to use' | ||
required: true | ||
default: '3.11.9' | ||
|
||
workflow_call: | ||
inputs: | ||
tag: | ||
description: 'Blender Tag to build' | ||
required: true | ||
type: string | ||
python_version: | ||
description: 'Python version to use' | ||
required: true | ||
default: '3.10.11' | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-15 | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set environment variables | ||
id: set_env | ||
run: | | ||
TAG=${{ inputs.tag || github.event.inputs.tag }} | ||
PYTHON_VERSION=${{ inputs.python_version || github.event.inputs.python_version }} | ||
echo "TAG=$TAG" >> $GITHUB_ENV | ||
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV | ||
# - name: Checkout Blender repository recursively | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# repository: blender/blender | ||
# ref: ${{ env.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: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
|
||
- name: Install Python Dependencies | ||
run: | | ||
python -m pip install --upgrade pip requests urllib3 ndg-httpsclient pyopenssl pyasn1 | ||
pip install -r ./requirements.txt | ||
- name: Update Python | ||
run: | | ||
pip install -U pip setuptools wheel | ||
# - 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: Build Blender | ||
run: | | ||
python -m src.buildbpy.main --tag ${{ env.TAG }} --install --publish | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
|
||
|
||
# - 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: build_all.yml | ||
# # github_token: ${{secrets.GITHUB_TOKEN}} | ||
# name: blender-python-api-stubs-${{ env.TAG }} | ||
# path: ./build_darwin_bpy/bin/ | ||
|
||
# - name: Download Blender Python API Stubs | ||
# id: download-artifact | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: blender-python-api-stubs-${{ env.TAG }} | ||
# path: ./build_darwin_bpy/bin/ | ||
|
||
|
||
# - name: Build Blender | ||
# run: | | ||
# cd ./blender | ||
# make update | ||
# make bpy | ||
|
||
# - name: Setup terminal session | ||
# uses: fawazahmed0/action-debug@main | ||
# with: | ||
# credentials: "user:p@ss!" | ||
|
||
|
||
|
||
# - name: Make Wheel | ||
# run: | | ||
# pip install -U pip setuptools wheel | ||
# cp ./workspace/make_bpy_wheel.py ./blender/build_files/utils/ | ||
# 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 | ||
|
||
# - name: Install Dependencies | ||
# run: | | ||
# python -m pip install --upgrade pip requests urllib3 ndg-httpsclient pyopenssl pyasn1 | ||
# pip install -r requirements.txt | ||
# pip install ndg-httpsclient pyopenssl pyasn1 | ||
|
||
# - name: Publish Wheel | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: python workspace/build_blender.py publish-github ${{ env.TAG}} ./build_darwin_bpy/bin/ |