Fwd port changes from v1.3 #861
Workflow file for this run
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
# | |
# This file is part of Astarte. | |
# | |
# Copyright 2018-2023 SECO Mind Srl | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0 | |
# | |
name: Static analysis of the C sources. | |
on: | |
pull_request: | |
push: | |
jobs: | |
clang-format-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install run-clang-format | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang-format | |
curl -sSfL https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py -o run-clang-format | |
chmod +x run-clang-format | |
- name: Check formatting library | |
run: | | |
./run-clang-format --style=file src/*.c include/*.h private/*.h | |
- name: Check formatting examples | |
run: | | |
./run-clang-format --style=file examples/**/main/*.c examples/**/main/src/*.c examples/**/main/include/*.h | |
- name: Check formatting unit tests | |
run: | | |
./run-clang-format --style=file tests/host/*.c tests/host/*.h | |
./run-clang-format --style=file tests/common/*.h tests/common/*.c | |
./run-clang-format --style=file tests/target/*.c tests/target/*.h | |
./run-clang-format --style=file tests/host_app/main/*.c tests/target_app/main/*.c | |
clang-tidy-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
example: | |
- "aggregates" | |
- "datastreams" | |
- "encryption" | |
- "non_volatile_storage" | |
- "properties" | |
- "registration" | |
- "toggle_led" | |
container: espressif/idf:release-v5.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
. $IDF_PATH/export.sh | |
python3 -m pip install -r python_scripts/requirements.txt | |
python3 python_scripts/setup_clang_tidy.py -p ./examples/${{ matrix.example }} -v | |
- name: Run and parse the results | |
run: | | |
. $IDF_PATH/export.sh | |
python3 python_scripts/run_clang_tidy.py -p ./examples/${{ matrix.example }} -r |