This commit is contained in:
cyberman54 2023-01-20 22:21:26 +01:00
parent 8c0c325a37
commit 629830540e
2 changed files with 11 additions and 23 deletions

View File

@ -1,4 +1,4 @@
name: PlatformIO CI name: PlatformIO CI/CD
on: on:
pull_request: pull_request:
@ -202,32 +202,22 @@ jobs:
CI_HALFILE: ${{ matrix.board }} CI_HALFILE: ${{ matrix.board }}
run: pio run -e ci run: pio run -e ci
deploy: deploy-on-testboard:
strategy: name: Deploy code on ESP32 board TTGO v1.6.1
fail-fast: false runs-on: windows-latest
matrix:
os: [ubuntu-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
platformio-path: ~/.platformio
board: [ttgov21new.h]
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Cache pip - name: Cache pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ${{ matrix.path }} path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: | restore-keys: |
${{ runner.os }}-pip- ${{ runner.os }}-pip-
- name: Cache PlatformIO - name: Cache PlatformIO
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ${{ matrix.platformio-path }} path: ~\AppData\Local\platformio\Cache
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
@ -239,14 +229,12 @@ jobs:
pip install --upgrade platformio pip install --upgrade platformio
- name: Copy of necessary files - name: Copy of necessary files
run: | run: |
cp platformio_orig_s3.ini platformio.ini cp platformio_orig.ini platformio.ini
cp src/loraconf_sample.h src/loraconf.h cp src/loraconf_sample.h src/loraconf.h
cp src/ota_sample.conf src/ota.conf cp src/ota_sample.conf src/ota.conf
cp src/paxcounter_orig.conf src/paxcounter.conf cp src/paxcounter_orig.conf src/paxcounter.conf
- name: Clean - name: Build and deploy for ttgov21new.h
run: pio run -t clean -e ci
- name: Build and deploy for ${{ matrix.board }}
env: env:
CI_HALFILE: ${{ matrix.board }} CI_HALFILE: ttgov21new.h
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: pio remote -a prenzlpi run -e cd -t upload -r run: pio remote -a prenzlpi run -e ci -t upload -r

View File

@ -54,4 +54,4 @@ jobs:
env: env:
CI_HALFILE: ttgov21new.h CI_HALFILE: ttgov21new.h
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: pio remote -a prenzlpi run -t upload -r run: pio remote -a prenzlpi run -e ci -t upload -r