From 5630baeb4d32dbfc4461cf5a3475b701cdfb1d18 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Thu, 13 Aug 2026 15:34:00 +0900 Subject: ci: run CTest in parallel Run CTest with parallel jobs in the Windows, Emscripten, Fedora, and shared test-script paths to reduce test time. --- .github/workflows/emscripten.yml | 4 ++-- .github/workflows/fedora-rawhide.yml | 2 +- .github/workflows/windows.yml | 2 +- scripts/test | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 6087aba..914446b 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -43,7 +43,7 @@ jobs: run: cmake --build build --config Release --parallel 4 - name: "Test" - run: ctest --test-dir build -C Release --output-on-failure + run: ctest --test-dir build -C Release --parallel --output-on-failure # Test ASAN with and without ASM enabled. test-asan: @@ -80,4 +80,4 @@ jobs: run: cmake --build build --config Release --parallel 4 - name: "Test" - run: ctest --test-dir build -C Release --output-on-failure + run: ctest --test-dir build -C Release --parallel --output-on-failure diff --git a/.github/workflows/fedora-rawhide.yml b/.github/workflows/fedora-rawhide.yml index 078bc02..c3dd8a8 100644 --- a/.github/workflows/fedora-rawhide.yml +++ b/.github/workflows/fedora-rawhide.yml @@ -37,4 +37,4 @@ jobs: ninja - name: Test run: | - ninja test + CTEST_PARALLEL_LEVEL="" ninja test diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 729ff46..908e081 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -88,7 +88,7 @@ jobs: - name: "Test" shell: cmd - run: ctest --test-dir build -C Release --output-on-failure + run: ctest --test-dir build -C Release --parallel --output-on-failure - name: "Upload build artifacts" if: always() diff --git a/scripts/test b/scripts/test index 0e84b22..6b51b1e 100755 --- a/scripts/test +++ b/scripts/test @@ -11,6 +11,7 @@ if [ "$ARCH" = "mingw32" -o "$ARCH" = "mingw64" -o "$ARCH" = "arm32" ]; then fi ENABLE_ASM="${ENABLE_ASM:=ON}" +export CTEST_PARALLEL_LEVEL="${CTEST_PARALLEL_LEVEL-}" # setup_cross_compiler sets up environment variables for cross-compilation with the given prefix. setup_cross_compiler() { -- cgit v1.2.3-55-g6feb