Skip to content

Commit 21d5f06

Browse files
committed
mod
Signed-off-by: Anas Nashif <[email protected]>
1 parent 2e187c2 commit 21d5f06

File tree

1 file changed

+63
-8
lines changed

1 file changed

+63
-8
lines changed

.github/workflows/coverity.yml

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,65 @@ jobs:
2323
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.0.20250523
2424
options: '--entrypoint /bin/bash'
2525
steps:
26+
- name: Print cloud service information
27+
run: |
28+
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
29+
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
30+
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
31+
32+
- name: Apply container owner mismatch workaround
33+
run: |
34+
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
35+
# match the container user UID because of the way GitHub
36+
# Actions runner is implemented. Remove this workaround when
37+
# GitHub comes up with a fundamental fix for this problem.
38+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
39+
40+
- name: Clone cached Zephyr repository
41+
continue-on-error: true
42+
run: |
43+
git clone --shared /repo-cache/zephyrproject/zephyr .
44+
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
45+
2646
- name: Checkout
2747
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2848
with:
49+
ref: ${{ github.event.pull_request.head.sha }}
2950
fetch-depth: 0
51+
persist-credentials: false
3052

31-
- name: Set Up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
33-
with:
34-
python-version: ${{ matrix.python-version }}
35-
cache: pip
36-
cache-dependency-path: scripts/requirements-actions.txt
53+
- name: Environment Setup
54+
run: |
55+
if [ "${{github.event_name}}" = "pull_request" ]; then
56+
git config --global user.email "[email protected]"
57+
git config --global user.name "Zephyr Builder"
58+
rm -fr ".git/rebase-apply"
59+
rm -fr ".git/rebase-merge"
60+
git rebase origin/${BASE_REF}
61+
git clean -f -d
62+
git log --pretty=oneline | head -n 10
63+
fi
64+
echo "$HOME/.local/bin" >> $GITHUB_PATH
65+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
3766
38-
- name: install-packages
67+
west init -l . || true
68+
west config manifest.group-filter -- +ci,+optional
69+
west config --global update.narrow true
70+
west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject)
71+
west forall -c 'git reset --hard HEAD'
72+
73+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
74+
75+
- name: Check Environment
3976
run: |
40-
pip install -r scripts/requirements-actions.txt --require-hashes
77+
cmake --version
78+
gcc --version
79+
cargo --version
80+
rustup target list --installed
81+
ls -la
82+
echo "github.ref: ${{ github.ref }}"
83+
echo "github.base_ref: ${{ github.base_ref }}"
84+
echo "github.ref_name: ${{ github.ref_name }}"
4185
4286
- name: SCA Setup
4387
uses: zephyrproject-rtos/action-sca-setup@main
@@ -47,6 +91,17 @@ jobs:
4791
s3-access-key-id: ${{ secrets.TOOLDIST_ACCESS_KEY }}
4892
s3-secret-access-key: ${{ secrets.TOOLDIST_SECRET_ACCESS_KEY }}
4993

94+
- name: Set Up Python 3.12
95+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
96+
with:
97+
python-version: 3.12
98+
cache: pip
99+
cache-dependency-path: scripts/requirements-actions.txt
100+
101+
- name: install-packages
102+
run: |
103+
pip install -r scripts/requirements-actions.txt --require-hashes
104+
50105
- name: Check Env
51106
run: |
52107
export COVERITY_OUTPUT_DIR=${PWD}/cov-int

0 commit comments

Comments
 (0)