Skip to content

Change action/cache name to prevent CreateCacheEntry bug #2

Change action/cache name to prevent CreateCacheEntry bug

Change action/cache name to prevent CreateCacheEntry bug #2

name: PlatformIOBuild
env:
PROJECT_DIR: examples/test
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**PlatformioBuild.yml'
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.pio-env }}
runs-on: ubuntu-latest
strategy:
matrix:
pio-env:
- esp32
- esp8266
- rp2040_pico
- rp2350_pico2
- seeed_wio_terminal
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-pio-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Run PlatformIO
run: |
cd ${{ env.PROJECT_DIR }}
pio pkg install -e ${{ matrix.pio-env }} --no-save --library file://$(realpath ../../) --force
pio run -e ${{ matrix.pio-env }}