Skip to content

Commit af74cc5

Browse files
committed
ci: make clang workflow run on push
Signed-off-by: Anas Nashif <[email protected]>
1 parent fafa9e4 commit af74cc5

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

.github/workflows/clang.yaml

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Build with Clang/LLVM
2-
3-
on: pull_request_target
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- v*-branch
7+
- collab-*
48

59
concurrency:
610
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
@@ -10,7 +14,7 @@ jobs:
1014
clang-build:
1115
if: github.repository_owner == 'zephyrproject-rtos'
1216
runs-on:
13-
group: zephyr-runner-v2-linux-x64-4xlarge
17+
group: test-runner-v2-linux-x64-4xlarge
1418
container:
1519
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
1620
options: '--entrypoint /bin/bash'
@@ -23,10 +27,7 @@ jobs:
2327
CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3"
2428
CCACHE_REMOTE_ONLY: "true"
2529
LLVM_TOOLCHAIN_PATH: /usr/lib/llvm-16
26-
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
2730
BASE_REF: ${{ github.base_ref }}
28-
outputs:
29-
report_needed: ${{ steps.twister.outputs.report_needed }}
3031
steps:
3132
- name: Apply container owner mismatch workaround
3233
run: |
@@ -51,7 +52,6 @@ jobs:
5152
- name: Checkout
5253
uses: actions/checkout@v4
5354
with:
54-
ref: ${{ github.event.pull_request.head.sha }}
5555
fetch-depth: 0
5656
persist-credentials: false
5757

@@ -62,7 +62,6 @@ jobs:
6262
git config --global user.name "Zephyr Bot"
6363
rm -fr ".git/rebase-apply"
6464
rm -fr ".git/rebase-merge"
65-
git rebase origin/${BASE_REF}
6665
git clean -f -d
6766
git log --pretty=oneline | head -n 10
6867
west init -l . || true
@@ -107,26 +106,15 @@ jobs:
107106
export ZEPHYR_BASE=${PWD}
108107
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
109108
110-
# check if we need to run a full twister or not based on files changed
111-
python3 ./scripts/ci/test_plan.py --no-detailed-test-id --platform ${{ matrix.platform }} -c origin/${BASE_REF}..
112-
113-
# We can limit scope to just what has changed
114-
if [ -s testplan.json ]; then
115-
echo "report_needed=1" >> $GITHUB_OUTPUT
116-
# Full twister but with options based on changes
117-
./scripts/twister --no-detailed-test-id --force-color --inline-logs -M -N -v --load-tests testplan.json --retry-failed 2
118-
else
119-
# if nothing is run, skip reporting step
120-
echo "report_needed=0" >> $GITHUB_OUTPUT
121-
fi
109+
./scripts/twister -p ${{ matrix.platform }} --no-detailed-test-id --force-color --inline-logs -M -N -v --retry-failed 2
122110
123111
- name: Print ccache stats
124112
if: always()
125113
run: |
126114
ccache -s -vv
127115
128116
- name: Upload Unit Test Results
129-
if: always() && steps.twister.outputs.report_needed != 0
117+
if: always()
130118
uses: actions/upload-artifact@v4
131119
with:
132120
name: Unit Test Results (Subset ${{ matrix.platform }})
@@ -135,8 +123,8 @@ jobs:
135123
clang-build-results:
136124
name: "Publish Unit Tests Results"
137125
needs: clang-build
138-
runs-on: ubuntu-22.04
139-
if: (success() || failure() ) && needs.clang-build.outputs.report_needed != 0
126+
runs-on: ubuntu-24.04
127+
if: (success() || failure())
140128
steps:
141129
- name: Download Artifacts
142130
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)