File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 shas :
2424 description : ' commit SHAs for those refs, same order'
2525 value : ${{ jobs.resolve.outputs.shas }}
26+ refs_json :
27+ description : ' same refs as a JSON array, for strategy.matrix'
28+ value : ${{ jobs.resolve.outputs.refs_json }}
2629
2730jobs :
2831 resolve :
3134 outputs :
3235 refs : ${{ steps.pick.outputs.refs }}
3336 shas : ${{ steps.sha.outputs.shas }}
37+ refs_json : ${{ steps.json.outputs.refs_json }}
3438 steps :
3539 - id : pick
3640 run : |
8690 <(tr ',' '\n' <<< "$shas") \
8791 | awk -F'|' '{print "- `"$1"` @ `"substr($2,1,12)"`"}'
8892 } >> "$GITHUB_STEP_SUMMARY"
93+
94+ - id : json
95+ run : |
96+ set -euo pipefail
97+ json=$(printf '%s' '${{ steps.pick.outputs.refs }}' \
98+ | tr ',' '\n' | jq -R . | jq -sc .)
99+ echo "refs_json=$json" >> "$GITHUB_OUTPUT"
100+ echo "matrix refs: $json"
Original file line number Diff line number Diff line change @@ -70,14 +70,22 @@ concurrency:
7070# END OF COMMON SECTION
7171
7272jobs :
73+ resolve :
74+ if : github.repository_owner == 'wolfssl'
75+ uses : ./.github/workflows/_resolve-wolfssl.yml
76+ with :
77+ stable_count : 1
78+
7379 build :
74- name : on FQBN (${{ matrix.fqbn }})
80+ name : on FQBN (${{ matrix.fqbn }}) wolfSSL ${{ matrix.wolfssl_ref }}
7581 if : github.repository_owner == 'wolfssl'
82+ needs : resolve
7683 runs-on : ubuntu-latest
7784
7885 strategy :
7986 fail-fast : false
8087 matrix :
88+ wolfssl_ref : ${{ fromJson(needs.resolve.outputs.refs_json) }}
8189 fqbn :
8290 # When editing this list, be sure to also edit file: board_list.txt
8391 # The compile-all-examples.sh optionally takes a FQBN parameter to
@@ -268,9 +276,11 @@ jobs:
268276
269277 - name : Shallow Clone wolfssl
270278 run : |
271- # Clone the latest wolfssl to use for building examples
279+ # Clone the wolfssl ref under test: master or the latest stable tag,
280+ # rather than always master
272281
273- git clone --depth 1 https://github.com/$REPO_OWNER/wolfssl.git
282+ git clone --depth 1 --branch '${{ matrix.wolfssl_ref }}' \
283+ https://github.com/$REPO_OWNER/wolfssl.git
274284
275285 # Assign your PR branch for testing here:
276286 THIS_PR_BRANCH=""
You can’t perform that action at this time.
0 commit comments