-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.07 KB
/
compile.yml
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
name: Compile Examples
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Set up Arduino CLI
- name: Set up Arduino CLI
uses: arduino/setup-arduino-cli@v1
with:
version: latest
# Ensure that Bash is used for compatibility with the prebuild script
- name: Ensure Bash Shell
run: sudo ln -sf /bin/bash /bin/sh
# Checkout the repository
- name: Checkout
uses: actions/checkout@v3
# Update the Arduino core index and install required platform
- name: Install Arduino Core
run: |
arduino-cli core update-index
arduino-cli core install Inkplate_Motion:stm32
# Compile all examples and fail fast on error
- name: Compile examples
run: |
set -e # Exit immediately if a command exits with a non-zero status
for sketch in $(find examples -name '*.ino'); do
echo "Compiling $sketch"
arduino-cli compile --fqbn Inkplate_Motion:stm32:Inkplate6Motion "$sketch" --warnings=all --verbose
done