Skip to content

Commit 3c06172

Browse files
committed
Breakout ST example compilation
1 parent 4dda5bd commit 3c06172

File tree

4 files changed

+38
-20
lines changed

4 files changed

+38
-20
lines changed

.github/actions/compile-examples/Dockerfile renamed to .github/actions/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@
99
# docker run --entrypoint bash --interactive --rm --tty --volume "$(pwd)":/host-volume/ --workdir /host-volume/ arduino-buildpack
1010

1111
# Define global arguments
12+
ARG ARDUINO_CLI_VERSION=0.22.0
1213
ARG DEBIAN_FRONTEND="noninteractive"
13-
ARG UID=1000
14-
ARG USER="blues"
14+
# ARG UID=1000
15+
# ARG USER="blues"
1516

1617
# POSIX compatible (Linux/Unix) base image
1718
FROM debian:stable-slim
1819

1920
# Import global arguments
21+
ARG ARDUINO_CLI_VERSION
2022
ARG DEBIAN_FRONTEND
2123
# ARG UID
2224
# ARG USER
2325

2426
# Define local arguments
2527
# ARG ARDUINO_CLI_CHECKSUM="068f0a69ffecd5688e0b4bc02609720af57ec1aa60e5ea6a2879af3ed1dc0d9b"
26-
ARG ARDUINO_CLI_VERSION=0.21.1
2728
ARG BINDIR=/usr/local/bin
2829
ARG ECHO_BC_FILE='$bcfile'
2930

@@ -58,6 +59,7 @@ RUN ["dash", "-c", "\
5859
python3 \
5960
python3-pip \
6061
ssh \
62+
tree \
6163
&& pip install \
6264
pyserial \
6365
&& apt-get clean \

.github/actions/compile-examples/action.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ author: 'Zachary J. Fields'
33
description: 'Validate examples by compiling for supported platforms'
44
runs:
55
using: 'docker'
6-
image: 'Dockerfile'
7-
entrypoint: arduino-cli
6+
image: '../Dockerfile'
7+
entrypoint: bash
88
args:
9-
- compile
10-
- --build-property
11-
- build.extra_flags=-Werror
12-
- --fqbn
13-
- ${{ inputs.fully-qualified-board-name }}
14-
- --warnings
15-
- all
16-
- ${{ inputs.example-sketch }}
9+
- -c
10+
- "arduino-cli compile \
11+
--build-property build.extra_flags=-Werror \
12+
--fqbn ${{ inputs.fully-qualified-board-name }} \
13+
--warnings all \
14+
${{ inputs.example-sketch }}"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'Compile ST Examples'
2+
author: 'Zachary J. Fields'
3+
description: 'Validate examples by compiling for ST platforms'
4+
runs:
5+
using: 'docker'
6+
image: '../Dockerfile'
7+
entrypoint: 'bash'
8+
args:
9+
- -c
10+
- 'export HOME=/root && arduino-cli compile --fqbn STMicroelectronics:stm32:BluesW:pnum=SWAN_R5 --warnings all ./examples/Example7_PowerControl/Example7_PowerControl.ino'

.github/workflows/note-arduino-ci.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ jobs:
4141
# - ./examples/Example6_SensorTutorial/Example6_SensorTutorial.ino
4242
- ./examples/Example7_PowerControl/Example7_PowerControl.ino
4343
fully-qualified-board-name:
44-
# - STMicroelectronics:stm32:BluesW:pnum=SWAN_R5
44+
- STMicroelectronics:stm32:BluesW:pnum=SWAN_R5
4545
- esp32:esp32:featheresp32
4646
# - adafruit:samd:adafruit_feather_m4
47-
# - STMicroelectronics:stm32:GenF4:pnum=FEATHER_F405
47+
- STMicroelectronics:stm32:GenF4:pnum=FEATHER_F405
4848
- arduino:mbed_nano:nano33ble
4949
- SparkFun:apollo3:sfe_artemis_thing_plus
50-
# - STMicroelectronics:stm32:Disco:pnum=B_G431B_ESC1
51-
# - STMicroelectronics:stm32:Nucleo_32:pnum=NUCLEO_F031K6
50+
- STMicroelectronics:stm32:Disco:pnum=B_G431B_ESC1
51+
- STMicroelectronics:stm32:Nucleo_32:pnum=NUCLEO_F031K6
5252
- rp2040:rp2040:rpipico
5353
# - arduino:avr:mega
5454
steps:
@@ -57,9 +57,17 @@ jobs:
5757
uses: actions/checkout@v2
5858
with:
5959
submodules: true
60-
- name: Compile Examples
61-
id: compile_examples
62-
uses: ./.github/actions/compile-examples
60+
# - name: Compile Examples
61+
# if: ${{ !contains(matrix.fully-qualified-board-name,'STMicroelectronics') }}
62+
# id: compile_examples
63+
# uses: ./.github/actions/compile-examples
64+
# with:
65+
# example-sketch: ${{ matrix.example-sketch }}
66+
# fully-qualified-board-name: ${{ matrix.fully-qualified-board-name }}
67+
- name: Compile ST Examples
68+
if: ${{ contains(matrix.fully-qualified-board-name,'STMicroelectronics') }}
69+
id: compile_st_examples
70+
uses: ./.github/actions/compile-st-examples
6371
with:
6472
example-sketch: ${{ matrix.example-sketch }}
6573
fully-qualified-board-name: ${{ matrix.fully-qualified-board-name }}

0 commit comments

Comments
 (0)