ci.yml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. name: Continuous Integration
  2. on: [push, pull_request]
  3. jobs:
  4. lint:
  5. name: Lint
  6. runs-on: ubuntu-22.04
  7. steps:
  8. - name: Install
  9. run: sudo apt-get install -y clang-format
  10. - name: Checkout
  11. uses: actions/checkout@v3
  12. - name: Symlinks
  13. run: find * -type l -printf "::error::%p is a symlink. This is forbidden by the Arduino Library Specification." -exec false {} +
  14. - name: Clang-format
  15. run: |
  16. find src/ extras/ -name '*.[ch]pp' | xargs clang-format -i --verbose --style=file
  17. git diff --exit-code
  18. - name: Check URLs
  19. run: |
  20. grep -hREo "(http|https)://[a-zA-Z0-9./?=_%:-]*" src/ | sort -u | while read -r URL
  21. do
  22. STATUS=$(curl -s -o /dev/null -I -w "%{http_code}" "$URL")
  23. [ "$STATUS" -ge 400 ] && echo "::warning title=HTTP $STATUS::$URL returned $STATUS"
  24. done || true
  25. gcc:
  26. name: GCC
  27. needs: lint
  28. runs-on: ubuntu-22.04
  29. strategy:
  30. fail-fast: false
  31. matrix:
  32. include:
  33. - gcc: "5"
  34. - gcc: "6"
  35. - gcc: "7"
  36. cxxflags: -fsanitize=leak -fno-sanitize-recover=all
  37. - gcc: "8"
  38. cxxflags: -fsanitize=undefined -fno-sanitize-recover=all
  39. - gcc: "9"
  40. cxxflags: -fsanitize=address -fno-sanitize-recover=all
  41. - gcc: "10"
  42. cxxflags: -funsigned-char # Issue #1715
  43. - gcc: "11"
  44. steps:
  45. - name: Install
  46. run: |
  47. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 3B4FE6ACC0B21F32
  48. sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main universe'
  49. sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ focal main universe'
  50. sudo apt-get update
  51. sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
  52. - name: Checkout
  53. uses: actions/checkout@v3
  54. - name: Configure
  55. run: cmake -DCMAKE_BUILD_TYPE=Debug .
  56. env:
  57. CC: gcc-${{ matrix.gcc }}
  58. CXX: g++-${{ matrix.gcc }}
  59. CXXFLAGS: ${{ matrix.cxxflags }}
  60. - name: Build
  61. run: cmake --build .
  62. - name: Test
  63. run: |
  64. echo "## CTest output" >> $GITHUB_STEP_SUMMARY
  65. echo '```' >> $GITHUB_STEP_SUMMARY
  66. ctest --output-on-failure -C Debug . | tee -a $GITHUB_STEP_SUMMARY
  67. echo '```' >> $GITHUB_STEP_SUMMARY
  68. env:
  69. UBSAN_OPTIONS: print_stacktrace=1
  70. clang:
  71. name: Clang
  72. needs: lint
  73. runs-on: ubuntu-20.04
  74. strategy:
  75. fail-fast: false
  76. matrix:
  77. include:
  78. - clang: "3.8"
  79. cxxflags: "-stdlib=libc++"
  80. - clang: "3.9"
  81. cxxflags: "-stdlib=libc++"
  82. - clang: "4.0"
  83. cxxflags: "-stdlib=libc++"
  84. - clang: "5.0"
  85. - clang: "6.0"
  86. - clang: "7"
  87. - clang: "8"
  88. cxxflags: -fsanitize=leak -fno-sanitize-recover=all
  89. - clang: "9"
  90. cxxflags: -fsanitize=undefined -fno-sanitize-recover=all
  91. - clang: "10"
  92. cxxflags: -fsanitize=address -fno-sanitize-recover=all
  93. steps:
  94. - name: Install
  95. run: |
  96. sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
  97. sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
  98. sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
  99. sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
  100. sudo apt-get update
  101. sudo apt-get install -y clang-${{ matrix.clang }}
  102. - name: Checkout
  103. uses: actions/checkout@v3
  104. - name: Configure
  105. run: cmake -DCMAKE_BUILD_TYPE=Debug .
  106. env:
  107. CC: clang-${{ matrix.clang }}
  108. CXX: clang++-${{ matrix.clang }}
  109. CXXFLAGS: >-
  110. ${{ matrix.cxxflags }}
  111. ${{ contains(matrix.cxxflags, 'libc++') && '-I/usr/lib/llvm-10/include/c++/v1/' || '' }}
  112. - name: Build
  113. run: cmake --build .
  114. - name: Test
  115. run: |
  116. echo "## CTest output" >> $GITHUB_STEP_SUMMARY
  117. echo '```' >> $GITHUB_STEP_SUMMARY
  118. ctest --output-on-failure -C Debug . | tee -a $GITHUB_STEP_SUMMARY
  119. echo '```' >> $GITHUB_STEP_SUMMARY
  120. env:
  121. UBSAN_OPTIONS: print_stacktrace=1
  122. conf_test:
  123. name: Test configuration on Linux
  124. needs: [gcc, clang]
  125. runs-on: ubuntu-20.04
  126. steps:
  127. - name: Install
  128. run: |
  129. sudo apt-get update
  130. sudo apt-get install -y g++-multilib gcc-avr avr-libc
  131. - name: Checkout
  132. uses: actions/checkout@v3
  133. - name: AVR
  134. run: avr-g++ -std=c++11 -Isrc extras/conf_test/avr.cpp
  135. - name: GCC 32-bit
  136. run: g++ -std=c++11 -m32 -Isrc extras/conf_test/x86.cpp
  137. - name: GCC 64-bit
  138. run: g++ -std=c++11 -m64 -Isrc extras/conf_test/x64.cpp
  139. - name: Clang 32-bit
  140. run: clang++ -std=c++11 -m32 -Isrc extras/conf_test/x86.cpp
  141. - name: Clang 64-bit
  142. run: clang++ -std=c++11 -m64 -Isrc extras/conf_test/x64.cpp
  143. conf_test_windows:
  144. name: Test configuration on Windows
  145. runs-on: windows-2019
  146. needs: [gcc, clang]
  147. steps:
  148. - name: Checkout
  149. uses: actions/checkout@v3
  150. - name: 32-bit
  151. run: |
  152. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
  153. cl /Isrc extras/conf_test/x86.cpp
  154. shell: cmd
  155. - name: 64-bit
  156. run: |
  157. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
  158. cl /Isrc extras/conf_test/x64.cpp
  159. shell: cmd
  160. xcode:
  161. name: XCode
  162. needs: clang
  163. runs-on: macos-11
  164. strategy:
  165. fail-fast: false
  166. matrix:
  167. include:
  168. - xcode: "11.7"
  169. - xcode: "12.4"
  170. - xcode: "13.2.1"
  171. steps:
  172. - name: Checkout
  173. uses: actions/checkout@v3
  174. - name: Select XCode version
  175. run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
  176. - name: Configure
  177. run: cmake -DCMAKE_BUILD_TYPE=Debug .
  178. - name: Build
  179. run: cmake --build .
  180. - name: Test
  181. run: ctest --output-on-failure -C Debug .
  182. # DISABLED: Running on AppVeyor instead because it supports older versions of the compiler
  183. # msvc:
  184. # name: Visual Studio
  185. # strategy:
  186. # fail-fast: false
  187. # matrix:
  188. # include:
  189. # - os: windows-2016
  190. # - os: windows-2019
  191. # runs-on: ${{ matrix.os }}
  192. # steps:
  193. # - name: Checkout
  194. # uses: actions/checkout@v3
  195. # - name: Configure
  196. # run: cmake -DCMAKE_BUILD_TYPE=Debug .
  197. # - name: Build
  198. # run: cmake --build .
  199. # - name: Test
  200. # run: ctest --output-on-failure -C Debug .
  201. arduino:
  202. name: Arduino
  203. needs: gcc
  204. strategy:
  205. fail-fast: false
  206. matrix:
  207. include:
  208. - core: arduino:avr
  209. board: arduino:avr:uno
  210. - core: arduino:samd
  211. board: arduino:samd:mkr1000
  212. runs-on: ubuntu-20.04
  213. steps:
  214. - name: Checkout
  215. uses: actions/checkout@v3
  216. - name: Install arduino-cli
  217. run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
  218. - name: Install core
  219. run: arduino-cli core install ${{ matrix.core }}
  220. - name: Install libraries
  221. run: arduino-cli lib install SD Ethernet
  222. - name: Build JsonConfigFile
  223. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonConfigFile/JsonConfigFile.ino"
  224. - name: Build JsonFilterExample
  225. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonFilterExample/JsonFilterExample.ino"
  226. - name: Build JsonGeneratorExample
  227. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonGeneratorExample/JsonGeneratorExample.ino"
  228. - name: Build JsonHttpClient
  229. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonHttpClient/JsonHttpClient.ino"
  230. - name: Build JsonParserExample
  231. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonParserExample/JsonParserExample.ino"
  232. - name: Build JsonServer
  233. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonServer/JsonServer.ino"
  234. - name: Build JsonUdpBeacon
  235. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/JsonUdpBeacon/JsonUdpBeacon.ino"
  236. - name: Build MsgPackParser
  237. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/MsgPackParser/MsgPackParser.ino"
  238. - name: Build ProgmemExample
  239. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/ProgmemExample/ProgmemExample.ino"
  240. - name: Build StringExample
  241. run: arduino-cli compile --library . --warnings all -b ${{ matrix.board }} "examples/StringExample/StringExample.ino"
  242. platformio:
  243. name: PlatformIO
  244. needs: gcc
  245. runs-on: ubuntu-latest
  246. strategy:
  247. fail-fast: false
  248. matrix:
  249. include:
  250. - platform: atmelavr
  251. board: leonardo
  252. libraries:
  253. - SD
  254. - Ethernet
  255. conf_test: avr
  256. - platform: espressif8266
  257. board: huzzah
  258. conf_test: esp8266
  259. - platform: espressif32
  260. board: esp32dev
  261. libraries:
  262. - Ethernet
  263. conf_test: esp8266
  264. - platform: atmelsam
  265. board: mkr1000USB
  266. libraries:
  267. - SD
  268. - Ethernet
  269. conf_test: esp8266
  270. - platform: teensy
  271. board: teensy31
  272. conf_test: esp8266
  273. - platform: ststm32
  274. board: adafruit_feather_f405
  275. libraries:
  276. - SD
  277. - Ethernet
  278. conf_test: esp8266
  279. - platform: nordicnrf52
  280. board: adafruit_feather_nrf52840
  281. libraries:
  282. - SD
  283. - Ethernet
  284. conf_test: esp8266
  285. steps:
  286. - name: Checkout
  287. uses: actions/checkout@v3
  288. - name: Set up cache for pip
  289. uses: actions/cache@v3
  290. with:
  291. path: ~/.cache/pip
  292. key: ${{ runner.os }}-pip
  293. - name: Set up Python 3.x
  294. uses: actions/setup-python@v4
  295. with:
  296. python-version: "3.x"
  297. - name: Install PlatformIO
  298. run: pip install platformio
  299. - name: Install adafruit-nrfutil
  300. if: ${{ matrix.platform == 'nordicnrf52' }}
  301. run: pip install adafruit-nrfutil
  302. - name: Include Adafruit_TinyUSB.h # https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/653
  303. if: ${{ matrix.platform == 'nordicnrf52' }}
  304. run: find examples/ -name '*.ino' -exec sed -i 's/\(#include <ArduinoJson.h>\)/\1\n#include <Adafruit_TinyUSB.h>/' {} +
  305. - name: Set up cache for platformio
  306. uses: actions/cache@v3
  307. with:
  308. path: ~/.platformio
  309. key: ${{ runner.os }}-platformio-${{ matrix.platform }}
  310. - name: Install platform "${{ matrix.platform }}"
  311. run: platformio platform install ${{ matrix.platform }}
  312. - name: Install libraries
  313. if: ${{ matrix.libraries }}
  314. run: platformio lib install arduino-libraries/${{ join(matrix.libraries, ' arduino-libraries/') }}
  315. - name: Test configuration
  316. run: platformio ci "extras/conf_test/${{ matrix.conf_test }}.cpp" -l '.' -b ${{ matrix.board }}
  317. if: ${{ matrix.conf_test }}
  318. - name: Build JsonConfigFile
  319. run: platformio ci "examples/JsonConfigFile/JsonConfigFile.ino" -l '.' -b ${{ matrix.board }}
  320. - name: Build JsonFilterExample
  321. run: platformio ci "examples/JsonFilterExample/JsonFilterExample.ino" -l '.' -b ${{ matrix.board }}
  322. - name: Build JsonGeneratorExample
  323. run: platformio ci "examples/JsonGeneratorExample/JsonGeneratorExample.ino" -l '.' -b ${{ matrix.board }}
  324. - name: Build JsonHttpClient
  325. run: platformio ci "examples/JsonHttpClient/JsonHttpClient.ino" -l '.' -b ${{ matrix.board }}
  326. - name: Build JsonParserExample
  327. run: platformio ci "examples/JsonParserExample/JsonParserExample.ino" -l '.' -b ${{ matrix.board }}
  328. - name: Build JsonServer
  329. if: ${{ matrix.platform != 'espressif32' }}
  330. run: platformio ci "examples/JsonServer/JsonServer.ino" -l '.' -b ${{ matrix.board }}
  331. - name: Build JsonUdpBeacon
  332. run: platformio ci "examples/JsonUdpBeacon/JsonUdpBeacon.ino" -l '.' -b ${{ matrix.board }}
  333. - name: Build MsgPackParser
  334. run: platformio ci "examples/MsgPackParser/MsgPackParser.ino" -l '.' -b ${{ matrix.board }}
  335. - name: Build ProgmemExample
  336. run: platformio ci "examples/ProgmemExample/ProgmemExample.ino" -l '.' -b ${{ matrix.board }}
  337. - name: Build StringExample
  338. run: platformio ci "examples/StringExample/StringExample.ino" -l '.' -b ${{ matrix.board }}
  339. - name: PlatformIO prune
  340. if: ${{ always() }}
  341. run: platformio system prune -f
  342. particle:
  343. name: Particle
  344. needs: gcc
  345. runs-on: ubuntu-latest
  346. if: github.event_name == 'push'
  347. strategy:
  348. fail-fast: false
  349. matrix:
  350. include:
  351. - board: argon
  352. steps:
  353. - name: Checkout
  354. uses: actions/checkout@v3
  355. - name: Install Particle CLI
  356. run: sudo npm install -g particle-cli
  357. - name: Login to Particle
  358. run: particle login -t "${{ secrets.PARTICLE_TOKEN }}"
  359. - name: Compile
  360. run: extras/ci/particle.sh ${{ matrix.board }}
  361. arm:
  362. name: GCC for ARM processor
  363. needs: gcc
  364. runs-on: ubuntu-20.04
  365. steps:
  366. - name: Install
  367. run: |
  368. sudo apt-get update
  369. sudo apt-get install -y g++-arm-linux-gnueabihf
  370. - name: Checkout
  371. uses: actions/checkout@v3
  372. - name: Configure
  373. run: cmake .
  374. env:
  375. CC: arm-linux-gnueabihf-gcc
  376. CXX: arm-linux-gnueabihf-g++
  377. - name: Build
  378. run: cmake --build .
  379. coverage:
  380. needs: gcc
  381. name: Coverage
  382. runs-on: ubuntu-20.04
  383. steps:
  384. - name: Install
  385. run: sudo apt-get install -y lcov ninja-build
  386. - name: Checkout
  387. uses: actions/checkout@v3
  388. - name: Configure
  389. run: cmake -G Ninja -DCOVERAGE=true .
  390. - name: Build
  391. run: ninja
  392. - name: Test
  393. run: ctest -LE 'WillFail|Fuzzing' -T test
  394. - name: lcov --capture
  395. run: lcov --capture --no-external --directory . --output-file coverage.info
  396. - name: lcov --remove
  397. run: lcov --remove coverage.info "$(pwd)/extras/*" --output-file coverage_filtered.info
  398. - name: genhtml
  399. run: mkdir coverage && genhtml coverage_filtered.info -o coverage -t ArduinoJson
  400. - name: Upload HTML report
  401. uses: actions/upload-artifact@v3
  402. with:
  403. name: Coverage report
  404. path: coverage
  405. - name: Upload to Coveralls
  406. uses: coverallsapp/github-action@master
  407. with:
  408. github-token: ${{ secrets.GITHUB_TOKEN }}
  409. path-to-lcov: coverage_filtered.info
  410. valgrind:
  411. needs: gcc
  412. name: Valgrind
  413. runs-on: ubuntu-20.04
  414. steps:
  415. - name: Install
  416. run: |
  417. sudo apt-get update
  418. sudo apt-get install -y valgrind ninja-build
  419. - name: Checkout
  420. uses: actions/checkout@v3
  421. - name: Configure
  422. run: cmake -G Ninja -D MEMORYCHECK_COMMAND_OPTIONS="--error-exitcode=1 --leak-check=full" .
  423. - name: Build
  424. run: ninja
  425. - name: Memcheck
  426. run: ctest -LE WillFail -T memcheck
  427. id: memcheck
  428. - name: MemoryChecker.*.log
  429. run: cat Testing/Temporary/MemoryChecker.*.log
  430. if: failure()
  431. clang-tidy:
  432. needs: clang
  433. name: Clang-Tidy
  434. runs-on: ubuntu-20.04
  435. steps:
  436. - name: Install
  437. run: sudo apt-get install -y clang-tidy cmake ninja-build
  438. - name: Checkout
  439. uses: actions/checkout@v3
  440. - name: Configure
  441. run: cmake -G Ninja -DCMAKE_CXX_CLANG_TIDY="clang-tidy-10;--warnings-as-errors=*" -DCMAKE_BUILD_TYPE=Debug .
  442. env:
  443. CC: clang-10
  444. CXX: clang++-10
  445. - name: Check
  446. run: cmake --build . -- -k 0
  447. amalgamate-h:
  448. needs: gcc
  449. name: Amalgamate ArduinoJson.h
  450. runs-on: ubuntu-20.04
  451. steps:
  452. - name: Checkout
  453. uses: actions/checkout@v3
  454. - name: Amalgamate
  455. id: amalgamate
  456. run: |
  457. if [[ $GITHUB_REF == refs/tags/* ]]; then
  458. VERSION=${GITHUB_REF#refs/tags/}
  459. else
  460. VERSION=${GITHUB_SHA::7}
  461. fi
  462. INPUT=src/ArduinoJson.h
  463. OUTPUT=ArduinoJson-$VERSION.h
  464. extras/scripts/build-single-header.sh "$INPUT" "$OUTPUT"
  465. echo "filename=${OUTPUT}" >> $GITHUB_OUTPUT
  466. - name: Smoke test
  467. run: |
  468. g++ -x c++ - <<END
  469. #include "${{ steps.amalgamate.outputs.filename }}"
  470. int main() {
  471. StaticJsonDocument<300> doc;
  472. deserializeJson(doc, "{}");
  473. }
  474. END
  475. - name: Upload artifact
  476. uses: actions/upload-artifact@v3
  477. with:
  478. name: Single headers
  479. path: ${{ steps.amalgamate.outputs.filename }}
  480. amalgamate-hpp:
  481. needs: gcc
  482. name: Amalgamate ArduinoJson.hpp
  483. runs-on: ubuntu-20.04
  484. steps:
  485. - name: Checkout
  486. uses: actions/checkout@v3
  487. - name: Amalgamate
  488. id: amalgamate
  489. run: |
  490. if [[ $GITHUB_REF == refs/tags/* ]]; then
  491. VERSION=${GITHUB_REF#refs/tags/}
  492. else
  493. VERSION=${GITHUB_SHA::7}
  494. fi
  495. INPUT=src/ArduinoJson.hpp
  496. OUTPUT=ArduinoJson-$VERSION.hpp
  497. extras/scripts/build-single-header.sh "$INPUT" "$OUTPUT"
  498. echo "filename=${OUTPUT}" >> $GITHUB_OUTPUT
  499. - name: Smoke test
  500. run: |
  501. g++ -x c++ - <<END
  502. #include "${{ steps.amalgamate.outputs.filename }}"
  503. int main() {
  504. ArduinoJson::StaticJsonDocument<300> doc;
  505. deserializeJson(doc, "{}");
  506. }
  507. END
  508. - name: Upload artifact
  509. uses: actions/upload-artifact@v3
  510. with:
  511. name: Single headers
  512. path: ${{ steps.amalgamate.outputs.filename }}
  513. esp-idf:
  514. needs: gcc
  515. name: ESP-IDF
  516. runs-on: ubuntu-latest
  517. steps:
  518. - name: Setup cache
  519. uses: actions/cache@v3
  520. with:
  521. path: ~/.espressif
  522. key: ${{ runner.os }}-esp-idf
  523. - name: Checkout ArduinoJson
  524. uses: actions/checkout@v3
  525. - name: Checkout ESP-IDF
  526. uses: actions/checkout@v3
  527. with:
  528. repository: espressif/esp-idf
  529. path: esp-idf
  530. submodules: true
  531. - name: Install ESP-IDF
  532. run: ./esp-idf/install.sh
  533. - name: Add component
  534. # NOTE: we cannot commit the symlink because the Arduino Library Specification forbids it.
  535. run: |
  536. mkdir -p extras/ci/espidf/components
  537. ln -s $PWD extras/ci/espidf/components/ArduinoJson
  538. - name: Build example
  539. run: |
  540. source esp-idf/export.sh
  541. cd extras/ci/espidf
  542. idf.py build
  543. codeql:
  544. name: CodeQL
  545. runs-on: ubuntu-20.04
  546. needs: gcc
  547. permissions:
  548. actions: read
  549. contents: read
  550. security-events: write
  551. steps:
  552. - name: Checkout repository
  553. uses: actions/checkout@v3
  554. - name: Initialize CodeQL
  555. uses: github/codeql-action/init@v2
  556. with:
  557. languages: cpp
  558. - name: Build
  559. run: |
  560. cmake -DCMAKE_BUILD_TYPE=Debug .
  561. cmake --build .
  562. - name: Perform CodeQL Analysis
  563. uses: github/codeql-action/analyze@v2
  564. with:
  565. category: "/language:cpp"