LoRa_APRS_iGate/.github/workflows/build_check.yml

85 wiersze
2.6 KiB
YAML
Czysty Zwykły widok Historia

2021-05-17 08:04:05 +00:00
name: Integreation Tests
2020-06-14 21:34:13 +00:00
2022-03-26 22:26:42 +00:00
on:
push:
branches:
- '*'
- '!master'
2020-06-14 21:34:13 +00:00
jobs:
2022-02-17 20:59:35 +00:00
version_check:
name: Version Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
2022-03-27 00:24:28 +00:00
with:
fetch-depth: 0
2022-02-17 20:59:35 +00:00
- name: Set up Python
uses: actions/setup-python@v2
2022-03-27 00:14:22 +00:00
- run: pip install GitPython
2022-02-17 20:59:35 +00:00
- name: check version
run: ./scripts/check_version.py
2021-03-12 23:19:33 +00:00
build:
2021-05-17 08:04:05 +00:00
name: Compile Firmware
2020-08-01 08:49:56 +00:00
runs-on: ubuntu-latest
steps:
2021-05-15 20:19:17 +00:00
- name: Checkout code
uses: actions/checkout@v2
2021-02-12 22:45:51 +00:00
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
2021-05-17 08:02:36 +00:00
run: python -m pip install --upgrade pip platformio
2021-02-12 22:45:51 +00:00
- name: Run PlatformIO CI
run: platformio run
2021-05-15 20:19:17 +00:00
- name: Upload artifacts
uses: actions/upload-artifact@v2
2020-08-01 08:49:56 +00:00
with:
name: firmware
2020-12-17 21:32:01 +00:00
path: .pio/build/lora_board/firmware.bin
2021-03-13 23:18:11 +00:00
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
2021-03-13 23:51:32 +00:00
strategy:
matrix:
path:
- 'src'
- 'lib/BoardFinder'
- 'lib/ConfigurationManagement'
2021-03-13 23:54:57 +00:00
#- 'lib/Display'
#- 'lib/LoRa'
2021-03-13 23:51:32 +00:00
- 'lib/LoRa_APRS'
2021-03-13 23:54:57 +00:00
#- 'lib/NTPClient'
2021-03-13 23:51:32 +00:00
- 'lib/PowerManagement'
2021-03-27 22:34:57 +00:00
- 'lib/System'
2021-03-13 23:54:57 +00:00
#- 'lib/TimeLib'
2021-03-13 23:18:11 +00:00
steps:
2021-05-15 20:19:17 +00:00
- name: Checkout code
uses: actions/checkout@v2
2021-03-13 23:18:11 +00:00
- name: Run clang-format style check for C/C++ programs.
2022-02-17 21:04:14 +00:00
uses: jidicula/clang-format-action@v4.5.0
2021-03-13 23:18:11 +00:00
with:
clang-format-version: '11'
2021-03-13 23:51:32 +00:00
check-path: ${{ matrix.path }}
2021-03-13 23:18:11 +00:00
2021-05-15 20:19:17 +00:00
cppcheck:
2021-05-17 08:28:27 +00:00
name: Run cppcheck
2021-05-15 20:19:17 +00:00
runs-on: ubuntu-latest
2021-05-17 08:28:27 +00:00
env:
2021-05-18 22:27:27 +00:00
CPPCHECK_ARGS: --enable=all --std=c++14 --inline-suppr -I lib/BoardFinder -I lib/ConfigurationManagement -I lib/Display -I lib/LoRa -I lib/LoRa_APRS -I lib/NTPClient -I lib/PowerManagement -I lib/System -I lib/TimeLib -i lib/Display -i lib/LoRa -i lib/NTPClient -i lib/TimeLib src lib
2021-05-15 20:19:17 +00:00
steps:
- name: checkout code
uses: actions/checkout@v2
- run: docker pull facthunder/cppcheck:latest
2021-05-17 08:28:27 +00:00
- name: Run cppcheck and print result
run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck $CPPCHECK_ARGS"
- name: Run cppcheck and create html
run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest /bin/bash -c "cppcheck --xml $CPPCHECK_ARGS 2> report.xml && cppcheck-htmlreport --file=report.xml --report-dir=output"
2021-05-15 20:19:17 +00:00
- name: Upload report
uses: actions/upload-artifact@v1
with:
name: Cppcheck Report
path: output