Skip to content

Commit 848b573

Browse files
committed
try multi fqbn build
1 parent 37e1c63 commit 848b573

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

.github/workflows/package_core.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ jobs:
4040
CORE_HASH: ${{ env.CORE_HASH }}
4141
# JSON describing all boards to build, collected by get_board_details.sh
4242
ALL_BOARD_DATA: ${{ env.ALL_BOARD_DATA }}
43-
# Extended version of ALL_BOARD_DATA with link_mode alternatives added
44-
ALL_BOARD_FQBNS: ${{ env.ALL_BOARD_FQBNS }}
4543
# List of artifacts to produce, including the "zephyr" umbrella artifact
4644
ARTIFACTS: ${{ env.ARTIFACTS }}
4745
# List of architectures the artifacts will be built for
@@ -76,7 +74,6 @@ jobs:
7674
run: |
7775
echo "## Building \`$CORE_VER\`" >> "$GITHUB_STEP_SUMMARY"
7876
echo "CORE_TAG=$(git describe --tags --exact-match --exclude '*/*' 2>/dev/null || echo $CORE_HASH)" >> "$GITHUB_ENV"
79-
echo "ALL_BOARD_FQBNS=$(jq -c 'map((. + {link_mode: "static"}), (. + {link_mode: "dynamic"}))' <<< ${ALL_BOARD_DATA})" >> "$GITHUB_ENV"
8077
echo "ARTIFACTS=$(jq -c '["zephyr"] + (map(.artifact) | unique)' <<< ${ALL_BOARD_DATA})" >> "$GITHUB_ENV"
8178
echo "SUB_ARCHES=$(jq -c 'map(.subarch) | unique' <<< ${ALL_BOARD_DATA})" >> "$GITHUB_ENV"
8279
# Archive the build environment for later jobs
@@ -299,21 +296,20 @@ jobs:
299296

300297
test-core:
301298
# NOTE: this name is hardcoded in ci_collect_data.py
302-
name: Test ${{ matrix.board }}:${{ matrix.link_mode }}
299+
name: Test ${{ matrix.board }}
303300
runs-on: ubuntu-latest
304301
needs:
305302
- build-env
306303
- package-core
307304
strategy:
308305
matrix:
309306
include:
310-
${{ fromJSON( needs.build-env.outputs.ALL_BOARD_FQBNS ) }}
307+
${{ fromJSON( needs.build-env.outputs.ALL_BOARD_DATA ) }}
311308
fail-fast: false
312309
env:
313310
PLAT: arduino:${{ matrix.subarch }}
314-
FQBN: arduino:${{ matrix.subarch }}:${{ matrix.board }}:link_mode=${{ matrix.link_mode }}
315311
CORE_ARTIFACT: ArduinoCore-${{ matrix.artifact }}-${{ needs.build-env.outputs.CORE_HASH }}.tar.bz2
316-
ARTIFACT_TAG: ${{ needs.build-env.outputs.CORE_HASH }}-${{ matrix.board }}-${{ matrix.link_mode }}
312+
ARTIFACT_TAG: ${{ needs.build-env.outputs.CORE_HASH }}-${{ matrix.board }}
317313
if: ${{ !cancelled() && needs.build-env.result == 'success' }}
318314
steps:
319315

@@ -333,17 +329,18 @@ jobs:
333329
- name: Set up core
334330
run: |
335331
tar xf ${CORE_ARTIFACT} # will create ArduinoCore-zephyr/
336-
echo "REPORT_FILE=$(echo ${FQBN} | tr ':' '-').json" >> $GITHUB_ENV
337332
338333
- name: Get test sketches
339334
run: |
340335
# sets ALL_TESTS and ALL_LIBRARIES env vars in GITHUB_ENV
341336
extra/ci_test_list.sh ${{ matrix.artifact }} ${{ matrix.variant }}
342337
343338
- name: Compile tests for ${{ matrix.board }}
344-
uses: pillo79/compile-sketches@next
339+
uses: pillo79/compile-sketches@future
345340
with:
346-
fqbn: ${{ env.FQBN }}
341+
fqbn: |
342+
- arduino:${{ matrix.subarch }}:${{ matrix.board }}:link_mode=dynamic
343+
- arduino:${{ matrix.subarch }}:${{ matrix.board }}:link_mode=static
347344
platforms: |
348345
# Use Board Manager version first to install the tools
349346
- name: ${{ env.PLAT }}
@@ -367,10 +364,10 @@ jobs:
367364
- name: Prepare log
368365
if: ${{ success() || failure() }}
369366
run: |
370-
# make sure to create an empty report if none was created
371-
[ ! -f sketches-reports/${REPORT_FILE} ] && mkdir -p sketches-reports && echo "{}" > sketches-reports/${REPORT_FILE}
372-
# remove base path of the core install from all file references to make logs cleaner
373-
sed -i -e 's!/home/runner/.arduino15/packages/arduino/hardware/zephyr/[^/]*/!!g' sketches-reports/${REPORT_FILE}
367+
# remove base path of the core install from all file references to make logs cleaner, if reports were found
368+
if [ -d sketches-reports ] ; then
369+
sed -i -e 's!/home/runner/.arduino15/packages/arduino/hardware/zephyr/[^/]*/!!g' sketches-reports/*.json
370+
fi
374371
375372
# archive the compile report for later
376373
- uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)