Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a6ca87b
fix(login): stop token extraction at first '?', '&' or '#' in callbac…
LuckZAE Aug 19, 2026
dba8859
Fix the issue where device 1 was not mounted, resulting in no model e…
zhouzengping Aug 20, 2026
0d8f2f5
fix: stay on Preview when re-dropping the same G-code file (#732)
Kenshin627 Aug 20, 2026
f5c6da5
Fix ini bug from sentry (#750)
fire2wind Aug 21, 2026
4f4feb6
test: upgrade test framework to Catch2 v3 and add CI pipelines (#749)
zhangzhend0ng Aug 21, 2026
af15c70
fix: add wasm and otf MIME types to HttpServer (#751)
SukiSunYuhang Aug 21, 2026
0736fbb
Safeguard EdgeGrid.hpp (#752)
lujiaxin001 Aug 21, 2026
3afbc5d
fix: use literal format string for visibility icon in GCodeViewer leg…
Kenshin627 Aug 21, 2026
a9012f1
fix: crash in solve_extruder_order due to out-of-bounds access (Sentr…
lujiaxin001 Aug 21, 2026
ecd1e9e
fix: first layer height should not override variable layer height pro…
mwz-iot Aug 21, 2026
379971c
Fix crashes reported by Sentry during GUI shutdown/recreation (#753)
iesteem Aug 24, 2026
fc45370
fix(login): capture token when github oauth callback returns raw json…
SukiSunYuhang Aug 24, 2026
bbc134b
fix gcode preview bug (#765)
fire2wind Aug 24, 2026
8bd2480
feat: extract foreground change subscription from feature_wcp_systemi…
SukiSunYuhang Aug 24, 2026
0a99ff6
feat(sswcp): add sw_UpdateDeviceInfo, remove blocking query_machine_i…
LuckZAE Aug 24, 2026
98859ec
fix(tests): relax find_package(Qhull) to QUIET like the main build (#…
zhangzhend0ng Aug 24, 2026
2e4d761
Feature:Add unified selected-object highlight rendering (#764)
PILIPALA030 Aug 25, 2026
39273d8
fix(3mf): write Snapmaker_Orca application tag instead of BambuStudio…
lzqiang46-cyber Aug 25, 2026
9e1c17f
feat: render official filament gradients bottom-to-top (#778)
PILIPALA030 Aug 26, 2026
5217304
fix: resolve tree-support slicing stall at 70% when base pattern spac…
zackaree-shen Aug 28, 2026
dffee72
fix: crash when switching to Filament view after importing upstream O…
zackaree-shen Aug 28, 2026
81e4c49
Feat: render lod system (#737)
Kenshin627 Aug 28, 2026
0871cd6
fix: crash slicing multi-material 3MF with raft after disabling suppo…
zackaree-shen Aug 28, 2026
d2a0b69
fix filament load path error. (#729)
LiuLikeQian Aug 31, 2026
4b758c1
fix: fall back to legacy color picker for incompatible filament prese…
PILIPALA030 Sep 1, 2026
cf7aabf
Feature high flow merge (#794)
zhouzengping Sep 1, 2026
1353622
fix: carry flush volumes across U1 nozzle switch to prevent heap corr…
PILIPALA030 Sep 1, 2026
e0c8a28
fix: remove orphaned render_with_outline definition left by #737 (#764)
zhangzhend0ng Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
177 changes: 177 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Code Coverage

# Disabled by default to avoid running the coverage build on every push and PR.
# Trigger manually from the Actions tab (workflow_dispatch), or re-enable
# push/pull_request triggers when you want CI coverage again.
on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
coverage:
name: Coverage (ubuntu-22.04)
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v5
with:
lfs: 'true'

- name: Restore deps tarball
id: cache_deps
uses: actions/cache@v4
with:
# Cache a SINGLE zstd tarball instead of the multi-million-file
# destdir tree (archiving the raw OCCT/OpenCV/boost headers never
# completed, so deps rebuilt every run). A single tarball restores/
# saves reliably; the key is repo-scoped and shared with the
# test-linux / sanitizer workflows (first to build serves the rest).
path: ${{ github.workspace }}/deps-destdir.tar.zst
key: ubuntu-22.04-deps-tarball-${{ hashFiles('deps/CMakeLists.txt', 'deps/*.cmake', 'deps/*/*.cmake', 'deps/*/*.patch', 'build_linux.sh') }}

- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0"

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake git g++ build-essential libgl1-mesa-dev m4 \
libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules pkgconf \
libglu1-mesa-dev libcairo2-dev libgtk-3-dev libsoup2.4-dev libwebkit2gtk-4.1-dev \
libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-bad wget sudo autoconf curl libunwind-dev texinfo ccache lcov libblosc-dev

- name: Install dependencies from build_linux.sh
shell: bash
run: sudo ./build_linux.sh -ur

- name: Fix permissions
shell: bash
run: sudo chown $USER -R ./

- name: Free disk space
shell: bash
run: |
echo "Before cleanup:" && df -h /
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /usr/share/swift /usr/local/share/powershell /usr/local/share/chromium /usr/local/lib/node_modules 2>/dev/null || true
echo "After cleanup:" && df -h /

- name: Setup swap (coverage builds need extra memory)
shell: bash
run: |
SWAPFILE="/swapfile-$$"
sudo swapoff "$SWAPFILE" 2>/dev/null || true
sudo rm -f "$SWAPFILE"
sudo fallocate -l 4G "$SWAPFILE"
sudo chmod 600 "$SWAPFILE"
sudo mkswap "$SWAPFILE"
sudo swapon "$SWAPFILE"
# Clean up stale swap from previous runs on reused runners
sudo swapoff /swapfile 2>/dev/null || true
sudo rm -f /swapfile

- name: Extract deps tarball (cache hit)
if: steps.cache_deps.outputs.cache-hit == 'true'
shell: bash
run: |
mkdir -p deps/build
tar --zstd -x -f deps-destdir.tar.zst -C deps/build
rm -f deps-destdir.tar.zst

- name: Build dependencies (cache miss)
if: steps.cache_deps.outputs.cache-hit != 'true'
shell: bash
run: |
mkdir -p deps/build
mkdir -p deps/build/destdir
./build_linux.sh -dr
sudo chown $USER -R ./
# Pack the freshly built destdir into a single tarball for reliable caching.
tar --zstd -c -f deps-destdir.tar.zst -C deps/build destdir


- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ubuntu-22.04-coverage
append-timestamp: false
- name: Configure CMake with coverage
shell: bash
run: cmake -S . -B build_cov -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_COVERAGE=ON -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/deps/build/destdir/usr/local" -DSLIC3R_STATIC=ON -DOPENVDB_USE_STATIC_LIBS=ON -DSLIC3R_GUI=OFF -DBUILD_TESTS=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache

- name: Build tests
id: build-tests
shell: bash
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/deps/build/destdir/usr/local/lib:$LD_LIBRARY_PATH
run: |
cmake --build build_cov --target tests --parallel 1
test -f build_cov/tests/libslic3r/libslic3r_tests \
|| test -f build_cov/tests/fff_print/fff_print_tests \
|| test -f build_cov/tests/libnest2d/libnest2d_tests \
|| { echo "ERROR: No test binaries found in build_cov/tests/"; exit 1; }

- name: Run tests with JUnit output
if: success()
shell: bash
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/deps/build/destdir/usr/local/lib:$LD_LIBRARY_PATH
# -E '\[trace\]': drop ghost test names created by Catch2 v3 test
# discovery. The test binaries emit a boost::log trace line
# ("Initializing StaticPrintConfigs") to stdout during discovery; that
# line is captured as a (bogus) test name and then fails at runtime with
# "No test cases matched". The leak originates in production static-init
# logging and cannot be suppressed without touching production sources,
# so we exclude those pseudo-tests here. Real tests never contain a
# literal "[trace]" token in their names.
run: ctest --test-dir build_cov --output-on-failure --output-junit "${{ github.workspace }}/build_cov/test-results.xml" --timeout 3600 -E '\[trace\]'

- name: Upload test results
if: always()
uses: actions/upload-artifact@v5
with:
name: test-results-coverage
path: build_cov/test-results.xml
if-no-files-found: warn

- name: Generate coverage report
if: always() && steps.build-tests.outcome == 'success'
shell: bash
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/deps/build/destdir/usr/local/lib:$LD_LIBRARY_PATH
run: |
cmake --build build_cov --target coverage 2>&1 | tee build_cov/coverage-summary.txt

- name: Upload coverage report
if: always() && steps.build-tests.outcome == 'success'
uses: actions/upload-artifact@v5
with:
name: coverage-report
path: build_cov/coverage/
if-no-files-found: warn

- name: Upload coverage summary
if: always() && steps.build-tests.outcome == 'success'
uses: actions/upload-artifact@v5
with:
name: coverage-summary
path: build_cov/coverage-summary.txt
if-no-files-found: warn

- name: Generate HTML report
if: always()
shell: bash
run: node scripts/junit-to-html.js build_cov/test-results.xml -t "OrcaSlicer Coverage Tests" -o build_cov/test-report.html

- name: Upload HTML report
if: always()
uses: actions/upload-artifact@v5
with:
name: test-report-${{ matrix.os }}
path: build_cov/test-report.html
if-no-files-found: warn
Loading
Loading