Skip to content

Commit

Permalink
Merge pull request #271 from lora-aprs/add-pio-remote-test-to-github-…
Browse files Browse the repository at this point in the history
…action

add pio test
  • Loading branch information
peterus authored Feb 19, 2023
2 parents 1deab35 + d51ead1 commit 5c55905
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 13 deletions.
64 changes: 53 additions & 11 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -23,7 +23,7 @@ jobs:
name: Create new release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: sudo apt-get install python3-setuptools python3-wheel
- run: pip3 install platformio
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
Expand Down

0 comments on commit 5c55905

Please sign in to comment.