@@ -4,7 +4,7 @@ name: Arduino CI Build (2 of 4) Release Arduino wolfSSL for Local Examples
44#
55# Known to fail on current 5.8.2 wolfSSL Arduino Release
66#
7- # See ardduino .yml - Arduino CI Build (3 of 4) Latest wolfSSL for Local Examples
7+ # See arduino .yml - Arduino CI Build (3 of 4) Latest wolfSSL for Local Examples
88
99#
1010# Test local Arduino examples with published Arduino wolfssl
@@ -44,7 +44,7 @@ name: Arduino CI Build (2 of 4) Release Arduino wolfSSL for Local Examples
4444#
4545# To test locally:
4646# cd [your WOLFSSL_ROOT], e.g. cd /mnt/c/workspace/wolfssl-$USER
47- # [optional checkout] e.g. git checkout tags/v5.8.6 -stable
47+ # [optional checkout] e.g. git checkout tags/v5.8.4 -stable
4848# pushd ./IDE/ARDUINO
4949# export ARDUINO_ROOT="$HOME/Arduino/libraries"
5050# ./wolfssl-arduino.sh INSTALL
5656 push :
5757 branches : [ '**', 'master', 'main', 'release/**' ]
5858 paths :
59+ # Specific to this Arduino CI Build (2 of 4)
5960 - ' Arduino/**'
6061 - ' .github/workflows/arduino-release.yml'
6162 pull_request :
6263 branches : [ '**' ]
6364 paths :
65+ # Specific to this Arduino CI Build (2 of 4)
6466 - ' Arduino/**'
6567 - ' .github/workflows/arduino-release.yml'
6668 workflow_dispatch :
6769
6870concurrency :
69- group : ${{ github.workflow }}-${{ github.ref }}
71+ # Same branch push cancels other jobs. Other PR branches untouched
72+
73+ group : ${{ github.workflow }}-${{ github.ref_name }}
7074 cancel-in-progress : true
75+
7176# END OF COMMON SECTION
7277
7378jobs :
@@ -80,20 +85,20 @@ jobs:
8085 fail-fast : false
8186 matrix :
8287 fqbn :
88+ - arduino:avr:ethernet
8389 - arduino:avr:leonardoeth
90+ - arduino:avr:mega
91+ - arduino:avr:nano
92+ - arduino:avr:uno
8493 - arduino:avr:yun
8594 - arduino:samd:mkrwifi1010
8695 - arduino:samd:mkr1000
8796 - arduino:samd:mkrfox1200
97+ - arduino:mbed_edge:edge_control
8898 - arduino:mbed_nano:nanorp2040connect
8999 - arduino:mbed_portenta:envie_m7
90100 - arduino:mbed_portenta:portenta_x8
91- - arduino:mbed_edge:edge_control
92101 - arduino:renesas_uno:unor4wifi
93- - arduino:avr:mega
94- - arduino:avr:nano
95- - arduino:avr:uno
96- - arduino:avr:ethernet
97102 - arduino:sam:arduino_due_x
98103 - arduino:samd:arduino_zero_native
99104 - arduino:samd:tian
@@ -106,6 +111,10 @@ jobs:
106111 - esp8266:esp8266:generic
107112 - teensy:avr:teensy40
108113
114+ # Not yet supported, not in standard library
115+ # - esp32:esp32:nano_nora
116+
117+ # End strategy matrix
109118 env :
110119 REPO_OWNER : ${{ github.repository_owner }}
111120
@@ -165,22 +174,31 @@ jobs:
165174 - name : Setup Arduino CLI
166175 run : |
167176 arduino-cli config init
168- arduino-cli core update-index
177+
178+ # wait 10 minutes for big downloads (or use 0 for no limit)
179+ arduino-cli config set network.connection_timeout 600s
180+
169181 arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json
170- arduino-cli core update-index
171182 arduino-cli config add board_manager.additional_urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
172183 arduino-cli core update-index
184+
185+ # mbed nano not yet tested
186+ # sudo "/home/$USER/.arduino15/packages/arduino/hardware/mbed_nano/4.2.4/post_install.sh"
187+
188+ # Install upported boards:
173189 arduino-cli core install esp32:esp32 # ESP32
190+ arduino-cli core install esp8266:esp8266 # ESP8266
191+
192+ arduino-cli core install teensy:avr # PJRC Teensy
193+
174194 arduino-cli core install arduino:avr # Arduino Uno, Mega, Nano
175195 arduino-cli core install arduino:sam # Arduino Due
176196 arduino-cli core install arduino:samd # Arduino Zero
177- arduino-cli core install teensy:avr # PJRC Teensy
178- arduino-cli core install esp8266:esp8266 # ESP8266
179197 arduino-cli core install arduino:mbed_nano # nanorp2040connect
180198 arduino-cli core install arduino:mbed_portenta # portenta_h7_m7
181199 arduino-cli core install arduino:mbed_edge
182- # sudo "/home/$USER/.arduino15/packages/arduino/hardware/mbed_nano/4.2.4/post_install.sh"
183200 arduino-cli core install arduino:renesas_uno
201+
184202 arduino-cli lib install "ArduinoJson" # Example dependency
185203 arduino-cli lib install "WiFiNINA" # ARDUINO_SAMD_NANO_33_IOT
186204 arduino-cli lib install "Ethernet" # Install Ethernet library
@@ -212,13 +230,31 @@ jobs:
212230 # WOLFSSL_EXAMPLES_ROOT is the report root, not example location
213231 echo "WOLFSSL_EXAMPLES_ROOT = $WOLFSSL_EXAMPLES_ROOT"
214232
233+ - name : Compute cache key parts
234+ id : parts
235+ shell : bash
236+ run : |
237+ # From FQBN "vendor:arch:board" get "vendor:arch"
238+ CORE_ID="$(echo "${{ matrix.fqbn }}" | awk -F: '{print $1 ":" $2}')"
239+ echo "CORE_ID=$CORE_ID" >> "$GITHUB_OUTPUT"
240+
241+ # Also expose vendor only for broad fallbacks
242+ VENDOR="$(echo "$CORE_ID" | cut -d: -f1)"
243+ echo "VENDOR=$VENDOR" >> "$GITHUB_OUTPUT"
244+
215245 - name : Cache Arduino packages
216246 uses : actions/cache@v4
217247 with :
218248 path : |
219249 ~/.arduino15
250+ ~/.arduino15/staging
251+
252+ # Arduino libraries
253+ # Specific to Arduino CI Build (2 of 4) Arduinbo Release wolfSSL for Local Examples
254+ # Include all libraries, as the latest Arduino-wolfSSL will only change upon release.
220255 ~/Arduino/libraries
221- key : arduino-${{ runner.os }}-${{ hashFiles('**/board_list.txt') }}-${{ matrix.core }}
256+
257+ key : arduino-${{ runner.os }}-${{ hashFiles('**/arduino-cores.lock') }}
222258 restore-keys : |
223259 arduino-${{ runner.os }}-
224260
@@ -229,6 +265,7 @@ jobs:
229265
230266 # end Show wolfssl-examples
231267
268+ # Specific to Arduino CI Build (3 of 4) Arduinbo Release wolfSSL for Local Examples
232269 # - name: Shallow clone wolfssl
233270 #
234271 # not used here, we'll install with arduino-cli in next step
@@ -263,6 +300,7 @@ jobs:
263300 echo "WOLFSSL_EXAMPLES_ROOT = $WOLFSSL_EXAMPLES_ROOT"
264301 echo "FQBN = ${{ matrix.fqbn }}"
265302
303+ echo "Change directory to Arduino examples..."
266304 pushd ./Arduino/sketches
267305 chmod +x ./compile-all-examples.sh
268306
0 commit comments