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
27 compiler: [AC6, GCC, Clang, IAR]
29 runs-on: ubuntu-latest
32 ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }}
36 sudo add-apt-repository ppa:deadsnakes/ppa
37 sudo apt-get install libpython3.9
39 - uses: actions/checkout@v4
41 - working-directory: /home/runner
43 GH_TOKEN: ${{ github.token }}
45 if [ -d Cortex_DFP ]; then
48 git checkout -f origin/main
50 gh repo clone ARM-software/Cortex_DFP
53 - uses: actions/setup-python@v4
55 python-version: '3.10'
58 - name: Python requirements
60 pip install -r ./CMSIS/CoreValidation/Project/requirements.txt
63 uses: actions/cache@v3
65 key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}-${{ matrix.compiler }}
67 vcpkg-${{ runner.os }}-${{ runner.arch }}-
68 path: /home/runner/.vcpkg
70 - name: Install LLVM/Clang dependencies
71 if: matrix.compiler == 'Clang'
72 working-directory: /home/runner
75 sudo apt-get install libtinfo5
77 - name: Prepare vcpkg env
78 working-directory: ./CMSIS/CoreValidation/Project
80 . <(curl https://aka.ms/vcpkg-init.sh -L)
81 vcpkg x-update-registry --all
84 - name: Cache IAR Toolchain
85 uses: actions/cache@v3
86 if: matrix.compiler == 'IAR'
88 key: bxarm-${{env.IAR_VERSION}}-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
90 bxarm-${{env.IAR_VERSION}}-${{ runner.os }}-${{ runner.arch }}-
91 path: bxarm-${{env.IAR_VERSION}}.deb
93 - name: Install IAR Toolchain
94 if: matrix.compiler == 'IAR'
96 if [ ! -f bxarm-${{env.IAR_VERSION}}.deb ]; then
97 curl -LO http://files.iar.com/ftp/pub/box/bxarm-${{env.IAR_VERSION}}.deb
99 sudo dpkg -i bxarm-${{env.IAR_VERSION}}.deb
100 echo "/opt/iarsystems/bxarm/arm/bin" >> "$GITHUB_PATH"
101 echo "IAR_TOOLCHAIN_${IAR_VERSION//./_}=/opt/iarsystems/bxarm/arm/bin" >> "$GITHUB_ENV"
102 # TODO: activate license
104 - name: Activate Arm tool license
105 working-directory: ./CMSIS/CoreValidation/Project
107 . /home/runner/.vcpkg/vcpkg-init
109 if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
110 armlm activate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
112 armlm activate --server https://mdk-preview.keil.arm.com --product KEMDK-COM0
115 - name: Initialize CodeQL
116 if: matrix.compiler == 'GCC'
117 uses: github/codeql-action/init@v2
120 queries: security-and-quality
122 - uses: ammaraskar/gcc-problem-matcher@master
123 if: matrix.compiler == 'Clang' || matrix.compiler == 'GCC'
126 working-directory: ./CMSIS/CoreValidation/Project
128 . /home/runner/.vcpkg/vcpkg-init
131 echo "Register local Cortex_DFP pack"
132 cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc
134 echo "Build test projects ..."
135 ./build.py --verbose -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ==="
137 - name: Perform CodeQL Analysis
138 if: ${{ !cancelled() && matrix.compiler == 'GCC' }}
139 uses: github/codeql-action/analyze@v2
142 if: ${{ env.ARM_UBL_ACTIVATION_CODE }}
143 working-directory: ./CMSIS/CoreValidation/Project
145 . /home/runner/.vcpkg/vcpkg-init
148 echo "Run test projects ..."
149 ./build.py --verbose -c ${{ matrix.compiler }} -d "CM*" run || echo "::warning::==== Some configurations failed to run! ==="
151 - name: Deactivate Arm tool license
153 working-directory: ./CMSIS/CoreValidation/Project
155 . /home/runner/.vcpkg/vcpkg-init
157 if [[ -n "${{ env.ARM_UBL_ACTIVATION_CODE }}" ]]; then
158 armlm deactivate --code ${{ env.ARM_UBL_ACTIVATION_CODE }}
160 armlm deactivate --product KEMDK-COM0
163 - name: Archive Test Reports
164 if: ${{ !cancelled() && env.ARM_UBL_ACTIVATION_CODE }}
165 uses: actions/upload-artifact@v3
167 name: test-results-${{ matrix.compiler }}
168 path: ./CMSIS/CoreValidation/Project/build/*.junit
171 needs: [build-and-run]
172 runs-on: ubuntu-latest
174 - name: Archive event file
175 if: ${{ !cancelled() }}
176 uses: actions/upload-artifact@v3
179 path: ${{ github.event_path }}