Update codeql.yml #16
This file contains 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 | |
- develop | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: | |
- develop | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: Log level | |
required: true | |
default: warning | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
jobs: | |
build-component: | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
idf_ver: [release-v5.1, latest] | |
idf_target: [esp32, esp32s2, esp32c3, esp32s3] | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
container: espressif/idf:${{ matrix.idf_ver }} | |
steps: | |
# Update git to latest version | |
- name: Update git | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
apt update | |
apt install -y software-properties-common g++ | |
add-apt-repository -y ppa:git-core/ppa | |
apt update | |
apt install -y git | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: c-cpp | |
# ℹ️ Command-line programs to run using the OS shell. | |
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | |
- name: Build for ESP32 | |
env: | |
PLATFORM: linux64 | |
IDF_TARGET: ${{ matrix.idf_target }} | |
shell: bash | |
run: | | |
. ${IDF_PATH}/export.sh | |
cd max32664-hub/examples/basic | |
idf.py build | |
# Performs a CodeQL analysis. | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:c-cpp" |