Skip to content

Commit 05f6047

Browse files
committed
scripts: Use toolchain list from distribution bundle build
This commit updates the CI workflow to output a toolchain list file (`sdk_toolchains`) while building a distribution bundle and updates the distribution bundle setup scripts to use it instead of a hard-coded one. This allows partial distribution bundle builds without all the supported toolchains to be properly handled by the distribution bundle setup script. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent da4f3c6 commit 05f6047

File tree

3 files changed

+7
-38
lines changed

3 files changed

+7
-38
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,9 @@ jobs:
11391139
# Stage version file
11401140
echo "${VERSION}" > sdk_version
11411141
1142+
# Stage toolchain list file
1143+
echo '${{ needs.setup.outputs.targets }}' | jq -cr '.[]' > sdk_toolchains
1144+
11421145
# Stage CMake package
11431146
## Verify CMake package archive checksum
11441147
pushd ${ARTIFACT_ROOT}/cmake_${HOST}

scripts/template_setup_posix

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -116,26 +116,7 @@ user_prompt()
116116
pushd "$(dirname "${BASH_SOURCE[0]}")"
117117

118118
# Initialise toolchain list
119-
toolchains=(
120-
"aarch64-zephyr-elf"
121-
"arc64-zephyr-elf"
122-
"arc-zephyr-elf"
123-
"arm-zephyr-eabi"
124-
"mips-zephyr-elf"
125-
"nios2-zephyr-elf"
126-
"riscv64-zephyr-elf"
127-
"sparc-zephyr-elf"
128-
"x86_64-zephyr-elf"
129-
"xtensa-espressif_esp32_zephyr-elf"
130-
"xtensa-espressif_esp32s2_zephyr-elf"
131-
"xtensa-intel_apl_adsp_zephyr-elf"
132-
"xtensa-intel_bdw_adsp_zephyr-elf"
133-
"xtensa-intel_byt_adsp_zephyr-elf"
134-
"xtensa-intel_s1000_zephyr-elf"
135-
"xtensa-nxp_imx_adsp_zephyr-elf"
136-
"xtensa-nxp_imx8m_adsp_zephyr-elf"
137-
"xtensa-sample_controller_zephyr-elf"
138-
)
119+
toolchains=$(<sdk_toolchains)
139120

140121
# Initialise list of toolchains to install
141122
inst_toolchains=()

scripts/template_setup_win

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,9 @@ exit /b 0
2525

2626
REM # Initialise toolchain list
2727
set TOOLCHAINS=
28-
set TOOLCHAINS=%TOOLCHAINS% aarch64-zephyr-elf
29-
set TOOLCHAINS=%TOOLCHAINS% arc64-zephyr-elf
30-
set TOOLCHAINS=%TOOLCHAINS% arc-zephyr-elf
31-
set TOOLCHAINS=%TOOLCHAINS% arm-zephyr-eabi
32-
set TOOLCHAINS=%TOOLCHAINS% mips-zephyr-elf
33-
set TOOLCHAINS=%TOOLCHAINS% nios2-zephyr-elf
34-
set TOOLCHAINS=%TOOLCHAINS% riscv64-zephyr-elf
35-
set TOOLCHAINS=%TOOLCHAINS% sparc-zephyr-elf
36-
set TOOLCHAINS=%TOOLCHAINS% x86_64-zephyr-elf
37-
set TOOLCHAINS=%TOOLCHAINS% xtensa-espressif_esp32_zephyr-elf
38-
set TOOLCHAINS=%TOOLCHAINS% xtensa-espressif_esp32s2_zephyr-elf
39-
set TOOLCHAINS=%TOOLCHAINS% xtensa-intel_apl_adsp_zephyr-elf
40-
set TOOLCHAINS=%TOOLCHAINS% xtensa-intel_bdw_adsp_zephyr-elf
41-
set TOOLCHAINS=%TOOLCHAINS% xtensa-intel_byt_adsp_zephyr-elf
42-
set TOOLCHAINS=%TOOLCHAINS% xtensa-intel_s1000_zephyr-elf
43-
set TOOLCHAINS=%TOOLCHAINS% xtensa-nxp_imx_adsp_zephyr-elf
44-
set TOOLCHAINS=%TOOLCHAINS% xtensa-nxp_imx8m_adsp_zephyr-elf
45-
set TOOLCHAINS=%TOOLCHAINS% xtensa-sample_controller_zephyr-elf
28+
for /f %%t in (sdk_toolchains) do (
29+
set TOOLCHAINS=%TOOLCHAINS% %%t
30+
)
4631

4732
REM Initialise list of toolchains to install
4833
set INST_TOOLCHAINS=

0 commit comments

Comments
 (0)