diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index a644af4064..8d471eb3f9 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -1,10 +1,7 @@ name: Build macOS -on: - push: - pull_request: - branches: - - master +on: + workflow_dispatch: jobs: build-macos: diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 7c7c1683a9..5f0d6bf1ee 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -170,7 +170,17 @@ jobs: if: ${{ always() && steps.cmake-configure.outcome == 'success' }} - name: Run Tests - run: ctest -V --test-dir _build + run: | + mkdir -p "${{ github.workspace }}/_build/test-results" + ctest -V --test-dir _build --output-junit "${{ github.workspace }}/_build/test-results/test-results-${{ matrix.os }}.xml" + + - name: Upload JUnit XML + if: always() + uses: actions/upload-artifact@v7 + with: + name: 'test-results-${{ matrix.os }}' + path: ${{ github.workspace }}/_build/test-results/test-results-${{ matrix.os }}.xml + if-no-files-found: warn - name: CPack run: cpack -G DEB -R '${{ env.DEB_VERSION }}' --config _build/CPackConfig.cmake @@ -194,6 +204,21 @@ jobs: path: ${{ github.workspace }}/_build/lib/* #--------------------------------------------------------------------------------------------------- + + report-ubuntu-tests: + needs: [build-ubuntu] + if: always() + permissions: + contents: read + pull-requests: write + uses: YannikSpaeth/ci-failure-summary-workflow/.github/workflows/ci-failure-summary.yml@main + with: + artifact_name: 'test-results-*' + pr_number: ${{ github.event.pull_request.number }} + sha: ${{ github.sha }} + secrets: inherit + + #--------------------------------------------------------------------------------------------------- run-benchmarks: if: github.repository == 'eclipse-ecal/ecal' && github.ref_name == 'master' diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 88ccc74afb..73f4db8834 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,10 +1,7 @@ name: Build Windows on: - push: - pull_request: - branches: - - master + workflow_dispatch: env: IS_JENKINS_SIGNING_ALLOWED: true @@ -200,13 +197,25 @@ jobs: run: cmake --build "${{ runner.workspace }}/_build/csharp" --config Release shell: cmd + - name: Ensure JUnit output directory exists + run: mkdir "${{ runner.workspace }}\_build\test-results" + shell: cmd + - name: Run C# Tests - run: ctest -C Release -V --test-dir "${{ runner.workspace }}/_build/csharp" + run: ctest -C Release -V --test-dir "${{ runner.workspace }}/_build/csharp" --output-junit "${{ runner.workspace }}/_build/test-results/test-results-csharp.xml" - name: Run Tests - run: ctest -C Release -V + run: ctest -C Release -V --output-junit "${{ runner.workspace }}/_build/test-results/test-results-windows.xml" working-directory: ${{ runner.workspace }}/_build/complete + - name: Upload JUnit XML + if: always() + uses: actions/upload-artifact@v7 + with: + name: test-results-windows + path: ${{ runner.workspace }}/_build/test-results/*.xml + if-no-files-found: warn + - name: Pack SDK run: cpack -C Debug working-directory: ${{ runner.workspace }}/_build/sdk @@ -263,7 +272,22 @@ jobs: path: ${{ runner.workspace }}/_build/complete/bin/*.dll # -------------------------------------------------------------------------------------------------- - + + report-windows-tests: + needs: [build-windows] + if: always() + permissions: + contents: read + pull-requests: write + uses: YannikSpaeth/ecal-ci-pipeline-improvements/.github/workflows/ci-failure-summary.yml@main + with: + artifact_name: test-results-* + pr_number: ${{ github.event.pull_request.number }} + sha: ${{ github.sha }} + secrets: inherit + + # -------------------------------------------------------------------------------------------------- + run-benchmarks: if: github.repository == 'eclipse-ecal/ecal' && github.ref_name == 'master' runs-on: windows-2022 diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 107c914c8e..c506a18c77 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,8 +1,6 @@ name: Build Wheels on: - push: - pull_request: workflow_dispatch: jobs: diff --git a/ecal/tests/cpp/core_test/src/core_test.cpp b/ecal/tests/cpp/core_test/src/core_test.cpp index 16ee909392..7e2e73debb 100644 --- a/ecal/tests/cpp/core_test/src/core_test.cpp +++ b/ecal/tests/cpp/core_test/src/core_test.cpp @@ -112,6 +112,21 @@ TEST(core_cpp_core, eCAL_Ok) EXPECT_EQ(false, eCAL::Ok()); } +TEST(core_cpp_core, IntentionalFailure_One) +{ + EXPECT_EQ(1, 2) << "Intentional CI failure #1 for summary validation"; +} + +TEST(core_cpp_core, IntentionalFailure_Two) +{ + EXPECT_TRUE(false) << "Intentional CI failure #2 for summary validation"; +} + +TEST(core_cpp_core, IntentionalFailure_Three) +{ + EXPECT_STREQ("expected", "actual") << "Intentional CI failure #3 for summary validation"; +} + /* excluded for now, system timer jitter too high */ #if 0 namespace