From d9b2f8d550bff20515a3c60ad2741a1e93f97f60 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 12:20:44 +0100 Subject: [PATCH 01/17] add pio test --- .github/workflows/build_check.yml | 45 ++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 8e2f1ea..8b83945 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -16,13 +16,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - - name: Install PlatformIO - run: python -m pip install --upgrade pip platformio - - name: Run PlatformIO CI - run: platformio run + 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: @@ -70,3 +77,27 @@ jobs: 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 + - 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: list devices connected + run: pio remote device list + - name: run tests + run: pio remote test -v -r From 000d3f2be0de588b37244389ee2b702a835e53c4 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 12:34:37 +0100 Subject: [PATCH 02/17] update system first --- .github/workflows/build_check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 8b83945..01c0cf4 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -84,6 +84,8 @@ jobs: env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: + - name: update system + run: apt-get update && apt upgrade - name: Checkout code uses: actions/checkout@v3 - uses: actions/cache@v3 From 8b5637611189222dd07d1ac329246289466245cf Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 12:35:27 +0100 Subject: [PATCH 03/17] with sudo? --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 01c0cf4..fe6869c 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -85,7 +85,7 @@ jobs: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - name: update system - run: apt-get update && apt upgrade + run: sudo apt-get update && apt upgrade - name: Checkout code uses: actions/checkout@v3 - uses: actions/cache@v3 From fb023e61a96a10213c02859fda6254f71f58803c Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 12:36:15 +0100 Subject: [PATCH 04/17] ups --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index fe6869c..d445ef6 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -85,7 +85,7 @@ jobs: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - name: update system - run: sudo apt-get update && apt upgrade + run: sudo apt-get update && sudo apt-get upgrade - name: Checkout code uses: actions/checkout@v3 - uses: actions/cache@v3 From 968c36ae1611744b0afcf2adb986edcc2aea94a0 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 12:57:11 +0100 Subject: [PATCH 05/17] lets try this action --- .github/workflows/build_check.yml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index d445ef6..3bdb33e 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -84,22 +84,10 @@ jobs: env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - - name: update system - run: sudo apt-get update && sudo apt-get upgrade - name: Checkout code uses: actions/checkout@v3 - - uses: actions/cache@v3 + - name: PlatformIO Test + uses: karniv00l/platformio-remote-test-action@v1 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: list devices connected - run: pio remote device list - - name: run tests - run: pio remote test -v -r + force-remote: true + verbose: true From 3bc145f8577a2aa59188ed92d93bd0ea457d3197 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 13:22:03 +0100 Subject: [PATCH 06/17] lets try this --- .github/workflows/build_check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 3bdb33e..70ad4ae 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -84,6 +84,7 @@ jobs: env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: + run: sudo rm -rf /usr/local/lib/python*/dist-packages/OpenSSL - name: Checkout code uses: actions/checkout@v3 - name: PlatformIO Test From 296dba51608dfb4797b3d23993ca5f7f74884c13 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 20:41:07 +0100 Subject: [PATCH 07/17] fix --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 70ad4ae..56f2abe 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -84,7 +84,7 @@ jobs: env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - run: sudo rm -rf /usr/local/lib/python*/dist-packages/OpenSSL + - run: sudo rm -rf /usr/local/lib/python*/dist-packages/OpenSSL - name: Checkout code uses: actions/checkout@v3 - name: PlatformIO Test From 7f0a2eeaa410a78fbfc6dfb1f43f9fb8231a95db Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sat, 18 Feb 2023 20:47:10 +0100 Subject: [PATCH 08/17] fix --- .github/workflows/build_check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 56f2abe..68af503 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -85,6 +85,8 @@ jobs: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - run: sudo rm -rf /usr/local/lib/python*/dist-packages/OpenSSL + - name: Try and fix cryptography + run: sudo apt install -y libffi-dev python3-dev libssl-dev - name: Checkout code uses: actions/checkout@v3 - name: PlatformIO Test From 9e54024598c6867dee0d2b1778d43cc9d63f9709 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 10:48:06 +0100 Subject: [PATCH 09/17] lets try this --- .github/workflows/build_check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 68af503..03c48dd 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -80,11 +80,10 @@ jobs: remote_testing: name: Remote Testing - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - - run: sudo rm -rf /usr/local/lib/python*/dist-packages/OpenSSL - name: Try and fix cryptography run: sudo apt install -y libffi-dev python3-dev libssl-dev - name: Checkout code From 7318adc9e74769ec22cc5c0561d8f2fca9778dd5 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 10:57:18 +0100 Subject: [PATCH 10/17] add ports --- .github/workflows/build_check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 03c48dd..9ee2a9e 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -93,3 +93,5 @@ jobs: with: force-remote: true verbose: true + upload-port: "/dev/ttyUSB4" + test-port: "/dev/ttyUSB4" From d9ae41c2ab2be2d61da58fd2f2f6350b42d10a94 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 10:58:26 +0100 Subject: [PATCH 11/17] update checkout version --- .github/workflows/build_check.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 9ee2a9e..2866027 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -52,7 +52,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/clang-format-action@v4.10.2 with: @@ -66,7 +66,7 @@ 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" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71a9939..deb1956 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 From 480753f86cbb3775d5bea02afb26c56e85d454f2 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 11:13:31 +0100 Subject: [PATCH 12/17] lets try another port --- .github/workflows/build_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 2866027..4c9e291 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -93,5 +93,5 @@ jobs: with: force-remote: true verbose: true - upload-port: "/dev/ttyUSB4" - test-port: "/dev/ttyUSB4" + upload-port: "/dev/ttyUSB1" + test-port: "/dev/ttyUSB1" From 9aa0f8b3456ef0db394e2d55956de0d78ef2c990 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 11:21:17 +0100 Subject: [PATCH 13/17] lets try this --- .github/workflows/build_check.yml | 33 +++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 4c9e291..2e6ee37 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -84,14 +84,31 @@ jobs: env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - - name: Try and fix cryptography - run: sudo apt install -y libffi-dev python3-dev libssl-dev + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Cache PlatformIO + uses: actions/cache@v3 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Set up 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 - uses: karniv00l/platformio-remote-test-action@v1 - with: - force-remote: true - verbose: true - upload-port: "/dev/ttyUSB1" - test-port: "/dev/ttyUSB1" + run: pio remote test -v -r --upload-port /dev/ttyUSB4 --test-port /dev/ttyUSB4 From 34498200fb372a1ec8f84e7740a54374fb00f9ba Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 12:38:02 +0100 Subject: [PATCH 14/17] uppercase fix --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 2e6ee37..23b8582 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -108,7 +108,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: list devices + - 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 From eab5f3c2e6c47ab8a74bdd09b39234d8b09b658a Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 12:43:07 +0100 Subject: [PATCH 15/17] fix upload and caching --- .github/workflows/build_check.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 23b8582..8287185 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -31,7 +31,7 @@ jobs: - 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 @@ -73,7 +73,7 @@ jobs: - 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 @@ -88,14 +88,12 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + key: pip-cache - name: Cache PlatformIO uses: actions/cache@v3 with: path: ~/.platformio - key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + key: pio-cache - name: Set up Python uses: actions/setup-python@v4 with: From c4a6700ab6e213e7b3320e7d7fc7f914adea681a Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 12:59:32 +0100 Subject: [PATCH 16/17] fix some caching --- .github/workflows/build_check.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 8287185..ee02b1d 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -15,19 +15,23 @@ jobs: 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 + key: compile-cache - uses: actions/setup-python@v4 with: - python-version: '3.9' - - name: Install PlatformIO Core - run: pip install --upgrade platformio + 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: Build PlatformIO Project run: pio run - name: Upload artifacts @@ -84,17 +88,14 @@ jobs: env: PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} steps: - - name: Cache pip + - name: Setup Cache uses: actions/cache@v3 with: - path: ~/.cache/pip - key: pip-cache - - name: Cache PlatformIO - uses: actions/cache@v3 - with: - path: ~/.platformio - key: pio-cache - - name: Set up Python + path: | + ~/.cache/pip + ~/.platformio + key: remote-cache + - name: Setup Python uses: actions/setup-python@v4 with: python-version: '3.10' From d51ead1e627464d64628b08d1206111b797e1407 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 19 Feb 2023 13:13:18 +0100 Subject: [PATCH 17/17] dummy test --- .github/workflows/build_check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 4e58bbd..f86f656 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -24,7 +24,7 @@ jobs: run: | python -m pip install --upgrade pip pip install --upgrade platformio - + - name: Checkout code uses: actions/checkout@v3 - name: Build PlatformIO Project @@ -77,6 +77,7 @@ jobs: name: Cppcheck Report path: output + remote_testing: name: Remote Testing runs-on: ubuntu-20.04