kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
94 wiersze
2.8 KiB
YAML
94 wiersze
2.8 KiB
YAML
name: Integration Tests
|
|
|
|
on:
|
|
merge_group:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
- '!master'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Compile Firmware
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cache/pip
|
|
~/.platformio/.cache
|
|
key: ${{ runner.os }}-pio
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Install PlatformIO Core
|
|
run: pip install --upgrade platformio
|
|
- name: Build PlatformIO Project
|
|
run: pio run
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: firmware
|
|
path: .pio/build/lora_board/firmware.bin
|
|
|
|
formatting-check:
|
|
name: Formatting Check
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
path:
|
|
- 'src'
|
|
- 'lib/BoardFinder'
|
|
- 'lib/ConfigurationManagement'
|
|
#- 'lib/Display'
|
|
#- 'lib/NTPClient'
|
|
- 'lib/PowerManagement'
|
|
- 'lib/System'
|
|
#- 'lib/TimeLib'
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Run clang-format style check for C/C++ programs.
|
|
uses: jidicula/clang-format-action@v4.10.2
|
|
with:
|
|
clang-format-version: '14'
|
|
check-path: ${{ matrix.path }}
|
|
|
|
cppcheck:
|
|
name: Run cppcheck
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
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
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v2
|
|
- run: docker pull facthunder/cppcheck:latest
|
|
- 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"
|
|
- name: Upload report
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: Cppcheck Report
|
|
path: output
|
|
|
|
remote_testing:
|
|
name: Remote Testing
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- name: PlatformIO Test
|
|
uses: karniv00l/platformio-remote-test-action@v1
|
|
with:
|
|
force-remote: true
|
|
verbose: true
|