Skip to content

Commit 7bcfa61

Browse files
committed
Merge remote-tracking branch 'cros/main' into marigold.upstream-merge
2 parents 0956d12 + afe4669 commit 7bcfa61

File tree

18,610 files changed

+500748
-249672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

18,610 files changed

+500748
-249672
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ ForEachMacros:
6767
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
6868
- 'STRUCT_SECTION_FOREACH'
6969
- 'TYPE_SECTION_FOREACH'
70+
- 'K_SPINLOCK'
7071
IfMacros:
7172
- 'CHECKIF'
7273
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520

.github/SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ updates:
88
- The most recent release, and the release prior to that.
99
- Active LTS releases.
1010

11-
At this time, with the latest release of v3.5, the supported
11+
At this time, with the latest release of v3.6, the supported
1212
versions are:
1313

1414
- v2.7: Current LTS
15-
- v3.4: Prior release
16-
- v3.5: Current release
15+
- v3.5: Prior release
16+
- v3.6: Current release
1717

1818
## Reporting process
1919

.github/workflows/assigner.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- ready_for_review
1010
branches:
1111
- main
12+
- collab-*
1213
- v*-branch
1314
issues:
1415
types:
@@ -27,7 +28,7 @@ jobs:
2728
pip3 install -U PyGithub>=1.55 west
2829
2930
- name: Check out source code
30-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3132

3233
- name: Run assignment script
3334
env:

.github/workflows/backport_issue_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Check out source code
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717

1818
- name: Install Python dependencies
1919
run: |

.github/workflows/bsim-tests.yaml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ on:
2020
- "include/zephyr/net/openthread.h"
2121
- "drivers/ieee802154/**"
2222
- "include/zephyr/net/ieee802154*"
23+
- "drivers/serial/*nrfx*"
24+
- "tests/drivers/uart/**"
2325

2426
concurrency:
2527
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
@@ -28,22 +30,21 @@ concurrency:
2830
jobs:
2931
bsim-test:
3032
if: github.repository_owner == 'zephyrproject-rtos'
31-
runs-on: zephyr-runner-linux-x64-4xlarge
33+
runs-on:
34+
group: zephyr-runner-v2-linux-x64-4xlarge
3235
container:
33-
image: ghcr.io/zephyrproject-rtos/ci:v0.26.6
36+
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.9.20240223
3437
options: '--entrypoint /bin/bash'
35-
volumes:
36-
- /repo-cache/zephyrproject:/github/cache/zephyrproject
3738
env:
3839
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
39-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
4040
BSIM_OUT_PATH: /opt/bsim/
4141
BSIM_COMPONENTS_PATH: /opt/bsim/components
4242
EDTT_PATH: ../tools/edtt
4343
bsim_bt_52_test_results_file: ./bsim_bt/52_bsim_results.xml
4444
bsim_bt_53_test_results_file: ./bsim_bt/53_bsim_results.xml
4545
bsim_bt_53split_test_results_file: ./bsim_bt/53_bsim_split_results.xml
4646
bsim_net_52_test_results_file: ./bsim_net/52_bsim_results.xml
47+
bsim_uart_test_results_file: ./bsim_uart/uart_bsim_results.xml
4748
steps:
4849
- name: Apply container owner mismatch workaround
4950
run: |
@@ -53,14 +54,20 @@ jobs:
5354
# GitHub comes up with a fundamental fix for this problem.
5455
git config --global --add safe.directory ${GITHUB_WORKSPACE}
5556
57+
- name: Print cloud service information
58+
run: |
59+
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
60+
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
61+
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
62+
5663
- name: Clone cached Zephyr repository
5764
continue-on-error: true
5865
run: |
59-
git clone --shared /github/cache/zephyrproject/zephyr .
66+
git clone --shared /repo-cache/zephyrproject/zephyr .
6067
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
6168
6269
- name: Checkout
63-
uses: actions/checkout@v3
70+
uses: actions/checkout@v4
6471
with:
6572
fetch-depth: 0
6673

