2022-11-16 22:10:06 +00:00
|
|
|
name: Integration Tests
|
2020-06-14 21:34:13 +00:00
|
|
|
|
2022-03-26 22:26:42 +00:00
|
|
|
on:
|
2023-02-18 10:58:25 +00:00
|
|
|
merge_group:
|
2022-03-27 00:47:54 +00:00
|
|
|
pull_request:
|
2020-06-14 21:34:13 +00:00
|
|
|
|
|
|
|
jobs:
|
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:
|
2023-02-18 11:20:44 +00:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pip
|
|
|
|
~/.platformio/.cache
|
2023-02-19 11:59:32 +00:00
|
|
|
key: compile-cache
|
2023-02-18 11:20:44 +00:00
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
2023-02-19 11:59:32 +00:00
|
|
|
python-version: '3.10'
|
|
|
|
- name: Install PlatformIO
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install --upgrade platformio
|
2023-02-19 12:13:18 +00:00
|
|
|
|
2023-02-19 11:59:32 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2023-02-18 11:20:44 +00:00
|
|
|
- name: Build PlatformIO Project
|
|
|
|
run: pio run
|
2021-05-15 20:19:17 +00:00
|
|
|
- name: Upload artifacts
|
2023-02-19 11:43:07 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
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/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
|
2023-02-19 09:58:26 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-03-13 23:18:11 +00:00
|
|
|
- name: Run clang-format style check for C/C++ programs.
|
2023-02-10 21:06:53 +00:00
|
|
|
uses: jidicula/clang-format-action@v4.10.2
|
2021-03-13 23:18:11 +00:00
|
|
|
with:
|
2023-02-10 21:06:53 +00:00
|
|
|
clang-format-version: '14'
|
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
|
2023-02-19 09:58:26 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-05-15 20:19:17 +00:00
|
|
|
- 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
|
2023-02-19 11:43:07 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-05-15 20:19:17 +00:00
|
|
|
with:
|
|
|
|
name: Cppcheck Report
|
|
|
|
path: output
|
2023-02-18 11:20:44 +00:00
|
|
|
|
2023-02-19 12:13:18 +00:00
|
|
|
|
2023-04-28 15:11:54 +00:00
|
|
|
#remote_testing:
|
|
|
|
# name: Remote Testing
|
|
|
|
# runs-on: ubuntu-20.04
|
|
|
|
# env:
|
|
|
|
# PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
|
|
|
|
# steps:
|
|
|
|
# - name: Setup Cache
|
|
|
|
# uses: actions/cache@v3
|
|
|
|
# with:
|
|
|
|
# path: |
|
|
|
|
# ~/.cache/pip
|
|
|
|
# ~/.platformio
|
|
|
|
# key: remote-cache
|
|
|
|
# - name: Setup Python
|
|
|
|
# uses: actions/setup-python@v4
|
|
|
|
# with:
|
|
|
|
# python-version: '3.10'
|
|
|
|
# - name: Install PlatformIO
|
|
|
|
# shell: bash
|
|
|
|
# run: |
|
|
|
|
# python -m pip install --upgrade pip
|
|
|
|
# pip install --upgrade platformio
|
|
|
|
#
|
|
|
|
# - name: Checkout code
|
|
|
|
# uses: actions/checkout@v3
|
|
|
|
# - name: List Devices
|
|
|
|
# run: pio remote device list
|
|
|
|
# - name: PlatformIO Test
|
|
|
|
# run: pio remote test -v -r --upload-port /dev/ttyUSB4 --test-port /dev/ttyUSB4
|
|
|
|
|
|
|
|
hw_testing:
|
|
|
|
name: Hardware Testing
|
|
|
|
runs-on: self-hosted
|
2023-02-18 11:20:44 +00:00
|
|
|
steps:
|
2023-04-28 18:45:45 +00:00
|
|
|
#- name: Install PlatformIO
|
|
|
|
# shell: bash
|
|
|
|
# run: |
|
|
|
|
# python -m pip install --upgrade pip
|
|
|
|
# pip install --upgrade platformio
|
2023-02-18 11:20:44 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2023-02-18 11:57:11 +00:00
|
|
|
- name: PlatformIO Test
|
2023-04-28 18:45:45 +00:00
|
|
|
run: |
|
2023-04-28 18:49:19 +00:00
|
|
|
PORTS=("/dev/ttyUSB0" "/dev/ttyUSB1" "/dev/ttyUSB2")
|
2023-04-28 18:45:45 +00:00
|
|
|
for port in "${PORTS[@]}"
|
|
|
|
do
|
|
|
|
pio test -vv --upload-port $port --test-port $port
|
|
|
|
done
|
2023-04-28 18:49:19 +00:00
|
|
|
|