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.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Packages: network tests skipped in the package jobs (SF_TEST_NO_NETWORK), macOS dmg retries hdiutil 'Resource busy' up to 3 times
islandmedfc1df63e34c0
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.ymlindex 6d25197e..ce0924c8 100644--- a/.github/workflows/packages.yml+++ b/.github/workflows/packages.yml@@ -50,6 +50,9 @@ env:CCACHE_DEPEND: 'true'# Saved by branch runs only: never a tag, never a pull request.SAVE_CACHE: ${{ !startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request' }}+ # Tests that open real network connections return early here (tests/TestHarness.h networkTestsOff): a runner's+ # network stalled ar_link_sends_the_model_over_webrtc on Windows. CI (ci.yml) still runs them.+ SF_TEST_NO_NETWORK: '1'jobs:linux:@@ -261,7 +264,15 @@ jobs:# UI tests need a display; they run under Xvfb in the Linux jobs above and in CI.run: 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+ # hdiutil sometimes fails with "Resource busy" on the runner (a disk image still attached): up to 3 tries.+ run: |+ cd build+ for attempt in 1 2 3; do+ if cpack -G DragNDrop 2>&1 | tee cpack.log; [ "${PIPESTATUS[0]}" = 0 ]; then exit 0; fi+ grep -q "Resource busy" cpack.log || exit 1+ echo "hdiutil: Resource busy (try $attempt of 3)"; sleep 15+ done+ exit 1- uses: actions/upload-artifact@v7with:name: macosdiff --git a/tests/TestHarness.h b/tests/TestHarness.hindex 4044c45f..90756fdc 100644--- a/tests/TestHarness.h+++ b/tests/TestHarness.h@@ -62,6 +62,14 @@ inline double timeLimit(double local) {return std::getenv("CI") || std::getenv("GITHUB_ACTIONS") ? local * 4.0 : local;}+// Tests that open real network connections (WebRTC peers over the machine's interfaces) return early with+// SF_TEST_NO_NETWORK=1: the release package jobs (.github/workflows/packages.yml) set it, because a runner's network+// can stall them (ar_link_sends_the_model_over_webrtc timed out on the Windows runner); CI and local runs keep them.+inline bool networkTestsOff() {+ const char* off = std::getenv("SF_TEST_NO_NETWORK");+ return off && std::string(off) == "1";+}+inline std::string tempPath(const char* name) { return (std::filesystem::temp_directory_path() / name).string(); }} // namespace sf::testdiff --git a/tests/test_phone_link.cpp b/tests/test_phone_link.cppindex eaa71475..c17c3183 100644--- a/tests/test_phone_link.cpp+++ b/tests/test_phone_link.cpp@@ -523,6 +523,7 @@ TEST(face_link_over_webrtc) {CHECK(err.find("without WebRTC") != std::string::npos);return;}+ if (sf::test::networkTestsOff()) return;// base64url and AES-GCM as the face page uses them.CHECK(base64UrlEncode("\xff\xfe") == "__4");std::string bytes;@@ -580,7 +581,7 @@ TEST(face_link_over_webrtc) {// Android AR: Scene Viewer can't load a model from the desktop's plain-HTTP address, so the website's AR page gets// it over the WebRTC link (reliable channel): the page asks, the app exports, the GLB arrives in chunks, intact.TEST(ar_link_sends_the_model_over_webrtc) {- if (!webrtcAvailable()) return;+ if (!webrtcAvailable() || sf::test::networkTestsOff()) return;const fs::path inbox = freshDir("sf_phone_ar_rtc");PhoneLink link;std::string err;@@ -657,7 +658,7 @@ TEST(ar_link_sends_the_model_over_webrtc) {// Android Chrome may not reach the computer at all: the AR link also carries a relay URL, and each model goes// there encrypted with the link's key (only the page can read it).TEST(ar_link_uploads_the_model_encrypted_to_the_relay) {- if (!webrtcAvailable()) return;+ if (!webrtcAvailable() || sf::test::networkTestsOff()) return;std::mutex m;std::vector<std::pair<std::string, std::string>> posted; // query, bodyHttpServer relay;@@ -709,7 +710,7 @@ TEST(ar_link_uploads_the_model_encrypted_to_the_relay) {// The phone's answer through the relays (services/link-worker's protocol, which ntfy.sh also speaks): the first// relay is down, the second, a fake one here, carries the message; the desktop polls both and connects.TEST(face_link_answer_through_the_relays) {- if (!webrtcAvailable()) return;+ if (!webrtcAvailable() || sf::test::networkTestsOff()) return;std::mutex relayMutex;std::vector<std::pair<std::string, std::string>> posted; // topic, messageHttpServer relay;