mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 11:22:07 +00:00
ci: run unit tests on Windows and macOS (#14443)
* ci: run unit tests on Windows and macOS The Unit Tests CI job only ran on Linux, so platform-specific bugs invisible to a Linux build could land undetected (e.g. the MSVC-only NfpPlacer crash fixed in #14267). The full non-[NotWorking] suite already builds and passes on every shipped arch, so this wires them into CI. A reusable unit_tests.yml, called once per built arch, downloads that arch's test artifact and runs ctest. Each build leg builds the test executables and uploads them; a single publish_test_results job on Linux aggregates the JUnit results into one check. Coverage: Linux x86_64 + aarch64, Windows x64 + arm64, macOS arm64. macOS x86_64 is deferred (cross-built on arm64, needs Rosetta). - build_release_vs.bat: "tests" token enables BUILD_TESTS - build_release_macos.sh: -T builds and runs tests; ORCA_TESTS_BUILD_ONLY builds them without running (used by CI) - scripts/run_unit_tests.sh: parameterized test dir and build config Addresses #11273. * ci: bump actions/checkout to v7 in reusable unit_tests workflow Match the actions/checkout v6->v7 bump (#14517) that upstream applied to the inline test job this reusable workflow replaces.
This commit is contained in:
@@ -59,7 +59,7 @@ while getopts ":dpa:snt:xbc:i:1Tuh" opt; do
|
||||
echo " -c: Set CMake build configuration, default is Release"
|
||||
echo " -i: Add a prefix to ignore during CMake dependency discovery (repeatable), defaults to /opt/local:/usr/local:/opt/homebrew"
|
||||
echo " -1: Use single job for building"
|
||||
echo " -T: Build and run tests"
|
||||
echo " -T: Build and run tests (set ORCA_TESTS_BUILD_ONLY=1 to build without running)"
|
||||
exit 0
|
||||
;;
|
||||
* )
|
||||
@@ -209,13 +209,10 @@ function build_slicer() {
|
||||
cmake --build . --config "$BUILD_CONFIG" --target "$SLICER_BUILD_TARGET"
|
||||
)
|
||||
|
||||
if [ "1." == "$BUILD_TESTS". ]; then
|
||||
echo "Running tests for $_ARCH..."
|
||||
(
|
||||
set -x
|
||||
cd "$PROJECT_BUILD_DIR"
|
||||
ctest --build-config "$BUILD_CONFIG" --output-on-failure
|
||||
)
|
||||
# -T also runs the tests; ORCA_TESTS_BUILD_ONLY=1 builds them without
|
||||
# running, so CI can build here and run them in a dedicated job.
|
||||
if [ "1." == "$BUILD_TESTS". ] && [ "1." != "$ORCA_TESTS_BUILD_ONLY". ]; then
|
||||
"$PROJECT_DIR/scripts/run_unit_tests.sh" "build/$_ARCH/tests" "$BUILD_CONFIG"
|
||||
fi
|
||||
|
||||
echo "Verify localization with gettext..."
|
||||
|
||||
Reference in New Issue
Block a user