Skip to content

CI

CI #102

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 1 * * SUN'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- example: "examples/ArduinoUnoNano-basic"
board: "uno"
- example: "examples/ArduinoUnoNano-downlink"
board: "uno"
- example: "examples/ESP8266-RN2483-basic"
board: "d1_mini"
- example: "examples/SodaqAutonomo-basic"
board: "sodaq_autonomo"
- example: "examples/SodaqOne-TTN-Mapper-ascii"
board: "sodaq_one"
pio_extra_libs: "Sodaq_UBlox_GPS"
- example: "examples/SodaqOne-TTN-Mapper-binary"
board: "sodaq_one"
pio_extra_libs: "Sodaq_UBlox_GPS"
- example: "examples/TheThingsUno-basic"
board: "leonardo"
- example: "examples/TheThingsUno-GPSshield-TTN-Mapper-binary"
board: "leonardo"
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Add PlatformIO extra libs
run: |
pio lib install ${{ matrix.pio_extra_libs }}
if: matrix.pio_extra_libs != ''
- name: Build application
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}
run: |
pio ci --lib="./src" --board=${{ matrix.board }}