From 1fc9af5cbc839c2942f9bd41b4b0eeaa1318e277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Barto=C5=88?= Date: Thu, 8 Aug 2024 09:28:39 +0200 Subject: [PATCH] Create summary for test results comparison --- .github/workflows/advanced.yml | 1 - .../workflows/build-and-test-toolchain.yml | 2 +- .github/workflows/main.yml | 1 - .github/workflows/test-toolchain.yml | 53 +++++++++++++------ 4 files changed, 37 insertions(+), 20 deletions(-) diff --git a/.github/workflows/advanced.yml b/.github/workflows/advanced.yml index 431faa06a..fc85869fd 100644 --- a/.github/workflows/advanced.yml +++ b/.github/workflows/advanced.yml @@ -4,7 +4,6 @@ on: push: branches: - main - pull_request: workflow_dispatch: inputs: binutils_branch: diff --git a/.github/workflows/build-and-test-toolchain.yml b/.github/workflows/build-and-test-toolchain.yml index 1e7b020c1..f67ea1a29 100644 --- a/.github/workflows/build-and-test-toolchain.yml +++ b/.github/workflows/build-and-test-toolchain.yml @@ -1,4 +1,4 @@ -name: Build toolchain +name: Build and test toolchain on: workflow_dispatch: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e5ce93f74..2656d3b9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,6 @@ on: push: branches: - main - pull_request: workflow_dispatch: inputs: binutils_branch: diff --git a/.github/workflows/test-toolchain.yml b/.github/workflows/test-toolchain.yml index 79b81ca29..e6943a1f5 100644 --- a/.github/workflows/test-toolchain.yml +++ b/.github/workflows/test-toolchain.yml @@ -1,4 +1,4 @@ -name: Test toolchain +name: Test toolchain against baseline on: workflow_dispatch: @@ -35,10 +35,14 @@ on: description: 'Platform to build for' required: false default: 'w64-mingw32' - crt: - description: 'C runtime to build for' + gcc_module: + description: 'GCC module to test' required: false - default: 'msvcrt' + default: '' + gcc_test_filter: + description: 'GCC test filter' + required: false + default: '' workflow_call: inputs: binutils_branch_baseline: @@ -57,7 +61,9 @@ on: type: string platform: type: string - crt: + gcc_module: + type: string + gcc_test_filter: type: string env: @@ -73,25 +79,29 @@ jobs: name: Build and test baseline uses: ./.github/workflows/build-and-test-toolchain.yml with: - binutils_branch: ${{ inputs.binutils_branch_baseline }} - gcc_branch: ${{ inputs.gcc_branch_baseline || 'aarch64-patch-stage1-v11-upstream' }} - mingw_branch: ${{ inputs.mingw_branch_baseline }} - arch: ${{ inputs.arch }} - platform: ${{ inputs.platform }} - crt: ${{ inputs.crt }} + binutils_branch: ${{ inputs.binutils_branch_baseline || 'upstream' }} + gcc_branch: ${{ inputs.gcc_branch_baseline || 'upstream' }} + mingw_branch: ${{ inputs.mingw_branch_baseline || 'upstream' }} + arch: ${{ inputs.arch || 'x86_64' }} + platform: ${{ inputs.platform || 'w64-mingw32' }} + crt: msvcrt tag: baseline + gcc_module: ${{ inputs.gcc_module || '' }} + gcc_test_filter: ${{ inputs.gcc_test_filter || '' }} build-and-test-changes: name: Build and test changes uses: ./.github/workflows/build-and-test-toolchain.yml with: - binutils_branch: ${{ inputs.binutils_branch_changes }} - gcc_branch: ${{ inputs.gcc_branch_changes || 'aarch64-patch-stage1-v11' }} - mingw_branch: ${{ inputs.mingw_branch_changes }} - arch: ${{ inputs.arch }} - platform: ${{ inputs.platform }} - crt: ${{ inputs.crt }} + binutils_branch: ${{ inputs.binutils_branch_changes || 'woarm64' }} + gcc_branch: ${{ inputs.gcc_branch_changes || 'woarm64' }} + mingw_branch: ${{ inputs.mingw_branch_changes || 'woarm64' }} + arch: ${{ inputs.arch || 'x86_64' }} + platform: ${{ inputs.platform || 'w64-mingw32' }} + crt: msvcrt tag: changes + gcc_module: ${{ inputs.gcc_module || '' }} + gcc_test_filter: ${{ inputs.gcc_test_filter || '' }} compare-test-results: name: Compare test results @@ -128,6 +138,15 @@ jobs: run: | .github/scripts/toolchain/compare-gcc-results.sh baseline changes + - name: Create summary + run: | + source .github/scripts/config.sh + RESULTS_PATH=$ARTIFACT_PATH/gcc-tests-results + for FILE in $RESULTS_PATH/*.diff; do + echo "FILE: $FILE" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY + done + - name: Upload artifact uses: actions/upload-artifact@v4 with: