Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e310592

Browse files
committed
use arduino-cli
Signed-off-by: Matteo Suppo <[email protected]>
1 parent 0f3d4da commit e310592

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/test.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
test-matrix:
8+
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
env:
16+
GITHUB_WORKSPACE: ~/.arduino15/packages/arduino/hardware/avr/1.8.1
17+
18+
steps:
19+
- name: Install Arduino CLI
20+
uses: arduino/[email protected]
21+
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Install tool dependencies
26+
run: |
27+
arduino-cli core update-index
28+
arduino-cli core install arduino:avr
29+
rm -r ~/.arduino15/packages/arduino/hardware/avr/*
30+
31+
- name: Move repo in the proper folder
32+
run: |
33+
mkdir -p ~/.arduino15/packages/arduino/hardware/avr/1.8.2
34+
mv * ~/.arduino15/packages/arduino/hardware/avr/1.8.2/
35+
36+
- name: Clone examples
37+
run: |
38+
git clone --depth 1 https://github.com/arduino/Arduino.git
39+
mv Arduino/build/shared/examples .
40+
rm -rf Arduino
41+
42+
- name: Compile every example
43+
run: |
44+
for d in examples/*; do
45+
for f in $d/*; do
46+
echo "Compile $f"
47+
arduino-cli compile --fqbn "arduino:avr:uno" $f
48+
done
49+
done

0 commit comments

Comments
 (0)