Skip to content

Commit 5694e24

Browse files
per1234aentinger
authored andcommitted
Run compile-examples CI action for ESP8266 board
The ESP8266 core for Arduino has Python 3 as a dependency. On Linux, instead of installing their own copy of Python 3, they assume it is already installed at /usr/bin/python3 and only install a symlink to it. The Docker container used by the compile-examples action does not have Python 3 installed, so this required using a wrapper script as an alternate entrypoint when compiling for an ESP8266 board. The wrapper script installs Python 3 and then passes the arguments on to the standard entrypoint script.
1 parent de0be19 commit 5694e24

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/compile-examples.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,33 @@ jobs:
44
build:
55
runs-on: ubuntu-latest
66

7+
env:
8+
LIBRARIES: Arduino_DebugUtils WiFi101 WiFiNINA MKRGSM MKRNB
79
strategy:
810
matrix:
911
fqbn: [
1012
"arduino:samd:mkr1000",
1113
"arduino:samd:mkrwifi1010",
1214
"arduino:samd:nano_33_iot",
1315
"arduino:samd:mkrgsm1400",
14-
"arduino:samd:mkrnb1500"
16+
"arduino:samd:mkrnb1500",
17+
'"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"'
1518
]
1619

1720
steps:
1821
- uses: actions/checkout@v1
1922
with:
2023
fetch-depth: 1
21-
- uses: arduino/actions/libraries/compile-examples@master
24+
- name: compile-examples for official Arduino boards
25+
if: startsWith(matrix.fqbn, '"esp8266:esp8266') != true
26+
uses: arduino/actions/libraries/compile-examples@master
2227
with:
2328
fqbn: ${{ matrix.fqbn }}
24-
libraries: Arduino_DebugUtils WiFi101 WiFiNINA MKRGSM MKRNB
29+
libraries: ${{ env.LIBRARIES }}
30+
- name: compile-examples for ESP8266 boards
31+
if: startsWith(matrix.fqbn, '"esp8266:esp8266')
32+
uses: arduino/actions/libraries/compile-examples@master
33+
with:
34+
fqbn: ${{ matrix.fqbn }}
35+
libraries: ${{ env.LIBRARIES }}
36+
entrypoint: /github/workspace/.github/workflows/install-python-wrapper.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -x
2+
# This script is used as an alternate entrypoint to allow installing Python 3 (a dependency of
3+
# the ESP8266 core for Arduino) in the Docker container used by the compile-examples action
4+
5+
# Install Python 3
6+
apt-get update && apt-get install -y python3
7+
8+
Run the standard entrypoint script
9+
/entrypoint.sh "$@"

0 commit comments

Comments
 (0)