Skip to content

Commit 9b24dc1

Browse files
committed
Update compile.yml
1 parent 82b2e71 commit 9b24dc1

File tree

1 file changed

+24
-31
lines changed

1 file changed

+24
-31
lines changed

.github/workflows/compile.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ jobs:
77
build:
88
runs-on: ubuntu-latest
99

10-
steps:
11-
# Install Arduino CLI manually
12-
- name: Install Arduino CLI
13-
run: |
14-
wget -qO- https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz | tar -xvz
15-
sudo mv arduino-cli /usr/local/bin/
16-
arduino-cli version || exit 1
10+
strategy:
11+
matrix:
12+
include:
13+
- board:
14+
fqbn: Inkplate_Motion:stm32:Inkplate6Motion
15+
additional-sketch-paths: |
16+
- examples
1717
18+
steps:
1819
# Ensure that Bash is used for compatibility with the prebuild script
1920
- name: Ensure Bash Shell
2021
run: sudo ln -sf /bin/bash /bin/sh
@@ -23,28 +24,20 @@ jobs:
2324
- name: Checkout
2425
uses: actions/checkout@v3
2526

26-
# Add custom package index URL and update core index
27-
- name: Configure Arduino CLI
28-
run: |
29-
arduino-cli config init
30-
arduino-cli config set board_manager.additional_urls https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/master/package_Dasduino_Boards_index.json
31-
arduino-cli core update-index
32-
33-
# Install the required platform
34-
- name: Install Arduino Core
35-
run: |
36-
arduino-cli core install Inkplate_Motion:stm32
37-
38-
# Compile all examples and include the current repository as a library
27+
# Compile all examples
3928
- name: Compile examples
40-
run: |
41-
set -e # Exit immediately if a command exits with a non-zero status
42-
for sketch in $(find examples -name '*.ino'); do
43-
echo "Compiling $sketch"
44-
arduino-cli compile \
45-
--fqbn Inkplate_Motion:stm32:Inkplate6Motion \
46-
--libraries "./" \
47-
"$sketch" \
48-
--warnings all \
49-
--verbose
50-
done
29+
uses: arduino/compile-sketches@v1
30+
with:
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
platforms: |
33+
- source-url: https://github.com/SolderedElectronics/Dasduino-Board-Definitions-for-Arduino-IDE/raw/master/package_Dasduino_Boards_index.json
34+
name: Inkplate_Motion:stm32
35+
36+
fqbn: ${{ matrix.board.fqbn }}
37+
libraries: |
38+
- source-path: ./
39+
sketch-paths: |
40+
${{ matrix.additional-sketch-paths }}
41+
cli-compile-flags: |
42+
- --warnings=all
43+
- --verbose

0 commit comments

Comments
 (0)