Skip to content

Bump python-matrix-runner #622

Bump python-matrix-runner

Bump python-matrix-runner #622

Workflow file for this run

name: CoreValidation
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/corevalidation.yml
- .github/workflows/corevalidation-report.yml
- CMSIS/Core/Include/**/*
- CMSIS/Core/Source/**/*
- CMSIS/CoreValidation/**/*
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-run:
strategy:
fail-fast: true
matrix:
compiler: [AC6, GCC, Clang, Clang_TI]
runs-on: ubuntu-22.04
env:
ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
CLANG_TI_VERSION: "5.1.0.LTS"
CLANG_TI_TC_SUFFIX: "5_1_0"
CLANG_TI_INSTALL_PATH: "/home/runner/"
CLANG_TI_SHA256: "c758668b78c080be5ec75393cdd09d077742fd1183aa0c181318a0119d58c4d0"
steps:
- run: |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install libpython3.9
- uses: actions/checkout@v6
- working-directory: /home/runner
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ -d Cortex_DFP ]; then
cd Cortex_DFP
git fetch origin main
git checkout -f origin/main
else
gh repo clone ARM-software/Cortex_DFP
fi
- uses: actions/setup-python@v6
with:
python-version: '3.10'
cache: 'pip'
- name: Python requirements
run: |
pip install -r ./CMSIS/CoreValidation/Project/requirements.txt
- name: Install LLVM/Clang dependencies
if: matrix.compiler == 'Clang'
working-directory: /home/runner
run: |
sudo apt-get update
sudo apt-get install libtinfo5
- name: Activate vcpkg environment
uses: ARM-software/cmsis-actions/vcpkg@v1
with:
config: ./CMSIS/CoreValidation/Project/vcpkg-configuration.json
- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1
with:
code: "${{ env.ARM_UBL_ACTIVATION_CODE }}"
- name: Initialize CodeQL
if: matrix.compiler == 'GCC'
uses: github/codeql-action/init@v4
with:
languages: cpp
queries: security-and-quality
- uses: ammaraskar/gcc-problem-matcher@master
if: matrix.compiler == 'Clang' || matrix.compiler == 'Clang_TI' || matrix.compiler == 'GCC'
- name: Set TI Arm Clang Environment Variables and Path
if: matrix.compiler == 'Clang_TI'
run: |
echo "CLANG_TI_PATH=${{ env.CLANG_TI_INSTALL_PATH }}ti-cgt-armllvm_${{ env.CLANG_TI_VERSION }}" >> $GITHUB_ENV
echo "CLANG_TI_TOOLCHAIN_${{ env.CLANG_TI_TC_SUFFIX }}=${{ env.CLANG_TI_INSTALL_PATH }}ti-cgt-armllvm_${{ env.CLANG_TI_VERSION }}/bin" >> $GITHUB_ENV
- name: Cache TI Arm Clang
if: matrix.compiler == 'Clang_TI'
id: cache-ti-arm-clang
uses: actions/cache@v5
with:
path: ${{ env.CLANG_TI_PATH }}
key: ${{ runner.os }}-ti-arm-clang-${{ env.CLANG_TI_VERSION }}
- name: Download and Verify TI Arm Clang Installer
if: matrix.compiler == 'Clang_TI' && steps.cache-ti-arm-clang.outputs.cache-hit != 'true'
working-directory: /home/runner
run: |
FILE="ti_cgt_armllvm_${{ env.CLANG_TI_VERSION }}_linux-x64_installer.bin"
URL="https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-ayxs93eZNN/${{ env.CLANG_TI_VERSION }}/${FILE}"
curl -L "$URL" -o "$FILE"
echo "${{ env.CLANG_TI_SHA256 }} $FILE" | sha256sum --check
chmod +x "$FILE"
./"$FILE" --mode unattended --prefix "${{ env.CLANG_TI_INSTALL_PATH }}"
- name: Build
working-directory: ./CMSIS/CoreValidation/Project
run: |
echo "Register local Cortex_DFP pack"
cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
echo "Build test projects ..."
./build.py --verbose -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
- name: Perform CodeQL Analysis
if: ${{ !cancelled() && matrix.compiler == 'GCC' }}
uses: github/codeql-action/analyze@v4
- name: Execute
working-directory: ./CMSIS/CoreValidation/Project
run: |
echo "Run test projects ..."
./build.py --verbose -c ${{ matrix.compiler }} -d "CM*" run || echo "::warning::==== Some configurations failed to run! ==="
- name: Archive Test Reports
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.compiler }}
path: ./CMSIS/CoreValidation/Project/build/*.junit
event-file:
needs: [build-and-run]
runs-on: ubuntu-latest
steps:
- name: Archive event file
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: EventFile
path: ${{ github.event_path }}