2021-03-12 23:19:33 +00:00
|
|
|
name: push pull checks
|
2020-06-14 21:34:13 +00:00
|
|
|
|
2021-02-12 22:45:51 +00:00
|
|
|
on: [push, pull_request]
|
2020-06-14 21:34:13 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-04-09 21:09:49 +00:00
|
|
|
#check:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v2
|
|
|
|
# - name: Cache pip
|
|
|
|
# uses: actions/cache@v2
|
|
|
|
# with:
|
|
|
|
# path: ~/.cache/pip
|
|
|
|
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
# restore-keys: ${{ runner.os }}-pip-
|
|
|
|
# - name: Cache PlatformIO
|
|
|
|
# uses: actions/cache@v2
|
|
|
|
# with:
|
|
|
|
# path: ~/.platformio
|
|
|
|
# key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
|
|
# - name: Set up Python
|
|
|
|
# uses: actions/setup-python@v2
|
|
|
|
# - name: Install PlatformIO
|
|
|
|
# run: |
|
|
|
|
# python -m pip install --upgrade pip
|
|
|
|
# pip install --upgrade platformio
|
|
|
|
# - name: Run PlatformIO Check
|
|
|
|
# run: platformio check --fail-on-defect low --fail-on-defect medium --fail-on-defect high
|
2020-08-01 08:49:56 +00:00
|
|
|
|
2021-03-12 23:19:33 +00:00
|
|
|
build:
|
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: Cache pip
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
|
|
restore-keys: ${{ runner.os }}-pip-
|
|
|
|
- name: Cache PlatformIO
|
|
|
|
uses: actions/cache@v2
|
2020-12-06 22:11:54 +00:00
|
|
|
with:
|
2021-02-12 22:45:51 +00:00
|
|
|
path: ~/.platformio
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
- name: Install PlatformIO
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install --upgrade platformio
|
|
|
|
- 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.
|
|
|
|
uses: jidicula/clang-format-action@v3.2.0
|
|
|
|
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:
|
|
|
|
name: Run Cppcheck
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- run: docker pull facthunder/cppcheck:latest
|
|
|
|
- name: Run Cppcheck
|
|
|
|
run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest cppcheck -v --xml --enable=all . 2> report.xml
|
|
|
|
- name: Generate HTML report
|
|
|
|
run: docker run --rm -v ${PWD}:/src facthunder/cppcheck:latest cppcheck-htmlreport --file=report.xml --report-dir=output
|
|
|
|
- name: Upload report
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: Cppcheck Report
|
|
|
|
path: output
|