9 group: ${{ github.workflow }}-${{ github.ref }}
10 cancel-in-progress: true
18 compiler: [AC6, GCC, Clang]
20 runs-on: ubuntu-latest
23 ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
27 sudo add-apt-repository ppa:deadsnakes/ppa
28 sudo apt-get install libpython3.9
30 - uses: actions/checkout@v3
32 - working-directory: /home/runner
34 GH_TOKEN: ${{ github.token }}
36 if [ -d Cortex_DFP ]; then
39 git checkout -f origin/main
41 gh repo clone ARM-software/Cortex_DFP
44 - uses: actions/setup-python@v4
46 python-version: '3.10'
49 - name: Python requirements
51 pip install -r ./CMSIS/CoreValidation/Project/requirements.txt
54 uses: actions/cache@v3
56 key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
58 vcpkg-${{ runner.os }}-${{ runner.arch }}-
59 path: /home/runner/.vcpkg
61 - name: Install LLVM/Clang dependencies
62 if: matrix.compiler == 'Clang'
63 working-directory: /home/runner
66 sudo apt-get install libtinfo5
68 - name: Prepare vcpkg env
69 working-directory: ./CMSIS/CoreValidation/Project
71 . <(curl https://aka.ms/vcpkg-init.sh -L)
72 vcpkg x-update-registry --all
75 echo "Fix library search path for VHT models"
76 echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(dirname $(which VHT_MPS2_Cortex-M3))" >> $GITHUB_ENV
78 echo "Fix execute permissions for VHT models"
79 chmod +x $(dirname $(which VHT_MPS2_Cortex-M3))/VHT_*
81 echo "Patch CMSIS-Toolbox"
82 pushd $(dirname $(which cbuild))/../etc
83 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/AC6.6.18.0.cmake
84 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/GCC.10.3.1.cmake
85 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/CLANG.16.0.0.cmake
86 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/IAR.9.32.1.cmake
87 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/buildmgr/cbuildgen/config/CMSIS-Build-Utils.cmake
88 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/cdefault.yml
89 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/ac6_linker_script.sct
90 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/clang_linker_script.ld
91 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/gcc_linker_script.ld
92 curl -O https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/templates/iar_linker_script.ifc
95 - name: Activate Arm tool license
96 working-directory: ./CMSIS/CoreValidation/Project
98 . /home/runner/.vcpkg/vcpkg-init
100 if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
101 armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
103 armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
106 - name: Initialize CodeQL
107 if: matrix.compiler == 'GCC'
108 uses: github/codeql-action/init@v2
111 queries: security-and-quality
113 - uses: ammaraskar/gcc-problem-matcher@master
114 if: matrix.compiler == 'Clang' || matrix.compiler == 'GCC'
117 working-directory: ./CMSIS/CoreValidation/Project
119 . /home/runner/.vcpkg/vcpkg-init
122 echo "Register local Cortex_DFP pack"
123 cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
125 echo "Build test projects ..."
126 ./build.py --verbose -m VHT -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
128 - name: Perform CodeQL Analysis
129 if: ${{ !cancelled() && matrix.compiler == 'GCC' }}
130 uses: github/codeql-action/analyze@v2
133 if: ${{ env.ARM_UBL_ACTIVATION_CODE }}
134 working-directory: ./CMSIS/CoreValidation/Project
136 . /home/runner/.vcpkg/vcpkg-init
139 echo "Run test projects ..."
140 ./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! ==="
142 - name: Deactivate Arm tool license
144 working-directory: ./CMSIS/CoreValidation/Project
146 . /home/runner/.vcpkg/vcpkg-init
148 if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
149 armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
151 armlm deactivate --product KEMDK-COM0
154 - name: Archive Test Reports
155 if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
156 uses: actions/upload-artifact@v3
158 name: test-results-${{ matrix.compiler }}
159 path: ./CMSIS/CoreValidation/Project/build/*.junit
162 needs: [build-and-run]
163 runs-on: ubuntu-latest
165 - name: Archive event file
166 if: ${{ !cancelled() }}
167 uses: actions/upload-artifact@v3
170 path: ${{ github.event_path }}