blob: e273a5a0d6940746f4549380505d10bc694a6b82 [file] [log] [blame]
name: platformio
on:
push:
pull_request:
jobs:
platformio:
name: Build and run PlatformIO example
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v2
with:
path: nanopb
- name: Installing dependencies for local act
if: ${{ env.ACT }}
run: |
sudo apt update
- name: Installing common dependencies
run: |
sudo apt install -y python3-pip python3-protobuf protobuf-compiler
- name: Install and setup PlatformIO
run: |
pip3 install -U platformio
export PATH=~/.local/bin:$PATH
- name: Build PlatformIO package
run: |
cd nanopb
pio package pack
- name: Example - Extract PlatformIO package to example dir
run: |
cp -R nanopb/examples/platformio example
mkdir -p example/lib/nanopb
tar -xzf nanopb/Nanopb-*.tar.gz -C example/lib/nanopb
- name: Example - Build
run: |
cd example
pio run
- name: Example - Run test without options
run: example/.pio/build/pio_without_options/program
- name: Example - Run test with options
run: example/.pio/build/pio_with_options/program