diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 5d11842..fbe055d 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -276,6 +276,13 @@ jobs: run: | nvcc --version "set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL '' FORCE)" | Out-File -Append -FilePath ./blender/build_files/cmake/config/bpy_module.cmake + + - name: Build Blender + run: | + python workspace/build_blender.py build --tag ${{ env.TAG }} --install --publish + env: + GITHUB_TOKEN: ${{ github.token }} + # - name: Set CUDA environment variables # run: | @@ -336,18 +343,18 @@ jobs: run: | Get-ChildItem Env: - - name: Extract Blender Major Version Number - id: version_extraction - run: | - python -c "import sys; version_tag = sys.argv[1].lstrip('v'); parts = version_tag.split('.'); major_version = '.'.join(parts[:2]); print(f'MAJOR_VERSION={major_version}')" "${{ env.TAG }}" >> $GITHUB_ENV - shell: bash + # - name: Extract Blender Major Version Number + # id: version_extraction + # run: | + # python -c "import sys; version_tag = sys.argv[1].lstrip('v'); parts = version_tag.split('.'); major_version = '.'.join(parts[:2]); print(f'MAJOR_VERSION={major_version}')" "${{ env.TAG }}" >> $GITHUB_ENV + # shell: bash - - name: Download Precompiled Binaries for the Release - run: | - mkdir lib - cd lib - svn checkout https://svn.blender.org/svnroot/bf-blender/tags/blender-${{ env.MAJOR_VERSION }}-release/lib/win64_vc15 - shell: cmd + # - name: Download Precompiled Binaries for the Release + # run: | + # mkdir lib + # cd lib + # svn checkout https://svn.blender.org/svnroot/bf-blender/tags/blender-${{ env.MAJOR_VERSION }}-release/lib/win64_vc15 + # shell: cmd # - name: Download Blender Python API Stubs # id: download-artifact @@ -358,40 +365,40 @@ jobs: # name: blender-python-api-stubs-${{ env.TAG }} # path: ./build_windows_Bpy_x64_vc17_Release/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_windows_Bpy_x64_vc17_Release/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_windows_Bpy_x64_vc17_Release/bin/ - - name: Build Blender - run: | - cd blender - yes| make update - make bpy - shell: cmd + # - name: Build Blender + # run: | + # cd blender + # yes| make update + # make bpy + # shell: cmd - - name: Make Wheel - run: | - pip install -U pip setuptools wheel - copy ./workspace/make_bpy_wheel.py ./blender/build_files/utils/ - python blender\build_files\utils\make_bpy_wheel.py .\build_windows_Bpy_x64_vc17_Release\bin\ - # - name: Upload Wheel as Artifact - # uses: actions/upload-artifact@v2 - # with: - # name: bpy-windows - # path: | - # ./build_windows_Bpy_x64_vc17_Release/bin/*.whl + # - name: Make Wheel + # run: | + # pip install -U pip setuptools wheel + # copy ./workspace/make_bpy_wheel.py ./blender/build_files/utils/ + # python blender\build_files\utils\make_bpy_wheel.py .\build_windows_Bpy_x64_vc17_Release\bin\ + # # - name: Upload Wheel as Artifact + # # uses: actions/upload-artifact@v2 + # # with: + # # name: bpy-windows + # # path: | + # # ./build_windows_Bpy_x64_vc17_Release/bin/*.whl - - name: Install Dependencies - run: | - python -m pip install --upgrade pip ndg-httpsclient pyopenssl pyasn1 - pip install -r requirements.txt + # - name: Install Dependencies + # run: | + # python -m pip install --upgrade pip ndg-httpsclient pyopenssl pyasn1 + # pip install -r requirements.txt - - name: Publish Wheel - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: python workspace/build_blender.py publish-github ${{ env.TAG }} ./build_windows_Bpy_x64_vc17_Release/bin/ + # - name: Publish Wheel + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: python workspace/build_blender.py publish-github ${{ env.TAG }} ./build_windows_Bpy_x64_vc17_Release/bin/ diff --git a/workspace/build_blender.py b/workspace/build_blender.py index 194e4c5..8e0a51f 100644 --- a/workspace/build_blender.py +++ b/workspace/build_blender.py @@ -303,8 +303,9 @@ def build(tag: str = typer.Option(None, help="Specific tag to check out"), clear svnpath = f"https://svn.blender.org/svnroot/bf-blender/tags/blender-{major_version}-release/lib/linux_x86_64_glibc_228/" subprocess.run(["svn", "checkout", svnpath], cwd=lib_dir) elif os_type == "Windows": - build_dir = Path.cwd() / "../build_windows_Bpy_x64_vc17_Release/bin/" + svnpath = f"https://svn.blender.org/svnroot/bf-blender/tags/blender-{major_version}--release/lib/win64_vc15" + subprocess.run(["svn", "checkout", svnpath], cwd=lib_dir) elif os_type == "Darwin": # MacOS build_dir = Path.cwd() / "../build_darwin_bpy" else: