Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

CI: ccache for every build job (saved only by push/dispatch runs, restore-only on pull requests), parallel ctest, Windows compiles one file per core; Flatpak check in its own path-filtered nightly workflow; release runs its tests in parallel (no cache)

islandmedea16a915f15a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8680dae3..98f81dba 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,6 +13,15 @@ concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
+# Compiler cache (ccache). Every job compiles through ccache and starts from the newest cache of the same job; ccache
+# hashes the compiler and the preprocessed source with every flag, so a hit is the object file that compiler would
+# produce, and anything changed compiles fresh. Caches are saved only by push and workflow_dispatch runs (main, or a
+# maintainer's own branch): pull_request runs, forks included, only restore them (actions/cache/restore), so nothing a
+# pull request builds can end up in another run. GitHub scopes caches by branch as well: a branch reads its own and
+# main's, never another branch's. The release workflow uses no cache at all: release packages build from a clean tree.
+# The suite runs as parallel ctest entries (sculptforge_tests is split into shards, CMakeLists.txt), every test as before.
+# The Flatpak bundle check is in flatpak.yml.
+
jobs:
build:
name: ${{ matrix.name }}
@@ -25,6 +34,10 @@ jobs:
- { name: Linux ARM64, os: ubuntu-24.04-arm }
- { name: macOS, os: macos-15 }
- { name: Windows, os: windows-2022 }
+ env:
+ CCACHE_DIR: ${{ github.workspace }}/.ccache
+ CCACHE_BASEDIR: ${{ github.workspace }}
+ CCACHE_MAXSIZE: 500M
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
@@ -32,23 +45,72 @@ jobs:
python-version: '3.13'
- name: Install Linux dependencies
if: runner.os == 'Linux'
- run: sudo ./packaging/linux/install-build-deps.sh
+ run: |
+ sudo ./packaging/linux/install-build-deps.sh
+ sudo apt-get install -y --no-install-recommends ccache xvfb libgl1-mesa-dri
+ - name: ccache (macOS; the release binary, pinned by hash)
+ if: runner.os == 'macOS'
+ run: |
+ curl -fsSLO https://github.com/ccache/ccache/releases/download/v4.14.2/ccache-4.14.2-darwin.tar.gz
+ echo "cf240009630b605b775c7c5c7b7105a3b196c79f31af322c1557969aa28003fc ccache-4.14.2-darwin.tar.gz" | shasum -a 256 -c
+ tar xzf ccache-4.14.2-darwin.tar.gz -C "$RUNNER_TEMP"
+ echo "$RUNNER_TEMP/ccache-4.14.2-darwin" >> "$GITHUB_PATH"
+ - name: ccache (Windows; the release binary, pinned by hash, standing in for cl.exe)
+ if: runner.os == 'Windows'
+ shell: pwsh
+ run: |
+ $zip = 'ccache-4.14.2-windows-x86_64.zip'
+ Invoke-WebRequest "https://github.com/ccache/ccache/releases/download/v4.14.2/$zip" -OutFile $zip
+ if ((Get-FileHash $zip -Algorithm SHA256).Hash -ne '6993CE645E53192CEC592EE23186200B574AC4C59097ECDE8D9CFD681B47AE84') {
+ throw 'ccache archive hash mismatch'
+ }
+ Expand-Archive $zip -DestinationPath $env:RUNNER_TEMP
+ $dir = "$env:RUNNER_TEMP\ccache-4.14.2-windows-x86_64"
+ "$dir" >> $env:GITHUB_PATH
+ # MSBuild runs "cl.exe" from CLToolPath (see Configure): ccache under that name, in a folder of its own, which
+ # runs the real cl.exe from the PATH MSBuild sets up.
+ $cl = "$env:RUNNER_TEMP\ccache-as-cl"
+ New-Item -ItemType Directory $cl | Out-Null
+ Copy-Item "$dir\ccache.exe" "$cl\cl.exe"
+ "SF_CCACHE_CL=$($cl -replace '\\', '/')" >> $env:GITHUB_ENV
+ - name: Compiler cache (restore)
+ uses: actions/cache/restore@v5
+ with:
+ path: .ccache
+ key: ccache-${{ matrix.os }}-${{ github.sha }}
+ restore-keys: ccache-${{ matrix.os }}-
- name: NumPy for the Python API test
run: python -m pip install numpy
- name: Configure
+ if: runner.os != 'Windows'
+ run: >
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
+ -DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="${{ env.pythonLocation }}/bin/python3"
+ - name: Configure (Visual Studio generator, as the release builds; ccache as cl.exe, one compiler per file)
+ if: runner.os == 'Windows'
run: >
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
- -DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="${{ env.pythonLocation }}/${{ runner.os == 'Windows' && 'python.exe' || 'bin/python3' }}"
+ -DCMAKE_VS_GLOBALS="CLToolExe=cl.exe;CLToolPath=${{ env.SF_CCACHE_CL }};TrackFileAccess=false;UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true"
+ -DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="${{ env.pythonLocation }}/python.exe"
- name: Build
- run: cmake --build build --config Release --parallel 4
+ run: |
+ ccache -z
+ cmake --build build --config Release --parallel 4
+ ccache -s
+ - name: Compiler cache (save; not from pull requests)
+ if: github.event_name != 'pull_request'
+ uses: actions/cache/save@v5
+ with:
+ path: .ccache
+ key: ccache-${{ matrix.os }}-${{ github.sha }}
- name: Test (C++ and Python API)
- run: ctest --test-dir build -C Release --output-on-failure -LE ui
+ run: ctest --test-dir build -C Release --output-on-failure -LE ui -j 4
- name: UI tests (real app, Xvfb + Mesa)
if: runner.os == 'Linux'
run: |
- sudo apt-get install -y xvfb libgl1-mesa-dri
xvfb-run -a -s "-screen 0 1920x1080x24" env LIBGL_ALWAYS_SOFTWARE=1 \
- ctest --test-dir build -C Release --output-on-failure -L ui
+ ctest --test-dir build -C Release --output-on-failure -L ui -j 4
- name: UI tests (real app, Mesa llvmpipe)
if: runner.os == 'Windows'
shell: pwsh
@@ -61,7 +123,7 @@ jobs:
}
7z e mesa.7z x64/opengl32.dll x64/libgallium_wgl.dll -obuild/Release -y | Out-Null
$env:GALLIUM_DRIVER = 'llvmpipe'
- ctest --test-dir build -C Release --output-on-failure -L ui
+ ctest --test-dir build -C Release --output-on-failure -L ui -j 4
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: UI test screenshots
if: always() && runner.os != 'macOS'
@@ -71,24 +133,6 @@ jobs:
path: build/ui-shots
if-no-files-found: ignore
- # The Flatpak (packaging/flatpak), built as the release builds it, installed, and a UI test run inside the sandbox.
- flatpak:
- name: Flatpak x86_64
- runs-on: ubuntu-24.04
- steps:
- - uses: actions/checkout@v7
- - run: sudo apt-get update && sudo apt-get install -y flatpak flatpak-builder xvfb
- - name: Build the bundle
- run: packaging/flatpak/build.sh dist
- - name: Install it and run UI tests inside the sandbox (Xvfb, Mesa from the runtime)
- run: |
- flatpak install --user -y --noninteractive dist/*.flatpak
- for t in sculpt_basics blender_bridge spacemouse; do
- xvfb-run -a -s "-screen 0 1920x1080x24" \
- flatpak run --env=LIBGL_ALWAYS_SOFTWARE=1 org.sculptforge.SculptForge \
- --ui-test "$PWD/tests/ui/$t.sfui" --ui-out "$PWD/flatpak-ui/$t"
- done
-
# The Blender add-on inside Blender itself (the bpy wheel is Blender as a Python module), against
# sculptforge-cli: the oldest supported Blender (4.2 LTS, Python 3.11) and the newest.
blender-addon:
@@ -100,18 +144,38 @@ jobs:
include:
- { bpy: '4.2.0', python: '3.11' }
- { bpy: '5.2.3', python: '3.13' }
+ env:
+ CCACHE_DIR: ${{ github.workspace }}/.ccache
+ CCACHE_BASEDIR: ${{ github.workspace }}
+ CCACHE_MAXSIZE: 300M
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- - run: sudo ./packaging/linux/install-build-deps.sh
+ - run: |
+ sudo ./packaging/linux/install-build-deps.sh
+ sudo apt-get install -y --no-install-recommends ccache
+ - name: Compiler cache (restore)
+ uses: actions/cache/restore@v5
+ with:
+ path: .ccache
+ key: ccache-blender-cli-${{ matrix.bpy }}-${{ github.sha }}
+ restore-keys: ccache-blender-cli-${{ matrix.bpy }}-
- name: bpy and numpy
run: python -m pip install "bpy==${{ matrix.bpy }}" numpy
- name: Build sculptforge-cli
run: |
- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF -DSCULPTFORGE_BUILD_APP=OFF
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF -DSCULPTFORGE_BUILD_APP=OFF \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build build --target sculptforge-cli --parallel 4
+ ccache -s
+ - name: Compiler cache (save; not from pull requests)
+ if: github.event_name != 'pull_request'
+ uses: actions/cache/save@v5
+ with:
+ path: .ccache
+ key: ccache-blender-cli-${{ matrix.bpy }}-${{ github.sha }}
- name: Add-on round trip in Blender
run: python tests/blender/test_in_blender.py -- --cli build/sculptforge-cli
- name: Add-on exchange code and package
@@ -132,23 +196,49 @@ jobs:
- { cy: CY2026, image: 'rockylinux:8', glibc: '2.28' }
- { cy: CY2027, image: 'rockylinux:9', glibc: '2.34' }
steps:
- - run: dnf -y install git
+ - run: dnf -y install git tar gzip
- uses: actions/checkout@v7
- run: ./packaging/linux/install-build-deps.sh
+ - name: ccache (the static release binary, pinned by hash)
+ run: |
+ curl -fsSLO https://github.com/ccache/ccache/releases/download/v4.14.2/ccache-4.14.2-linux-x86_64-musl-static.tar.gz
+ echo "d540ba01f160addbd3dd5e18eda9bd34005591b095c09ac8ae9d0a1b655e7ef5 ccache-4.14.2-linux-x86_64-musl-static.tar.gz" | sha256sum -c
+ tar xzf ccache-4.14.2-linux-x86_64-musl-static.tar.gz -C /opt
+ echo "/opt/ccache-4.14.2-linux-x86_64-musl-static" >> "$GITHUB_PATH"
+ # (In a container job the github.workspace expression gives the host's path; $GITHUB_WORKSPACE is the container's.)
+ echo "CCACHE_DIR=$GITHUB_WORKSPACE/.ccache" >> "$GITHUB_ENV"
+ echo "CCACHE_BASEDIR=$GITHUB_WORKSPACE" >> "$GITHUB_ENV"
+ echo "CCACHE_MAXSIZE=500M" >> "$GITHUB_ENV"
+ - name: Compiler cache (restore)
+ uses: actions/cache/restore@v5
+ with:
+ path: .ccache
+ key: ccache-${{ matrix.cy }}-${{ github.sha }}
+ restore-keys: ccache-${{ matrix.cy }}-
- name: Python 3.13 (python-build-standalone via uv)
run: |
curl -LsSf https://astral.sh/uv/0.9.5/install.sh | sh
~/.local/bin/uv venv --python 3.13 /opt/py313
~/.local/bin/uv pip install --python /opt/py313/bin/python numpy
echo "PYTHON313=/opt/py313/bin/python" >> "$GITHUB_ENV"
- - name: Build and test with GCC 14
+ - name: Build with GCC 14
run: |
source /opt/rh/gcc-toolset-14/enable
gcc --version | head -1
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSCULPTFORGE_USE_SYSTEM_SDL=OFF \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="$PYTHON313"
+ ccache -z
cmake --build build --parallel 4
- ctest --test-dir build --output-on-failure -LE ui
+ ccache -s
+ - name: Compiler cache (save; not from pull requests)
+ if: github.event_name != 'pull_request'
+ uses: actions/cache/save@v5
+ with:
+ path: .ccache
+ key: ccache-${{ matrix.cy }}-${{ github.sha }}
+ - name: Test
+ run: ctest --test-dir build --output-on-failure -LE ui -j 4
- name: Check binary compatibility (glibc <= ${{ matrix.glibc }})
run: |
for f in build/sculptforge build/sculptforge-cli build/sculptforge*.so; do
diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml
new file mode 100644
index 00000000..c2152e1b
--- /dev/null
+++ b/.github/workflows/flatpak.yml
@@ -0,0 +1,77 @@
+name: Flatpak
+
+# The Flatpak (packaging/flatpak), built as the release builds it, installed, and UI tests run inside the sandbox.
+#
+# This is a packaging check: the code in it is the code CI already builds and tests on every push (ci.yml: Linux
+# x86_64 and ARM64 with the same CMake options, UI tests under Xvfb + Mesa). It takes 11-14 minutes, nearly all of it
+# compiling the app again inside the SDK, so it runs only when something it checks beyond that can change:
+# - the manifest and build script (packaging/flatpak), the desktop file, metainfo and icons it installs
+# (packaging/linux), the CMake build and the pinned dependencies (CMakeLists.txt, cmake/, third_party/);
+# - the code that behaves differently inside a Flatpak (the Blender bridge folder, FLATPAK_ID and /.flatpak-info:
+# src/io/BlenderBridge.*, src/app/PanelBlender.cpp; settings isolation for UI tests: src/app/main.cpp) and the
+# SpaceMouse reading /dev/input (src/app/SpaceMouse.cpp), with the three UI tests run in the sandbox;
+# - this workflow.
+# Every night it also runs on main whatever changed (a newer freedesktop runtime, or a code change the list above
+# misses, shows up within a day), it can be run by hand (workflow_dispatch), and the release workflow builds and
+# tests the Flatpak on x86_64 and aarch64 for every tag before anything is published.
+
+on:
+ push:
+ branches: [main]
+ paths:
+ - packaging/flatpak/**
+ - packaging/linux/**
+ - CMakeLists.txt
+ - cmake/**
+ - third_party/**
+ - src/io/BlenderBridge.*
+ - src/app/PanelBlender.cpp
+ - src/app/main.cpp
+ - src/app/SpaceMouse.cpp
+ - tests/ui/sculpt_basics.sfui
+ - tests/ui/blender_bridge.sfui
+ - tests/ui/spacemouse.sfui
+ - .github/workflows/flatpak.yml
+ pull_request:
+ paths: # the same list as above
+ - packaging/flatpak/**
+ - packaging/linux/**
+ - CMakeLists.txt
+ - cmake/**
+ - third_party/**
+ - src/io/BlenderBridge.*
+ - src/app/PanelBlender.cpp
+ - src/app/main.cpp
+ - src/app/SpaceMouse.cpp
+ - tests/ui/sculpt_basics.sfui
+ - tests/ui/blender_bridge.sfui
+ - tests/ui/spacemouse.sfui
+ - .github/workflows/flatpak.yml
+ schedule:
+ - cron: '17 4 * * *'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+concurrency:
+ group: flatpak-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ flatpak:
+ name: Flatpak x86_64
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v7
+ - run: sudo apt-get update && sudo apt-get install -y flatpak flatpak-builder xvfb
+ - name: Build the bundle
+ run: packaging/flatpak/build.sh dist
+ - name: Install it and run UI tests inside the sandbox (Xvfb, Mesa from the runtime)
+ run: |
+ flatpak install --user -y --noninteractive dist/*.flatpak
+ for t in sculpt_basics blender_bridge spacemouse; do
+ xvfb-run -a -s "-screen 0 1920x1080x24" \
+ flatpak run --env=LIBGL_ALWAYS_SOFTWARE=1 org.sculptforge.SculptForge \
+ --ui-test "$PWD/tests/ui/$t.sfui" --ui-out "$PWD/flatpak-ui/$t"
+ done
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 88af4977..32e7e961 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -33,12 +33,12 @@ jobs:
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
cmake --build build --parallel 4
- ctest --test-dir build --output-on-failure -LE ui
+ ctest --test-dir build --output-on-failure -LE ui -j 4
- name: UI tests (real app, Xvfb + Mesa)
run: |
sudo apt-get install -y xvfb libgl1-mesa-dri
xvfb-run -a -s "-screen 0 1920x1080x24" env LIBGL_ALWAYS_SOFTWARE=1 \
- ctest --test-dir build --output-on-failure -L ui
+ ctest --test-dir build --output-on-failure -L ui -j 4
- name: .deb and .tar.gz
run: cd build && cpack -G "DEB;TGZ"
- name: AppImage
@@ -115,7 +115,7 @@ jobs:
-DSCULPTFORGE_BUILD_PYTHON=ON -DPython_EXECUTABLE="$PYTHON313" -DSCULPTFORGE_PYTHON_INSTALL_DIR=lib/sculptforge/python
cmake --build build --parallel 4
# UI tests need a display; they run under Xvfb in the Linux jobs above and in CI.
- ctest --test-dir build --output-on-failure -LE ui
+ ctest --test-dir build --output-on-failure -LE ui -j 4
cd build
cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=SculptForge-${TAG#v}-linux-${{ matrix.arch }}-${{ matrix.suffix }}
if [ "${{ matrix.generators }}" = "RPM;TGZ" ]; then cpack -G RPM; fi
@@ -138,7 +138,7 @@ jobs:
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
cmake --build build --parallel 4
# UI tests need a display; they run under Xvfb in the Linux jobs above and in CI.
- ctest --test-dir build --output-on-failure -LE ui
+ ctest --test-dir build --output-on-failure -LE ui -j 4
- name: Package (signed ad-hoc inside CPack, see cmake/MacSign.cmake)
run: cd build && cpack -G DragNDrop
- uses: actions/upload-artifact@v7
@@ -157,7 +157,7 @@ jobs:
cmake -S . -B build -DSCULPTFORGE_USE_SYSTEM_SDL=OFF
cmake --build build --config Release --parallel 4
# UI tests need a display; they run under Xvfb in the Linux jobs above and in CI.
- ctest --test-dir build -C Release --output-on-failure -LE ui
+ ctest --test-dir build -C Release --output-on-failure -LE ui -j 4
- name: Package
run: cd build && cpack -C Release -G "NSIS;ZIP"
- uses: actions/upload-artifact@v7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 680c7586..c921b845 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,13 @@ All notable changes to SculptForge are listed here. The format follows
brushes now, which ignored it; at 0 they keep their own tip exactly as before.
- SelectRect and SelectLasso (hide / show) ignored symmetry (#51 follow-up): with X / Y / Z on, the mirror image of
the shape counts as inside too, as with MaskRect and MaskLasso (`hide_rect` / `hide_lasso symmetry=x`).
+### Changed
+- CI is faster with the same tests: compiles go through ccache (saved only by pushes to main and maintainers' own
+ runs; pull requests only read it; release builds use no cache), `sculptforge_tests` runs as four parallel shards
+ (`sculptforge_tests --shard K/N`; every test still runs once, and each now prints its time), ctest runs tests
+ in parallel (timed measurements alone), and the Windows build compiles one file per core. The Flatpak check
+ moved to its own workflow that runs when the packaging, the build or the Flatpak-specific code changes, every
+ night, and for every release.
## [0.10.3] - 2026-11-01