enhance CI/CD workflow
This commit is contained in:
parent
36d7eeede8
commit
0d69a8df53
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: PlatformIO CI
|
name: PlatformIO CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -201,3 +201,39 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI_HALFILE: ${{ matrix.board }}
|
CI_HALFILE: ${{ matrix.board }}
|
||||||
run: pio run -e ci
|
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
|
Loading…
Reference in New Issue
Block a user