10 - 'CMSIS/CoreValidation/**'
15 - '.github/workflows/codeql-analysis.yml'
18 - 'CMSIS/CoreValidation/**'
23 runs-on: ubuntu-latest
27 security-events: write
29 CMSIS_PACK_ROOT: /tmp/.packs-${{ github.run_id }}
32 - name: Checkout repository
33 uses: actions/checkout@v3
35 - name: Install build dependencies
37 sudo apt install gcc-arm-none-eabi ninja-build cmake
39 - name: Cache pack folder
41 uses: actions/cache@v3
43 key: packs-${{ github.run_id }}
46 path: /tmp/.packs-${{ github.run_id }}
48 - name: Install CMSIS-Toolbox
50 wget https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases/download/1.5.0/cmsis-toolbox.sh
51 chmod +x cmsis-toolbox.sh
52 sudo ./cmsis-toolbox.sh <<EOI
57 $(dirname $(which arm-none-eabi-gcc 2>/dev/null))
60 echo "/opt/ctools/bin" >> $GITHUB_PATH
61 echo "cpackget : $(which cpackget)"
62 echo "csolution: $(which csolution)"
63 echo "cbuild : $(which cbuild)"
65 - name: Initialize packs folder
66 if: steps.cache-packs.outputs.cache-hit != 'true'
67 run: cpackget init https://www.keil.com/pack/index.pidx
69 - name: Update pack index
70 if: steps.cache-packs.outputs.cache-hit == 'true'
71 run: cpackget update-index
73 - name: Install build.py requirements
74 run: pip install -r requirements.txt
75 working-directory: CMSIS/CoreValidation/Project
77 # Initializes the CodeQL tools for scanning.
78 - name: Initialize CodeQL
79 uses: github/codeql-action/init@v2
82 queries: security-and-quality
84 - name: Build projects
85 working-directory: CMSIS/CoreValidation/Project
87 pip install -r requirements.txt
88 cpackget add -a -f cpacklist.txt
89 python build.py --verbose -c GCC -d "CM[047]*" -d "CM[23]3*" -o low build || echo "Something failed!"
91 - name: Perform CodeQL Analysis
92 uses: github/codeql-action/analyze@v2