-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #271 from lora-aprs/add-pio-remote-test-to-github-…
…action add pio test
- Loading branch information
Showing
2 changed files
with
55 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,16 +10,27 @@ jobs: | |
name: Compile Firmware | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/pip | ||
~/.platformio/.cache | ||
key: compile-cache | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install PlatformIO | ||
run: python -m pip install --upgrade pip platformio | ||
- name: Run PlatformIO CI | ||
run: platformio run | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --upgrade platformio | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Build PlatformIO Project | ||
run: pio run | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: firmware | ||
path: .pio/build/lora_board/firmware.bin | ||
|
@@ -40,7 +51,7 @@ jobs: | |
#- 'lib/TimeLib' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Run clang-format style check for C/C++ programs. | ||
uses: jidicula/[email protected] | ||
with: | ||
|
@@ -54,14 +65,45 @@ jobs: | |
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 | ||
uses: actions/checkout@v3 | ||
- 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 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Cppcheck Report | ||
path: output | ||
|
||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters