Build bpy for Linux #17
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 Linux | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Blender Tag to build' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Blender repository recursively | |
uses: actions/checkout@v2 | |
with: | |
repository: blender/blender | |
ref: ${{ github.event.inputs.tag }} # Checkout the tag specified in the workflow dispatch | |
submodules: 'recursive' # Recursively checkout submodules | |
path: blender | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: 3.10.13 # Specify the Python version you need | |
# environment-file: environment.yml | |
activate-environment: bpy-env | |
channels: conda-forge | |
- name: Install conda dependencies | |
run: | | |
conda install -c "nvidia/label/cuda-12.3.1" cuda-toolkit | |
- 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: Get dependencies | |
run: | | |
echo "Building bpy for Linux with tag ${{ github.event.inputs.tag }}" | |
sudo apt update | |
sudo apt-get install -y build-essential git subversion cmake libx11-dev libxxf86vm-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libegl-dev | |
sudo apt-get install -y libwayland-dev wayland-protocols libxkbcommon-dev libdbus-1-dev linux-libc-dev | |
if [ ! -d "./lib" ]; then | |
mkdir ./lib | |
cd ./lib | |
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_x86_64_glibc_228 | |
fi | |
# - name: Install Cuda Toolkit | |
# uses: Jimver/[email protected] | |
# id: cuda-toolkit | |
# with: | |
# cuda: '12.1.0' | |
- name: Build Blender | |
run: | | |
nvcc --version | |
cd ./blender | |
make update | |
make bpy |