6 - .github/workflows/corevalidation.yml
7 - .github/workflows/corevalidation-report.yml
8 - CMSIS/Core/Include/**/*
9 - CMSIS/Core/Source/**/*
10 - CMSIS/CoreValidation/**/*
15 group: ${{ github.workflow }}-${{ github.ref }}
16 cancel-in-progress: true
24 compiler: [AC6, GCC, Clang]
26 runs-on: ubuntu-latest
29 ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
33 sudo add-apt-repository ppa:deadsnakes/ppa
34 sudo apt-get install libpython3.9
36 - uses: actions/checkout@v4
38 - working-directory: /home/runner
40 GH_TOKEN: ${{ github.token }}
42 if [ -d Cortex_DFP ]; then
45 git checkout -f origin/main
47 gh repo clone ARM-software/Cortex_DFP
50 - uses: actions/setup-python@v4
52 python-version: '3.10'
55 - name: Python requirements
57 pip install -r ./CMSIS/CoreValidation/Project/requirements.txt
60 uses: actions/cache@v3
62 key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
64 vcpkg-${{ runner.os }}-${{ runner.arch }}-
65 path: /home/runner/.vcpkg
67 - name: Install LLVM/Clang dependencies
68 if: matrix.compiler == 'Clang'
69 working-directory: /home/runner
72 sudo apt-get install libtinfo5
74 - name: Prepare vcpkg env
75 working-directory: ./CMSIS/CoreValidation/Project
77 . <(curl https://aka.ms/vcpkg-init.sh -L)
78 vcpkg x-update-registry --all
81 echo "Fix library search path for VHT models"
82 echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(dirname $(which VHT_MPS2_Cortex-M3))" >> $GITHUB_ENV
84 echo "Fix execute permissions for VHT models"
85 chmod +x $(dirname $(which VHT_MPS2_Cortex-M3))/VHT_*
87 echo "Patch CMSIS-Toolbox"
88 pushd $(dirname $(which cbuild))/../etc
89 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/CLANG.17.0.1.cmake
92 - name: Activate Arm tool license
93 working-directory: ./CMSIS/CoreValidation/Project
95 . /home/runner/.vcpkg/vcpkg-init
97 if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
98 armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
100 armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
103 - name: Initialize CodeQL
104 if: matrix.compiler == 'GCC'
105 uses: github/codeql-action/init@v2
108 queries: security-and-quality
110 - uses: ammaraskar/gcc-problem-matcher@master
111 if: matrix.compiler == 'Clang' || matrix.compiler == 'GCC'
114 working-directory: ./CMSIS/CoreValidation/Project
116 . /home/runner/.vcpkg/vcpkg-init
119 echo "Register local Cortex_DFP pack"
120 cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
122 echo "Build test projects ..."
123 ./build.py --verbose -m VHT -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
125 - name: Perform CodeQL Analysis
126 if: ${{ !cancelled() && matrix.compiler == 'GCC' }}
127 uses: github/codeql-action/analyze@v2
130 if: ${{ env.ARM_UBL_ACTIVATION_CODE }}
131 working-directory: ./CMSIS/CoreValidation/Project
133 . /home/runner/.vcpkg/vcpkg-init
136 echo "Run test projects ..."
137 ./build.py --verbose -m VHT -c ${{ matrix.compiler }} -d "CM[047]*" -d "CM3" -d "CM[23]3*" run || echo "::warning::==== Some configurations failed to run! ==="
139 - name: Deactivate Arm tool license
141 working-directory: ./CMSIS/CoreValidation/Project
143 . /home/runner/.vcpkg/vcpkg-init
145 if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
146 armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
148 armlm deactivate --product KEMDK-COM0
151 - name: Archive Test Reports
152 if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
153 uses: actions/upload-artifact@v3
155 name: test-results-${{ matrix.compiler }}
156 path: ./CMSIS/CoreValidation/Project/build/*.junit
159 needs: [build-and-run]
160 runs-on: ubuntu-latest
162 - name: Archive event file
163 if: ${{ !cancelled() }}
164 uses: actions/upload-artifact@v3
167 path: ${{ github.event_path }}