Comparative test of toolchain branches #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test toolchain against baseline | |
on: | |
workflow_dispatch: | |
inputs: | |
binutils_branch_baseline: | |
description: 'Baseline Binutils branch' | |
required: false | |
default: 'upstream' | |
binutils_branch_changes: | |
description: 'Changes Binutils branch' | |
required: false | |
default: 'upstream' | |
gcc_branch_baseline: | |
description: 'Baseline GCC branch' | |
required: false | |
default: 'upstream' | |
gcc_branch_changes: | |
description: 'Changes GCC branch' | |
required: false | |
default: 'upstream' | |
mingw_branch_baseline: | |
description: 'Baseline MinGW branch' | |
required: false | |
default: 'upstream' | |
mingw_branch_changes: | |
description: 'Changes MinGW branch' | |
required: false | |
default: 'upstream' | |
arch: | |
description: 'Architecture to build for' | |
required: false | |
default: 'x86_64' | |
platform: | |
description: 'Platform to build for' | |
required: false | |
default: 'w64-mingw32' | |
gcc_module: | |
description: 'GCC module to test' | |
required: false | |
default: '' | |
gcc_test_filter: | |
description: 'GCC test filter' | |
required: false | |
default: '' | |
workflow_call: | |
inputs: | |
binutils_branch_baseline: | |
type: string | |
binutils_branch_changes: | |
type: string | |
gcc_branch_baseline: | |
type: string | |
gcc_branch_changes: | |
type: string | |
mingw_branch_baseline: | |
type: string | |
mingw_branch_changes: | |
type: string | |
arch: | |
type: string | |
platform: | |
type: string | |
gcc_module: | |
type: string | |
gcc_test_filter: | |
type: string | |
env: | |
GCC_REPO: Windows-on-ARM-Experiments/gcc-woarm64 | |
GCC_BRANCH: ${{ inputs.gcc_branch_changes || 'woarm64' }} | |
GCC_VERSION: gcc-master | |
SOURCE_PATH: ${{ github.workspace }}/code | |
ARTIFACT_PATH: ${{ github.workspace }}/artifact | |
jobs: | |
build-and-test-baseline: | |
name: Build and test baseline | |
uses: ./.github/workflows/build-and-test-toolchain.yml | |
with: | |
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 || '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 | |
needs: [build-and-test-baseline, build-and-test-changes] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ github.workspace }} | |
- name: Checkout GCC | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.GCC_REPO }} | |
ref: ${{ env.GCC_BRANCH }} | |
sparse-checkout: 'contrib' | |
path: ${{ env.SOURCE_PATH }}/${{ env.GCC_VERSION }} | |
- name: Download baseline artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: gcc-tests-baseline | |
path: ${{ env.ARTIFACT_PATH }}/gcc-tests-baseline | |
- name: Download changes artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: gcc-tests-changes | |
path: ${{ env.ARTIFACT_PATH }}/gcc-tests-changes | |
- name: Compare results | |
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: | |
name: gcc-tests-results | |
path: ${{ env.ARTIFACT_PATH }}/gcc-tests-results | |
retention-days: 30 |