aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorEmil Muratov <gpm@hotplug.ru>2021-12-20 00:15:41 +0300
committerEmil Muratov <gpm@hotplug.ru>2021-12-20 00:15:41 +0300
commit364fc4bb14c40d692fa7d2a97424df7017a084cd (patch)
tree788f587b872189fb9bee6d762fecd63bbc08ffa2 /.github/workflows
parentf8e1de00c74c700ab7955436498ab4bd33a49ef2 (diff)
create a CI job to test examples builds
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/pio_build.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/pio_build.yml b/.github/workflows/pio_build.yml
new file mode 100644
index 0000000..39901f9
--- /dev/null
+++ b/.github/workflows/pio_build.yml
@@ -0,0 +1,48 @@
+# Build examples with Platformio
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+# https://docs.platformio.org/en/latest/integration/ci/github-actions.html
+
+name: PlatformIO CI
+
+on:
+ push:
+ branches: [ master, dev ]
+ pull_request:
+ branches: [ master, dev ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ example:
+ - "examples/PIO_TestPatterns"
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Cache pip
+ uses: actions/cache@v2
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: ${{ runner.os }}-pip-
+ - name: Cache PlatformIO
+ uses: actions/cache@v2
+ with:
+ path: ~/.platformio
+ key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
+ - name: Set up Python 3.x
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.x'
+ - name: Install Platformio
+ run: |
+ python -m pip install --upgrade pip
+ pip install --upgrade platformio
+ pio update
+ - name: Run PlatformIO
+ env:
+ PLATFORMIO_CI_SRC: ${{ matrix.example }}
+ run: |
+ pio ci -c ${{ matrix.example }}/platformio.ini \ No newline at end of file