@@ -76,11 +83,13 @@ jobs:
7683
west init -l . || true
7784
west config manifest.group-filter -- +ci
7885
west config --global update.narrow true
79-
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
86+
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)
8087
west forall -c 'git reset --hard HEAD'
8188
89+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
90+
8291
- name: Check common triggering files
83-
uses: tj-actions/changed-files@v35
92+
uses: tj-actions/changed-files@v41
8493
id: check-common-files
8594
with:
8695
files: |
@@ -95,7 +104,7 @@ jobs:
95104
tests/bsim/*
96105
97106
- name: Check if Bluethooth files changed
98-
uses: tj-actions/changed-files@v35
107+
uses: tj-actions/changed-files@v41
99108
id: check-bluetooth-files
100109
with:
101110
files: |
@@ -104,7 +113,7 @@ jobs:
104113
subsys/bluetooth/**
105114
106115
- name: Check if Networking files changed
107-
uses: tj-actions/changed-files@v35
116+
uses: tj-actions/changed-files@v41
108117
id: check-networking-files
109118
with:
110119
files: |
@@ -116,18 +125,27 @@ jobs:
116125
drivers/ieee802154/**
117126
include/zephyr/net/ieee802154*
118127
128+
- name: Check if UART files changed
129+
uses: tj-actions/changed-files@v41
130+
id: check-uart-files
131+
with:
132+
files: |
133+
tests/bsim/drivers/uart/**
134+
drivers/serial/*nrfx*
135+
tests/drivers/uart/**
136+
119137
- name: Update BabbleSim to manifest revision
120138
if: >
121139
steps.check-bluetooth-files.outputs.any_changed == 'true'
122140
|| steps.check-networking-files.outputs.any_changed == 'true'
141+
|| steps.check-uart-files.outputs.any_changed == 'true'
123142
|| steps.check-common-files.outputs.any_changed == 'true'
124143
run: |
125144
export BSIM_VERSION=$( west list bsim -f {revision} )
126145
echo "Manifest points to bsim sha $BSIM_VERSION"
127146
cd /opt/bsim_west/bsim
128147
git fetch -n origin ${BSIM_VERSION}
129-
git config --global advice.detachedHead false
130-
git checkout ${BSIM_VERSION}
148+
git -c advice.detachedHead=false checkout ${BSIM_VERSION}
131149
west update
132150
make everything -s -j 8
133151
@@ -163,22 +181,37 @@ jobs:
163181
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_net_52_test_results_file} \
164182
SEARCH_PATH=tests/bsim/net/ tests/bsim/run_parallel.sh
165183
184+
- name: Run UART Tests with BSIM
185+
if: steps.check-uart-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
186+
run: |
187+
echo "UART: Single device tests"
188+
./scripts/twister -T tests/drivers/uart/ --force-color --inline-logs -v -M -p nrf52_bsim \
189+
--fixture gpio_loopback -- -uart0_loopback
190+
echo "UART: Multi device tests"
191+
export ZEPHYR_BASE=${PWD}
192+
WORK_DIR=${ZEPHYR_BASE}/bsim_uart nice tests/bsim/drivers/uart/compile.sh
193+
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_uart_test_results_file} \
194+
SEARCH_PATH=tests/bsim/drivers/uart/ tests/bsim/run_parallel.sh
195+
166196
- name: Upload Test Results
167197
if: always()
168-
uses: actions/upload-artifact@v3
198+
uses: actions/upload-artifact@v4
169199
with:
170200
name: bsim-test-results
171201
path: |
172202
./bsim_bt/52_bsim_results.xml
173203
./bsim_bt/53_bsim_results.xml
174204
./bsim_bt/53_bsim_split_results.xml
175205
./bsim_net/52_bsim_results.xml
206+
./bsim_uart/uart_bsim_results.xml
207+
./twister-out/twister.xml
208+
./twister-out/twister.json
176209
${{ github.event_path }}
177210
if-no-files-found: warn
178211

179212
- name: Upload Event Details
180213
if: always()
181-
uses: actions/upload-artifact@v3
214+
uses: actions/upload-artifact@v4
182215
with:
183216
name: event
184217
path: |

.github/workflows/bug_snapshot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
- name: Install Python dependencies
2727
run: |

.github/workflows/clang.yaml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ concurrency:
99
jobs:
1010
clang-build:
1111
if: github.repository_owner == 'zephyrproject-rtos'
12-
runs-on: zephyr-runner-linux-x64-4xlarge
12+
runs-on:
13+
group: zephyr-runner-v2-linux-x64-4xlarge
1314
container:
14-
image: ghcr.io/zephyrproject-rtos/ci:v0.26.6
15+
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.9.20240223
1516
options: '--entrypoint /bin/bash'
16-
volumes:
17-
- /repo-cache/zephyrproject:/github/cache/zephyrproject
1817
strategy:
1918
fail-fast: false
2019
matrix:
2120
platform: ["native_sim"]
2221
env:
23-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.4
22+
CCACHE_DIR: /node-cache/ccache-zephyr
23+
CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3"
24+
CCACHE_REMOTE_ONLY: "true"
2425
LLVM_TOOLCHAIN_PATH: /usr/lib/llvm-16
2526
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
2627
BASE_REF: ${{ github.base_ref }}
@@ -35,14 +36,20 @@ jobs:
3536
# GitHub comes up with a fundamental fix for this problem.
3637
git config --global --add safe.directory ${GITHUB_WORKSPACE}
3738
39+
- name: Print cloud service information
40+
run: |
41+
echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
42+
echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
43+
echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
44+
3845
- name: Clone cached Zephyr repository
3946
continue-on-error: true
4047
run: |
41-
git clone --shared /github/cache/zephyrproject/zephyr .
48+
git clone --shared /repo-cache/zephyrproject/zephyr .
4249
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
4350
4451
- name: Checkout
45-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
4653
with:
4754
ref: ${{ github.event.pull_request.head.sha }}
4855
fetch-depth: 0
@@ -64,7 +71,9 @@ jobs:
6471
# So first retry to update, if that does not work, remove all modules
6572
# and start over. (Workaround until we implement more robust module
6673
# west caching).
67-
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
74+
west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject)
75+
76+
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
6877
6978
- name: Check Environment
7079
run: |
@@ -73,31 +82,22 @@ jobs:
7382
gcc --version
7483
ls -la
7584
76-
- name: Prepare ccache timestamp/data
77-
id: ccache_cache_timestamp
78-
shell: cmake -P {0}
85+
- name: Set up ccache
7986
run: |
80-
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
81-
string(REPLACE "/" "_" repo ${{github.repository}})
82-
string(REPLACE "-" "_" repo2 ${repo})
83-
file(APPEND $ENV{GITHUB_OUTPUT} "repo=${repo2}\n")
84-
85-
- name: use cache
86-
id: cache-ccache
87-
uses: zephyrproject-rtos/[email protected]
88-
with:
89-
key: ${{ steps.ccache_cache_timestamp.outputs.repo }}-${{ github.ref_name }}-clang-${{ matrix.platform }}-ccache
90-
path: /github/home/.cache/ccache
91-
aws-s3-bucket: ccache.zephyrproject.org
92-
aws-access-key-id: ${{ vars.AWS_CCACHE_ACCESS_KEY_ID }}
93-
aws-secret-access-key: ${{ secrets.AWS_CCACHE_SECRET_ACCESS_KEY }}
94-
aws-region: us-east-2
95-
96-
- name: ccache stats initial
87+
mkdir -p ${CCACHE_DIR}
88+
ccache -M 10G
89+
ccache -p
90+
ccache -z -s -vv
91+
92+
- name: Update BabbleSim to manifest revision
9793
run: |
98-
mkdir -p /github/home/.cache
99-
test -d github/home/.cache/ccache && rm -rf /github/home/.cache/ccache && mv github/home/.cache/ccache /github/home/.cache/ccache
100-
ccache -M 10G -s
94+
export BSIM_VERSION=$( west list bsim -f {revision} )
95+
echo "Manifest points to bsim sha $BSIM_VERSION"
96+
cd /opt/bsim_west/bsim
97+
git fetch -n origin ${BSIM_VERSION}
98+
git -c advice.detachedHead=false checkout ${BSIM_VERSION}
99+
west update
100+
make everything -s -j 8
101101
102102
- name: Run Tests with Twister
103103
id: twister
@@ -118,14 +118,14 @@ jobs:
118118
echo "report_needed=0" >> $GITHUB_OUTPUT
119119
fi
120120
121-
- name: ccache stats post
121+
- name: Print ccache stats
122+
if: always()
122123
run: |
123-
ccache -s
124-
ccache -p
124+
ccache -s -vv
125125
126126
- name: Upload Unit Test Results
127127
if: always() && steps.twister.outputs.report_needed != 0
128-
uses: actions/upload-artifact@v3
128+
uses: actions/upload-artifact@v4
129129
with:
130130
name: Unit Test Results (Subset ${{ matrix.platform }})
131131
path: twister-out/twister.xml
@@ -137,7 +137,7 @@ jobs:
137137
if: (success() || failure() ) && needs.clang-build.outputs.report_needed != 0
138138
steps:
139139
- name: Download Artifacts
140-
uses: actions/download-artifact@v3
140+
uses: actions/download-artifact@v4
141141
with:
142142
path: artifacts
143143
- name: Merge Test Results
@@ -148,7 +148,7 @@ jobs:
148148
149149
- name: Upload Unit Test Results in HTML
150150
if: always()
151-
uses: actions/upload-artifact@v3
151+
uses: actions/upload-artifact@v4
152152
with:
153153
name: HTML Unit Test Results
154154
if-no-files-found: ignore

0 commit comments

Comments
 (0)