From cdfccecd52c6502fe0ce59b383d5f73f0c7d98d7 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Fri, 29 Nov 2024 14:26:07 -0500 Subject: [PATCH] ci: twister: build native_sim with llvm Use twister to selectively build with llvm on some platforms. This removes duplication with the clang workflow which is being removed in a followup commit. Signed-off-by: Anas Nashif --- .github/workflows/twister.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/twister.yaml b/.github/workflows/twister.yaml index 0fa810b3dd76548..76b6d5be6d419a1 100644 --- a/.github/workflows/twister.yaml +++ b/.github/workflows/twister.yaml @@ -46,10 +46,11 @@ jobs: BSIM_COMPONENTS_PATH: /opt/bsim/components TWISTER_COMMON: '--no-detailed-test-id --force-color --inline-logs -v -N -M --retry-failed 3 --timeout-multiplier 2 ' WEEKLY_OPTIONS: ' -M --build-only --all --show-footprint --report-filtered' - PR_OPTIONS: ' --clobber-output --integration' + PR_OPTIONS: ' --clobber-output --integration --force-platform-toolchain native_sim/native:llvm ' PUSH_OPTIONS: ' --clobber-output -M --show-footprint --report-filtered' COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} BASE_REF: ${{ github.base_ref }} + LLVM_TOOLCHAIN_PATH: /usr/lib/llvm-16 steps: - name: Print cloud service information run: | @@ -149,11 +150,19 @@ jobs: export ZEPHYR_BASE=${PWD} export ZEPHYR_TOOLCHAIN_VARIANT=zephyr python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request --no-detailed-test-id - ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} --load-tests testplan.json ${TWISTER_COMMON} ${PR_OPTIONS} + ./scripts/twister \ + --subset ${{matrix.subset}}/${{ strategy.job-total }} \ + --load-tests testplan.json \ + ${TWISTER_COMMON} \ + ${PR_OPTIONS} if [ "${{matrix.subset}}" = "1" -a ${{needs.twister-build-prep.outputs.fullrun}} = 'True' ]; then ./scripts/zephyr_module.py --twister-out module_tests.args if [ -s module_tests.args ]; then - ./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PR_OPTIONS} + ./scripts/twister \ + +module_tests.args \ + --outdir module_tests \ + ${TWISTER_COMMON} \ + ${PR_OPTIONS} fi fi