Skip to content

Commit 12f26d1

Browse files
committed
Python for ESP32 in action container
1 parent 7f906d3 commit 12f26d1

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Container image that runs your code
2-
FROM ubuntu:latest
2+
FROM ubuntu:18.04
33

44
# Install wget
55
RUN apt-get update --quiet=2 > /dev/null && apt-get install --quiet=2 --assume-yes wget > /dev/null

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This action does a test-compile of one or more [Arduino programs](https://github.com/ArminJo/Arduino-Simple-DSO/tree/master/src) in a repository for different boards, each with different compile parameters.<br/>
44
It can be used e.g. to test-compile all examples contained in an [Arduino library repository](https://github.com/ArminJo/NeoPatterns/tree/master/examples).<br/>
5-
The action is a Docker action which uses the [arduino-cli program](https://github.com/arduino/arduino-cli) for compiling. All the other work is done by the [arduino-test-compile.sh](https://github.com/ArminJo/arduino-test-compile/blob/master/arduino-test-compile.sh) bash script.<br/>
5+
The action is a Docker action which uses Ubuntu 18.04 and the [arduino-cli program](https://github.com/arduino/arduino-cli) for compiling. All the other work is done by the [arduino-test-compile.sh](https://github.com/ArminJo/arduino-test-compile/blob/master/arduino-test-compile.sh) bash script.<br/>
66
If you want to test compile a sketch, it is not required that the sketch resides in a directory with the same name (as Arduino IDE requires it) or has the extension .ino. Internally the appropriate directory is created on the fly for test-compiling and the file is renamed to be .ino.
77

88
If you need more flexibility for e.g. installing additional board platforms, or want to save around 20 to 30 seconds for each job, then you may want to
@@ -140,7 +140,7 @@ jobs:
140140
- name: Checkout
141141
uses: actions/checkout@master
142142
- name: Compile all examples
143-
uses: ArminJo/arduino-test-compile@v2.1.0
143+
uses: ArminJo/arduino-test-compile@v2.2.0
144144
```
145145

146146
## One ESP8266 board with parameter
@@ -157,7 +157,7 @@ jobs:
157157
uses: actions/checkout@master
158158
159159
- name: Compile all examples
160-
uses: ArminJo/arduino-test-compile@v2.1.0
160+
uses: ArminJo/arduino-test-compile@v2.2.0
161161
with:
162162
arduino-board-fqbn: esp8266:esp8266:huzzah:eesz=4M3M,xtal=80
163163
platform-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
@@ -219,7 +219,7 @@ jobs:
219219
uses: actions/checkout@master
220220
221221
- name: Compile all examples
222-
uses: ArminJo/arduino-test-compile@v2.1.0
222+
uses: ArminJo/arduino-test-compile@v2.2.0
223223
with:
224224
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
225225
platform-url: ${{ matrix.platform-url }}
@@ -299,13 +299,16 @@ Samples for using action in workflow:
299299
- Arduino library, only arduino:avr boards. Talkie [![Build Status](https://github.com/ArminJo/Talkie/workflows/LibraryBuild/badge.svg)](https://github.com/ArminJo/Talkie/blob/master/.github/workflows/LibraryBuild.yml)
300300
- Arduino library, 2 boards. Arduino-FrequencyDetector [![Build Status](https://github.com/ArminJo/Arduino-FrequencyDetector/workflows/LibraryBuild/badge.svg)](https://github.com/ArminJo/Arduino-FrequencyDetector/blob/master/.github/workflows/LibraryBuildWithAction.yml)
301301

302-
Samples for using `arduino-test-compile.sh script` instead of `ArminJo/arduino-test-compile@v2.1.0` action:
302+
Samples for using `arduino-test-compile.sh script` instead of `ArminJo/arduino-test-compile@v2.2.0` action:
303303
- One sketch, one board, multiple options. RobotCar [![Build Status](https://github.com/ArminJo/Arduino-RobotCar/workflows/TestCompile/badge.svg)](https://github.com/ArminJo/Arduino-RobotCar/blob/master/.github/workflows/TestCompile.yml)
304304
- Arduino library, multiple boards. ServoEasing [![Build Status](https://github.com/ArminJo/ServoEasing/workflows/LibraryBuild/badge.svg)](https://github.com/ArminJo/ServoEasing/blob/master/.github/workflows/LibraryBuild.yml)
305305
- Arduino library, multiple boards. NeoPatterns [![Build Status](https://github.com/ArminJo/NeoPatterns/workflows/LibraryBuild/badge.svg)](https://github.com/ArminJo/NeoPatterns/blob/master/.github/workflows/LibraryBuild.yml)
306306

307307
# Revision History
308308
### master
309+
### Version v2.2.0
310+
- Using ubuntu:18.04 for Docker container, since ubuntu:latest can not fetch python for ESP32 anymore.
311+
- `CPP_EXTRA_FLAGS` are now resettet.
309312

310313
### Version v2.1.0
311314
- Added missing newline after print of "Install libraries $REQUIRED_LIBRARIES".

arduino-test-compile.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ if [[ ${PLATFORM} == esp8266:esp8266 && ! -f /usr/bin/python3 ]]; then
140140
fi
141141

142142
if [[ $PLATFORM == esp32:esp32 ]]; then
143-
if [[ ! -f /usr/bin/pip ]]; then
143+
if [[ ! -f /usr/bin/pip && ! -f /usr/bin/python ]]; then
144144
echo "install python and pip for ESP32"
145145
apt-get install -qq python-pip > /dev/null # this installs also python
146146
fi

0 commit comments

Comments
 (0)