Browse Source

ci: try to pio-run too

include caching of libraries
test github actions syntax magic as well
pull/2552/head
Maxim Prokhorov 1 year ago
parent
commit
dd1609a9d1
2 changed files with 24 additions and 4 deletions
  1. +20
    -4
      .github/workflows/push.yml
  2. +4
    -0
      ci_script.sh

+ 20
- 4
.github/workflows/push.yml View File

@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
env: [esp8266-4m-base, esp8266-4m-latest-base]
env: [nodemcu-lolin, esp8266-4m-base, esp8266-4m-latest-base]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
@ -63,10 +63,26 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ matrix.env }}-${{ hashFiles('code/platformio.ini') }}
key: ${{ runner.os }}-build-${{ matrix.env }}-${{ hashFiles('code/platformio.ini') }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.env }}-
${{ runner.os }}-build-
- name: Cache libraries
uses: actions/cache@v2
with:
path: libraries/
key: ${{ runner.os }}-libraries-${{ hashFiles('code/platformio.ini') }}
restore-keys: |
${{ runner.os }}-libraries-
- name: PlatformIO prepare
run: |
git config --global advice.detachedHead false
./ci_install.sh build
- run: |
./ci_install.sh build ${{ matrix.env }}
- if: ${{ matrix.env }} == 'nodemcu-lolin'
name: Basic build
run: |
./ci_script.sh build ${{ matrix.env }}
- if: ${{ matrix.env }} != 'nodemcu-lolin'
name: Test build
run: |
./ci_script.sh test ${{ matrix.env }}

+ 4
- 0
ci_script.sh View File

@ -28,6 +28,10 @@ case "$1" in
git --no-pager diff --stat
;;
("build")
# simply build the given environment
pio run -e $2
;;
("test")
# run generic build test with the specified environment as base
scripts/test_build.py -e $2
;;


Loading…
Cancel
Save