actions: clang: do not rebase, use commit range
Avoid rebasing and instead use the commit range. This avoids issues with trees having intermediate rebase data after a reboot (due to cancellation). Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
add37df1bc
commit
9852790811
1 changed files with 4 additions and 6 deletions
10
.github/workflows/clang.yaml
vendored
10
.github/workflows/clang.yaml
vendored
|
@ -23,6 +23,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||||
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||||
outputs:
|
outputs:
|
||||||
report_needed: ${{ steps.twister.outputs.report_needed }}
|
report_needed: ${{ steps.twister.outputs.report_needed }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -48,7 +49,7 @@ jobs:
|
||||||
# So first retry to update, if that does not work, remove all modules
|
# So first retry to update, if that does not work, remove all modules
|
||||||
# and start over. (Workaround until we implement more robust module
|
# and start over. (Workaround until we implement more robust module
|
||||||
# west caching).
|
# west caching).
|
||||||
west update 1> west.update.log || west update 1> west.update-2.log || ( rm -rf ../modules && west update)
|
west update 2>&1 1> west.log || west update 2>&1 1> west2.log || ( rm -rf ../modules && west update)
|
||||||
|
|
||||||
- name: Check Environment
|
- name: Check Environment
|
||||||
run: |
|
run: |
|
||||||
|
@ -64,13 +65,10 @@ jobs:
|
||||||
git config --global user.name "Zephyr Builder"
|
git config --global user.name "Zephyr Builder"
|
||||||
export ZEPHYR_BASE=${PWD}
|
export ZEPHYR_BASE=${PWD}
|
||||||
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
|
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
|
||||||
#
|
|
||||||
git rebase origin/main
|
|
||||||
commit_range="origin/${{github.base_ref}}..HEAD"
|
|
||||||
# check if we need to run a full twister or not based on files changed
|
# check if we need to run a full twister or not based on files changed
|
||||||
SC=$(./scripts/ci/what_changed.py --commits ${commit_range})
|
SC=$(./scripts/ci/what_changed.py --commits ${COMMIT_RANGE}
|
||||||
# Get twister arguments based on the files changed
|
# Get twister arguments based on the files changed
|
||||||
./scripts/ci/get_twister_opt.py --commits ${commit_range}
|
./scripts/ci/get_twister_opt.py --commits ${COMMIT_RANGE}
|
||||||
if [ "$SC" = "full" ]; then
|
if [ "$SC" = "full" ]; then
|
||||||
# Full twister
|
# Full twister
|
||||||
./scripts/twister --inline-logs -M -N -v -p ${{ matrix.platform }} --retry-failed 2
|
./scripts/twister --inline-logs -M -N -v -p ${{ matrix.platform }} --retry-failed 2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue