From 02ff9f200cd75ceb6840b510fe3ae710cc5e2f66 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 24 Sep 2023 15:09:28 -0700 Subject: [PATCH] InstCountCI: Upload diff and check for failure --- .github/workflows/instcountci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/instcountci.yml b/.github/workflows/instcountci.yml index e99d39a4e..21a1919f5 100644 --- a/.github/workflows/instcountci.yml +++ b/.github/workflows/instcountci.yml @@ -86,6 +86,25 @@ jobs: working-directory: ${{runner.workspace}}/build run: mv ${{runner.workspace}}/build/Testing/Temporary/LastTest.log ${{runner.workspace}}/build/Testing/Temporary/LastTest_InstCountCI.log || true + - name: Update local repo instcount + if: ${{ always() }} + shell: bash + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config $BUILD_TYPE --target instcountci_update_tests + + - name: Get instcountCI diff + if: ${{ always() }} + shell: bash + working-directory: ${{github.workspace}}/ + run: git diff --output=${{runner.workspace}}/build/InstCountCI.diff + + - name: Check if InstCountCI Diff exists + if: ${{ always() }} + shell: bash + working-directory: ${{github.workspace}}/ + # Check if the file is empty + run: sh -c "! test -s ${{runner.workspace}}/build/InstCountCI.diff" + - name: Truncate test results if: ${{ always() }} shell: bash @@ -107,3 +126,12 @@ jobs: path: ${{runner.workspace}}/build/Testing/Temporary/LastTest_*.log retention-days: 3 + - name: Upload results InstCountCI + if: ${{ always() }} + uses: 'actions/upload-artifact@v3' + timeout-minutes: 1 + with: + name: Results-${{ env.runner_name }}-instcountci + path: ${{runner.workspace}}/build/InstCountCI.diff + retention-days: 3 +