Skip to content

Commit 6a671ee

Browse files
committed
Add github actions workflow
1 parent 558a71e commit 6a671ee

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build library
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
board:
13+
- "nodemcuv2"
14+
- "lolin32"
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Cache pip
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
23+
restore-keys: ${{ runner.os }}-pip-
24+
- name: Cache PlatformIO
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.platformio
28+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
29+
- name: Set up Python
30+
uses: actions/setup-python@v2
31+
- name: Install PlatformIO
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install --upgrade platformio
35+
- name: Install 3rd party dependencies
36+
run: |
37+
pio lib -g install https://github.com/tzapu/WiFiManager
38+
- name: Create main file
39+
run: |
40+
echo "#include <Arduino.h>" >> main.ino
41+
echo "void setup() { }" >> main.ino
42+
echo "void loop() { }" >> main.ino
43+
- name: Run PlatformIO
44+
run: pio ci --board=${{ matrix.board }} .

0 commit comments

Comments
 (0)