Skip to content

Commit

Permalink
ci: twister: build native_sim with llvm
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nashif committed Nov 29, 2024
1 parent cd44869 commit cdfccec
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cdfccec

Please sign in to comment.