Skip to content

cppcheck fix

cppcheck fix #17

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: tinyproto CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, cpp_api ]
pull_request:
branches: [ master, cpp_api ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Install apt dependencies
run: |
sudo apt update
sudo apt install -y gcc g++ clang clang-format libsdl2-dev lcov
sudo apt install -y cppcheck cpputest doxygen avr-libc gcc-avr graphviz socat
sudo pip3 install cpp-coveralls
pip3 install --user cpp-coveralls
# Runs a set of commands using the runners shell
- name: Building documentation
run: |
make docs 1> /dev/null
#
- name: Building via gcc and running unit tests
run: |
make
./.travis/run_tests.sh
make clean
make ARCH=linux EXTRA_CPPFLAGS="--coverage" coverage
- name: Upload coverage statistics
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
#run: |
# sudo find / -name coveralls
# echo -e "service_name: circle-ci\n" > .coveralls.yml \
# && TRAVIS_JOB_ID="#${GITHUB_RUN_NUMBER}" COVERALLS_REPO_TOKEN=4Ia7t9YDo22zQcFEnMYLh1tiWCRlBJlhk coveralls -b . \
# --exclude docs --exclude extra --exclude unittest --exclude bld --exclude tools --exclude examples --gcov-options '\-lp'
- name: Building via clang
run: |
make clean
CC=clang CXX=clang++ LD=clang++ make
make install DESTDIR=test_path
./.travis/check_install.sh . test_path
make cppcheck tiny_loopback
- name: Building for AVR
run: |
make clean
make ARCH=avr
- name: Cache ESP32 build system modules
uses: actions/cache@v2
env:
cache-name: cache-esp32-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/esp
~/.espressif
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install ESP32 SDK
run: |
./.travis/setup_esp_build_env.sh travis
- name: Building ESP32 code
run: |
. ~/esp/esp-idf/export.sh
cd examples/esp32_idf/uart/tinyfd_loopback/components/tinyproto && ln -s ../../../../../../src && ln -s ../../../../../../component.mk
cd ../.. && make defconfig
make