Skip to content

BlendLuxCore Build Bundle #48

BlendLuxCore Build Bundle

BlendLuxCore Build Bundle #48

Workflow file for this run

# SPDX-FileCopyrightText: 2025 Howetuft, Johannes Hinrichs (CodeFHD)
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: BlendLuxCore Build Bundle
on:
pull_request:
inputs:
build_type:
required: false
type: string
default: "Latest"
workflow_call:
inputs:
build_type:
required: true
type: string
default: "Latest"
outputs:
commit:
description: "The commit that has been checked out"
value: ${{ jobs.build-bundle.outputs.commit }}
branch:
description: "The branch that has been checked out"
value: ${{ jobs.build-bundle.outputs.branch }}
attestation-url:
description: "The url to the attestations"
value: ${{ jobs.attest-bundle.outputs.attestation-url }}
workflow_dispatch:
inputs:
build_type:
required: true
type: string
default: "Release"
jobs:
build-bundle:
name: Build bundle
runs-on: ubuntu-latest
outputs:
commit: ${{ steps.current-commit.outputs.commit }}
branch: ${{ steps.current-commit.outputs.branch }}
version: ${{ steps.output-version.outputs.version }}
steps:
- name: Checkout main repository
uses: actions/checkout@v6
- name: Get current commit
id: current-commit
run: |
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "branch=$(git symbolic-ref HEAD)" >> $GITHUB_OUTPUT
echo "commit=$(git rev-parse HEAD)"
echo "branch=$(git symbolic-ref HEAD)"
#- name: Prepare Blender install
#uses: gerlero/apt-install@v1
#with:
#packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
#- name: Prepare Python
#run: touch requirements.txt
#- name: Set up Python
#uses: actions/setup-python@v5
#with:
#python-version: '3.11'
#- name: Set up Blender
#uses: moguri/setup-blender@v1
#with:
#blender-version: '5.1.1'
- name: Set up cmake
uses: lukka/get-cmake@latest
- name: Download Blender
shell: bash
run: |
set -euo pipefail
BLENDER_VERSION="5.1"
BLENDER_VERSION_PATCH=".1"
BLENDER_URL="https://download.blender.org/release/Blender${BLENDER_VERSION}/blender-${BLENDER_VERSION}${BLENDER_VERSION_PATCH}-linux-x64.tar.xz"
INSTALL_DIR="$HOME/.local/opt/blender-${BLENDER_VERSION}"
BIN_DIR="$HOME/.local/bin"
mkdir -p "$INSTALL_DIR" "$BIN_DIR"
echo "Downloading Blender ${BLENDER_VERSION} LTS..."
wget -q --show-progress -O /tmp/blender.tar.xz "$BLENDER_URL"
echo "Extracting Blender to ${INSTALL_DIR}..."
tar -xf /tmp/blender.tar.xz -C "$INSTALL_DIR" --strip-components=1
rm /tmp/blender.tar.xz
echo "Creating symlink in ${BIN_DIR}..."
ln -sf "${INSTALL_DIR}/blender" "${BIN_DIR}/blender"
echo "Blender ${BLENDER_VERSION} installed successfully!"
echo "BLENDER_ROOT=${INSTALL_DIR}" >> $GITHUB_ENV
- name: Package bundle
shell: bash
run: |
apt update -y && apt install xorg -y
build_dir="${{ github.workspace }}/build"
mkdir ${build_dir}
echo "Configure"
cmake \
-B ${build_dir} \
-S . \
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
-DBLENDER_ROOT=${BLENDER_ROOT} \
-Dblender_ROOT=${BLENDER_ROOT}
echo "Build"
cmake --build ${build_dir}
- name: Upload artifact
uses: actions/upload-artifact@v4
id: upload
with:
name: "BlendLuxCore"
path: "${{ github.workspace }}/build/out/BlendLuxCore-*.zip"
attest-wheels:
needs: [build-bundle]
runs-on: ubuntu-latest
permissions:
attestations: write
id-token: write
outputs:
attestation-url: ${{ steps.attestation-step.outputs.attestation-url }}
steps:
- uses: actions/download-artifact@v7
if: ${{ !env.ACT }}
with:
path: ${{ github.workspace }}/dist
merge-multiple: false
- name: Generate artifact attestations
id: attestation-step
if: ${{ !env.ACT }}
uses: actions/attest-build-provenance@v3
with:
subject-path: ${{ github.workspace }}/dist/*