Skip to content

Comparative test of toolchain branches #62

Comparative test of toolchain branches

Comparative test of toolchain branches #62

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
crt:
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
ARCH: ${{ inputs.arch || 'x86_64' }}
PLATFORM: ${{ inputs.platform || 'w64-mingw32' }}
CRT: ${{ inputs.crt || 'msvcrt' }}
MODULE: ${{ inputs.gcc_module || '' }}
FILTER: ${{ inputs.gcc_test_filter || '' }}
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 }}
gcc_branch: ${{ inputs.gcc_branch_baseline || 'upstream' }}
mingw_branch: ${{ inputs.mingw_branch_baseline }}
arch: ${{ env.ARCH }}

Check failure on line 94 in .github/workflows/test-toolchain.yml

View workflow run for this annotation

GitHub Actions / Test toolchain against baseline

Invalid workflow file

The workflow is not valid. .github/workflows/test-toolchain.yml (Line: 94, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.ARCH .github/workflows/test-toolchain.yml (Line: 95, Col: 17): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PLATFORM
platform: ${{ env.PLATFORM }}
crt: ${{ env.CRT }}
tag: baseline
gcc_module: ${{ env.MODULE }}
gcc_test_filter: ${{ env.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 || 'woarm64' }}
mingw_branch: ${{ inputs.mingw_branch_changes }}
arch: ${{ env.ARCH }}
platform: ${{ env.PLATFORM }}
crt: ${{ env.CRT }}
tag: changes
gcc_module: ${{ env.MODULE }}
gcc_test_filter: ${{ env.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: |
.github/scripts/toolchain/create-gcc-summary.sh baseline changes >> \
${{ env.ARTIFACT_PATH }}/gcc-tests-results/summary.txt
cat >> $GITHUB_STEP_SUMMARY
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gcc-tests-results
path: ${{ env.ARTIFACT_PATH }}/gcc-tests-results
retention-days: 30