CodeQL #135
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CodeQL | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: '0 6 * * 1' # Weekly on Monday at 6am UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| jobs: | |
| analyze: | |
| name: Analyze (${{ matrix.language }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - language: actions | |
| build-mode: none | |
| - language: c-cpp | |
| build-mode: manual | |
| container: | |
| image: ${{ matrix.language == 'c-cpp' && 'espressif/idf:v5.5.2' || '' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4 | |
| with: | |
| languages: ${{ matrix.language }} | |
| build-mode: ${{ matrix.build-mode }} | |
| - name: Build for CodeQL (C/C++ only) | |
| if: matrix.build-mode == 'manual' | |
| run: | | |
| . $IDF_PATH/export.sh | |
| # Build multiple targets to analyze all platform-specific code | |
| # esp32s3: gdma_dma.cpp, esp32: i2s_dma.cpp, esp32p4: parlio_dma.cpp | |
| for target in esp32 esp32s3 esp32c6 esp32p4; do | |
| idf.py -B build_$target set-target $target | |
| idf.py -B build_$target build | |
| done | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4 | |
| with: | |
| category: /language:${{ matrix.language }} |