@@ -38,7 +38,7 @@ name: Arduino CI Build (3 of 4) Latest wolfSSL for Local Examples
3838#
3939# To test locally:
4040# cd [your WOLFSSL_ROOT], e.g. cd /mnt/c/workspace/wolfssl-$USER
41- # [optional checkout] e.g. git checkout tags/v5.8.2 -stable
41+ # [optional checkout] e.g. git checkout tags/v5.8.6 -stable
4242# pushd ./IDE/ARDUINO
4343# export ARDUINO_ROOT="$HOME/Arduino/libraries"
4444# ./wolfssl-arduino.sh INSTALL
5151 branches : [ '**', 'master', 'main', 'release/**' ]
5252 paths :
5353 - ' Arduino/**'
54- - ' !Arduino/sketches/board_list_v5.8.2.txt' # Not triggered on arduino-release.yml file. TODO remove this line after next Arduino wolfssl release
5554 - ' .github/workflows/arduino.yml'
5655 pull_request :
5756 branches : [ '**' ]
5857 paths :
5958 - ' Arduino/**'
60- - ' !Arduino/sketches/board_list_v5.8.2.txt' # Not triggered on arduino-release.yml file. TODO remove this line after next Arduino wolfssl release
6159 - ' .github/workflows/arduino.yml'
6260 workflow_dispatch :
6361
@@ -68,10 +66,43 @@ concurrency:
6866
6967jobs :
7068 build :
71- # if: github.repository_owner == 'wolfssl'
69+ name : Compile (${{ matrix.fqbn }})
70+ if : github.repository_owner == 'wolfssl'
7271 runs-on : ubuntu-latest
72+
73+ strategy :
74+ fail-fast : false
75+ matrix :
76+ fqbn :
77+ - arduino:avr:leonardoeth
78+ - arduino:avr:yun
79+ - arduino:samd:mkrwifi1010
80+ - arduino:samd:mkr1000
81+ - arduino:samd:mkrfox1200
82+ - arduino:mbed_nano:nanorp2040connect
83+ - arduino:mbed_portenta:envie_m7
84+ - arduino:mbed_portenta:portenta_x8
85+ - arduino:mbed_edge:edge_control
86+ - arduino:renesas_uno:unor4wifi
87+ - arduino:avr:mega
88+ - arduino:avr:nano
89+ - arduino:avr:uno
90+ - arduino:avr:ethernet
91+ - arduino:sam:arduino_due_x
92+ - arduino:samd:arduino_zero_native
93+ - arduino:samd:tian
94+ - esp32:esp32:esp32
95+ - esp32:esp32:esp32s2
96+ - esp32:esp32:esp32s3
97+ - esp32:esp32:esp32c3
98+ - esp32:esp32:esp32c6
99+ - esp32:esp32:esp32h2
100+ - esp8266:esp8266:generic
101+ - teensy:avr:teensy40
102+
73103 env :
74104 REPO_OWNER : ${{ github.repository_owner }}
105+
75106 steps :
76107 - name : Checkout Repository
77108 uses : actions/checkout@v4
@@ -175,6 +206,17 @@ jobs:
175206 # WOLFSSL_EXAMPLES_ROOT is the report root, not example location
176207 echo "WOLFSSL_EXAMPLES_ROOT = $WOLFSSL_EXAMPLES_ROOT"
177208
209+ - name : Cache Arduino packages
210+ uses : actions/cache@v4
211+ with :
212+ path : |
213+ ~/.arduino15
214+ ~/Arduino/libraries
215+ !~/Arduino/libraries/wolfssl
216+ key : arduino-${{ runner.os }}-${{ hashFiles('Arduino/sketches/board_list.txt') }}-${{ matrix.fqbn }}
217+ restore-keys : |
218+ arduino-${{ runner.os }}-
219+
178220 - name : Show wolfssl-examples
179221 run : |
180222 # The examples are local in this wolfssl-example repo, but should have been copied to library, above
@@ -206,10 +248,25 @@ jobs:
206248 fi
207249 # end wolfssl source
208250
251+ - name : Get wolfSSL commit
252+ id : wolfsha
253+ run : echo "sha=$(git -C wolfssl rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
254+
255+ - name : Cache wolfSSL Arduino library
256+ id : cache-wolfssl
257+ uses : actions/cache@v4
258+ with :
259+ path : ${{ env.ARDUINO_ROOT }}/wolfssl
260+ key : wolfssl-lib-${{ runner.os }}-${{ steps.wolfsha.outputs.sha }}-${{ hashFiles('wolfssl/IDE/ARDUINO/wolfssl-arduino.sh') }}-${{ hashFiles('Arduino/sketches/**') }}
261+
209262 - name : Install wolfSSL Arduino library
263+ if : steps.cache-wolfssl.outputs.cache-hit != 'true'
210264 run : |
211265 # Install wolfssl via wolfssl-arduino.sh install script
212266
267+ echo "Installing wolfSSL Arduino library (no cache hit)."
268+ rm -rf "$ARDUINO_ROOT/wolfssl"
269+
213270 # Even though the examples are in this library, we'll test as installed for library publishing.
214271 # When WOLFSSL_EXAMPLES_ROOT is set, the examples will be copied from that path to the published library.
215272 # WOLFSSL_EXAMPLES_ROOT is the repo root, not example directory location (./Arduino/sketches) within.
@@ -251,7 +308,9 @@ jobs:
251308 echo "Current directory = $PWD"
252309 echo "ARDUINO_ROOT = $ARDUINO_ROOT"
253310 echo "WOLFSSL_EXAMPLES_ROOT = $WOLFSSL_EXAMPLES_ROOT"
311+ echo "FQBN = ${{ matrix.fqbn }}"
254312
313+ echo "Change directory to Arduino examples..."
255314 pushd ./Arduino/sketches
256315 chmod +x ./compile-all-examples.sh
257316
@@ -263,7 +322,7 @@ jobs:
263322 # Compile the Arduino library examples in-place
264323 pushd "$ARDUINO_ROOT/wolfssl/examples/"
265324 echo "PWD=$PWD"
266- ./compile-all-examples.sh ./board_list.txt
325+ ./compile-all-examples.sh ./board_list.txt "${{ matrix.fqbn }}"
267326 popd
268327 popd
269328
0 commit comments