From 36d7eeede8ccc3fd41b3ddf5622b5e8cda404c08 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Thu, 19 Jan 2023 21:54:32 +0100 Subject: [PATCH 1/2] platformio.ini syntax fix --- platformio_orig.ini | 1 - platformio_orig_s3.ini | 1 - 2 files changed, 2 deletions(-) diff --git a/platformio_orig.ini b/platformio_orig.ini index 043fb150..99bb6cb2 100644 --- a/platformio_orig.ini +++ b/platformio_orig.ini @@ -117,7 +117,6 @@ lib_deps = ${common.lib_deps_all} build_flags = -include "src/hal/${board.halfile}" ${common.build_flags_all} -upload_protocol = ${common.upload_protocol} extra_scripts = ${common.extra_scripts} monitor_speed = ${common.monitor_speed} monitor_filters = time, esp32_exception_decoder, default diff --git a/platformio_orig_s3.ini b/platformio_orig_s3.ini index d6f6c5d7..6ac305ce 100644 --- a/platformio_orig_s3.ini +++ b/platformio_orig_s3.ini @@ -57,7 +57,6 @@ lib_deps = ${common.lib_deps_all} build_flags = -include "src/hal/${board.halfile}" ${common.build_flags_all} -upload_protocol = ${common.upload_protocol} extra_scripts = ${common.extra_scripts} monitor_speed = ${common.monitor_speed} monitor_filters = time, esp32_exception_decoder, default From 0d69a8df533b9a0e787045addf534ddb9290e9a0 Mon Sep 17 00:00:00 2001 From: cyberman54 Date: Fri, 20 Jan 2023 22:43:12 +0100 Subject: [PATCH 2/2] enhance CI/CD workflow --- .github/workflows/build.yml | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07650e87..1cdfaae0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: PlatformIO CI +name: PlatformIO CI/CD on: pull_request: @@ -201,3 +201,39 @@ jobs: env: CI_HALFILE: ${{ matrix.board }} run: pio run -e ci + + deploy-on-testboard: + name: Deploy code on ESP32 board TTGO v1.6.1 + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Cache pip + uses: actions/cache@v3 + with: + path: ~\AppData\Local\pip\Cache + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Cache PlatformIO + uses: actions/cache@v3 + with: + path: ~\AppData\Local\platformio\Cache + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.9.13" + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + - name: Copy of necessary files + run: | + cp platformio_orig.ini platformio.ini + cp src/loraconf_sample.h src/loraconf.h + cp src/ota_sample.conf src/ota.conf + cp src/paxcounter_orig.conf src/paxcounter.conf + - name: Build and deploy for testboard + env: + PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} + run: pio remote -a prenzlpi run -t upload -r \ No newline at end of file