1name: CoreValidation 2on: 3 workflow_dispatch: 4 pull_request: 5 paths: 6 - .github/workflows/corevalidation.yml 7 - .github/workflows/corevalidation-report.yml 8 - CMSIS/Core/Include/**/* 9 - CMSIS/Core/Source/**/* 10 - CMSIS/CoreValidation/**/* 11 push: 12 branches: [main] 13 14concurrency: 15 group: ${{ github.workflow }}-${{ github.ref }} 16 cancel-in-progress: true 17 18jobs: 19 build-and-run: 20 21 strategy: 22 fail-fast: true 23 matrix: 24 compiler: [AC6, GCC, Clang] 25 26 runs-on: ubuntu-latest 27 28 env: 29 ARM_UBL_ACTIVATION_CODE: ${{ secrets.ARM_UBL_ACTIVATION_CODE }} 30 31 steps: 32 - run: | 33 sudo add-apt-repository ppa:deadsnakes/ppa 34 sudo apt-get install libpython3.9 35 36 - uses: actions/checkout@v4 37 38 - working-directory: /home/runner 39 env: 40 GH_TOKEN: ${{ github.token }} 41 run: | 42 if [ -d Cortex_DFP ]; then 43 cd Cortex_DFP 44 git fetch origin main 45 git checkout -f origin/main 46 else 47 gh repo clone ARM-software/Cortex_DFP 48 fi 49 50 - uses: actions/setup-python@v5 51 with: 52 python-version: '3.10' 53 cache: 'pip' 54 55 - name: Python requirements 56 run: | 57 pip install -r ./CMSIS/CoreValidation/Project/requirements.txt 58 59 - name: Install LLVM/Clang dependencies 60 if: matrix.compiler == 'Clang' 61 working-directory: /home/runner 62 run: | 63 sudo apt-get update 64 sudo apt-get install libtinfo5 65 66 - name: Activate vcpkg environment 67 uses: ARM-software/cmsis-actions/vcpkg@v1 68 with: 69 config: ./CMSIS/CoreValidation/Project/vcpkg-configuration.json 70 71 - name: Activate Arm tool license 72 uses: ARM-software/cmsis-actions/armlm@v1 73 with: 74 code: "${{ env.ARM_UBL_ACTIVATION_CODE }}" 75 76 - name: Initialize CodeQL 77 if: matrix.compiler == 'GCC' 78 uses: github/codeql-action/init@v3 79 with: 80 languages: cpp 81 queries: security-and-quality 82 83 - uses: ammaraskar/gcc-problem-matcher@master 84 if: matrix.compiler == 'Clang' || matrix.compiler == 'GCC' 85 86 - name: Build 87 working-directory: ./CMSIS/CoreValidation/Project 88 run: | 89 echo "Register local Cortex_DFP pack" 90 cpackget add /home/runner/Cortex_DFP/ARM.Cortex_DFP.pdsc 91 92 echo "Build test projects ..." 93 ./build.py --verbose -c ${{ matrix.compiler }} build || echo "::warning::=== Some configurations failed to build! ===" 94 95 - name: Perform CodeQL Analysis 96 if: ${{ !cancelled() && matrix.compiler == 'GCC' }} 97 uses: github/codeql-action/analyze@v3 98 99 - name: Execute 100 working-directory: ./CMSIS/CoreValidation/Project 101 run: | 102 echo "Run test projects ..." 103 ./build.py --verbose -c ${{ matrix.compiler }} -d "CM*" run || echo "::warning::==== Some configurations failed to run! ===" 104 105 - name: Archive Test Reports 106 if: ${{ !cancelled() }} 107 uses: actions/upload-artifact@v4 108 with: 109 name: test-results-${{ matrix.compiler }} 110 path: ./CMSIS/CoreValidation/Project/build/*.junit 111 112 event-file: 113 needs: [build-and-run] 114 runs-on: ubuntu-latest 115 steps: 116 - name: Archive event file 117 if: ${{ !cancelled() }} 118 uses: actions/upload-artifact@v4 119 with: 120 name: EventFile 121 path: ${{ github.event_path }} 122