Skip to content

Commit 2ad3336

Browse files
committed
ci: optimize list of HALs to reduce download size
Limit the list of HALs to only those needed by the boards in boards.txt. Copied verbatim from bootstrap.sh.
1 parent c5039a7 commit 2ad3336

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,22 @@ jobs:
2828
persist-credentials: false
2929
path: subfolder
3030

31-
- name: Fix module path
31+
- name: Fix module path, list needed HALs
3232
run: |
3333
mkdir -p $(dirname $MODULE_PATH) && mv subfolder $MODULE_PATH
34+
NEEDED_HALS=$(grep 'build.zephyr_hals=' $MODULE_PATH/boards.txt | cut -d '=' -f 2 | xargs -n 1 echo | sort -u)
35+
HAL_FILTER="-hal_.*"
36+
for hal in $NEEDED_HALS; do
37+
HAL_FILTER="$HAL_FILTER,+$hal"
38+
done
39+
echo "HAL_FILTER=$HAL_FILTER" | tee -a $GITHUB_ENV
3440
3541
- name: Setup Zephyr project
3642
uses: zephyrproject-rtos/action-zephyr-setup@v1
3743
with:
3844
toolchains: arm-zephyr-eabi
3945
manifest-file-name: ${{ env.MODULE_PATH }}/west.yml
46+
west-project-filter: ${{ env.HAL_FILTER }}
4047

4148
- name: Add manifest path as module
4249
run: |

0 commit comments

Comments
 (0)