-
Notifications
You must be signed in to change notification settings - Fork 6
106 lines (87 loc) · 2.92 KB
/
build.yml
File metadata and controls
106 lines (87 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: build
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
platformio-build:
strategy:
matrix:
type: ["MCP3221", "MCP3021"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Compile ${{ matrix.type }}
run: |
pio ci --lib="." --board=uno --board=zero --board=esp8285 --board=esp32dev --board=bluepill_f103c8
env:
PLATFORMIO_CI_SRC: examples/${{ matrix.type }}
arduino-build:
strategy:
matrix:
board: ["UNO", "Zero", "ESP8266", "ESP32", "STM32F103C8"]
include:
- board: "UNO"
platform: "arduino:avr"
fqbn: "arduino:avr:uno"
url: ""
- board: "Zero"
platform: "arduino:samd"
fqbn: "arduino:samd:arduino_zero_native"
url: ""
- board: "ESP8266"
platform: "esp8266:esp8266"
fqbn: "esp8266:esp8266:esp8285"
url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
- board: "ESP32"
platform: "esp32:esp32"
fqbn: "esp32:esp32:esp32"
url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
- board: "STM32F103C8"
platform: "STM32:stm32"
fqbn: "STM32:stm32:GenF1:pnum=BLUEPILL_F103C8"
url: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
cp ./MCP3X21.cpp ./examples/MCP3221
cp ./MCP3X21.h ./examples/MCP3221
cp ./MCP3X21.cpp ./examples/MCP3021
cp ./MCP3X21.h ./examples/MCP3021
- name: Set up Python
if: ${{ matrix.board == 'ESP32' }}
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install pyserial
if: ${{ matrix.board == 'ESP32' }}
run: |
python -m pip install --upgrade pip
pip install --upgrade pyserial
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.1.1
- name: "Install platform for ${{ matrix.board }}"
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.platform }}
env:
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: ${{ matrix.url }}
- name: Compile MCP3221
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/MCP3221
- name: Compile MCP3021
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/MCP3021