Skip to content

Commit

Permalink
Merge pull request zephyrproject-rtos#29 from trond-snekvik/mesh_1_1_…
Browse files Browse the repository at this point in the history
…merge_2021_02_22

Merge upstream Zephyr 2021-02-22
  • Loading branch information
trond-snekvik authored Mar 1, 2021
2 parents b818293 + 2b38e3f commit 0f6500e
Show file tree
Hide file tree
Showing 7,532 changed files with 345,335 additions and 108,123 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions .buildkite/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ steps:
- .buildkite/run.sh
env:
ZEPHYR_TOOLCHAIN_VARIANT: "zephyr"
ZEPHYR_SDK_INSTALL_DIR: "/opt/sdk/zephyr-sdk-0.11.3"
parallelism: 120
ZEPHYR_SDK_INSTALL_DIR: "/opt/sdk/zephyr-sdk-0.12.3"
parallelism: 400
timeout_in_minutes: 210
retry:
manual: true
plugins:
- docker#v3.5.0:
image: "zephyrprojectrtos/ci:v0.11.8"
image: "zephyrprojectrtos/ci:v0.11.15"
propagate-environment: true
volumes:
- "/var/lib/buildkite-agent/git-mirrors:/var/lib/buildkite-agent/git-mirrors"
Expand All @@ -25,7 +25,7 @@ steps:

- plugins:
- junit-annotate#v1.7.0:
artifacts: sanitycheck-*.xml
artifacts: twister-*.xml

notify:
- email: "[email protected]"
Expand Down
6 changes: 6 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
# Save off where we started so we can go back there
WORKDIR=${PWD}

echo "--- $0 disk usage"
df -h
du -hs /var/lib/buildkite-agent/*
docker images -a
docker system df -v

if [ -n "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" ]; then
git fetch -v origin ${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
git checkout FETCH_HEAD
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ steps:
- .buildkite/run.sh
env:
ZEPHYR_TOOLCHAIN_VARIANT: "zephyr"
ZEPHYR_SDK_INSTALL_DIR: "/opt/sdk/zephyr-sdk-0.11.3"
ZEPHYR_SDK_INSTALL_DIR: "/opt/sdk/zephyr-sdk-0.12.3"
parallelism: 20
timeout_in_minutes: 180
retry:
manual: true
plugins:
- docker#v3.5.0:
image: "zephyrprojectrtos/ci:v0.11.8"
image: "zephyrprojectrtos/ci:v0.11.15"
propagate-environment: true
volumes:
- "/var/lib/buildkite-agent/git-mirrors:/var/lib/buildkite-agent/git-mirrors"
Expand All @@ -25,4 +25,4 @@ steps:

- plugins:
- junit-annotate#v1.7.0:
artifacts: sanitycheck-*.xml
artifacts: twister-*.xml
61 changes: 34 additions & 27 deletions .buildkite/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@
# Copyright (c) 2020 Linaro Limited
#
# SPDX-License-Identifier: Apache-2.0
set -eE

function cleanup()
{
# Rename twister junit xml for use with junit-annotate-buildkite-plugin
# create dummy file if twister did nothing
if [ ! -f twister-out/twister.xml ]; then
touch twister-out/twister.xml
fi
mv twister-out/twister.xml twister-${BUILDKITE_JOB_ID}.xml
buildkite-agent artifact upload twister-${BUILDKITE_JOB_ID}.xml


# Upload test_file to get list of tests that are build/run
if [ -f test_file.txt ]; then
buildkite-agent artifact upload test_file.txt
fi

# ccache stats
echo "--- ccache stats at finish"
ccache -s

# disk usage
echo "--- disk usage at finish"
df -h
}

trap cleanup ERR

echo "--- run $0"

Expand All @@ -21,18 +49,15 @@ echo ""
echo "--- ccache stats at start"
ccache -s

# Temporary fix: Install lpc_checksum, needed to build images for
# lpcxpresso11u68 boards
pip3 install lpc_checksum

if [ -n "${DAILY_BUILD}" ]; then
SANITYCHECK_OPTIONS=" --inline-logs -N --build-only --all --retry-failed 3 -v "
TWISTER_OPTIONS=" --inline-logs -N --build-only --all --retry-failed 3 -v "
echo "--- DAILY BUILD"
west init -l .
west update 1> west.update.log
west update 1> west.update.log || west update 1> west.update-2.log
west forall -c 'git reset --hard HEAD'
source zephyr-env.sh
./scripts/sanitycheck --subset ${JOB_NUM}/${BUILDKITE_PARALLEL_JOB_COUNT} ${SANITYCHECK_OPTIONS}
./scripts/twister --subset ${JOB_NUM}/${BUILDKITE_PARALLEL_JOB_COUNT} ${TWISTER_OPTIONS}
else
if [ -n "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" ]; then
./scripts/ci/run_ci.sh -c -b ${BUILDKITE_PULL_REQUEST_BASE_BRANCH} -r origin \
Expand All @@ -43,26 +68,8 @@ else
fi
fi

SANITY_EXIT_STATUS=$?

# Rename sanitycheck junit xml for use with junit-annotate-buildkite-plugin
# create dummy file if sanitycheck did nothing
if [ ! -f sanity-out/sanitycheck.xml ]; then
touch sanity-out/sanitycheck.xml
fi
mv sanity-out/sanitycheck.xml sanitycheck-${BUILDKITE_JOB_ID}.xml
buildkite-agent artifact upload sanitycheck-${BUILDKITE_JOB_ID}.xml


# Upload test_file to get list of tests that are build/run
buildkite-agent artifact upload test_file.txt

# ccache stats
echo "--- ccache stats at finish"
ccache -s
TWISTER_EXIT_STATUS=$?

# disk usage
echo "--- disk usage at finish"
df -h
cleanup

exit ${SANITY_EXIT_STATUS}
exit ${TWISTER_EXIT_STATUS}
10 changes: 9 additions & 1 deletion .checkpatch.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--emacs
--summary-file
--show-types
--max-line-length=80
--max-line-length=100
--min-conf-desc-length=1
--typedefsfile=scripts/checkpatch/typedefsfile

Expand All @@ -11,6 +11,7 @@
--ignore VOLATILE
--ignore CONFIG_EXPERIMENTAL
--ignore PREFER_KERNEL_TYPES
--ignore PREFER_SECTION
--ignore AVOID_EXTERNS
--ignore NETWORKING_BLOCK_COMMENT_STYLE
--ignore DATE_TIME
Expand All @@ -19,4 +20,11 @@
--ignore FILE_PATH_CHANGES
--ignore SPDX_LICENSE_TAG
--ignore C99_COMMENT_TOLERANCE
--ignore REPEATED_WORD
--ignore UNDOCUMENTED_DT_STRING
--ignore DT_SPLIT_BINDING_PATCH
--ignore DT_SCHEMA_BINDING_PATCH
--ignore TRAILING_SEMICOLON
--ignore COMPLEX_MACRO
--ignore MULTISTATEMENT_MACRO_USE_DO_WHILE
--exclude ext
19 changes: 15 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"Release Notes":
- "doc/releases/**/*"
"area: Modem":
- "drivers/modem/**/*"
"area: PWM":
Expand Down Expand Up @@ -26,7 +28,6 @@
- "lib/libc/**/*"
"area: Devicetree":
- "dts/**/*"
- "!dts/bindings/**/*"
- "**/*.dts"
- "**/*.dtsi"
- "include/devicetree.h"
Expand Down Expand Up @@ -56,6 +57,9 @@
"area: ARM":
- "arch/arm/**/*"
- "include/arch/arm/**/*"
"area: ARM_64":
- "arch/arm/core/aarch64/**/*"
- "include/arch/arm/aarch64/**/*"
"area: NIOS2":
- "arch/nios2/**/*"
- "include/arch/nios2/**/*"
Expand Down Expand Up @@ -98,6 +102,13 @@
- "**/*bluetooth*"
"area: Bluetooth Mesh":
- "subsys/bluetooth/mesh/**/*"
"area: Bluetooth Audio":
- "subsys/bluetooth/audio/**/*"
"area: Bluetooth Controller":
- "subsys/bluetooth/controller/**/*"
"area: Bluetooth Host":
- "subsys/bluetooth/host/**/*"
- "subsys/bluetooth/services/**/*"
"area: API":
- "include/**/*"
"area: Samples":
Expand All @@ -117,9 +128,9 @@
- "scripts/kconfig/**/*"
- "Kconfig"
- "Kconfig.zephyr"
"area: Sanitycheck":
- "scripts/sanitycheck"
- "scripts/sanity_chk/**/*"
"area: Twister":
- "scripts/twister"
- "scripts/pylib/twister/**/*"
"area: Modules":
- "west.yml"
- "modules/**/*"
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
branches:
- master

jobs:
backport:
runs-on: ubuntu-18.04
name: Backport
steps:
- name: Backport
uses: zephyrproject-rtos/[email protected]
with:
github_token: ${{ secrets.ZB_GITHUB_TOKEN }}
110 changes: 40 additions & 70 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ jobs:
runs-on: ubuntu-latest
name: Run compliance checks on patch series (PR)
steps:
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout the code
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: cache-pip
uses: actions/cache@v1
Expand All @@ -20,20 +27,33 @@ jobs:
run: |
pip3 install setuptools
pip3 install wheel
pip3 install python-magic junitparser gitlint pylint pykwalify
pip3 install python-magic junitparser==1.6.3 gitlint pylint pykwalify
pip3 install west
- name: Run Compliance Tests
id: compliance
- name: west setup
env:
BASE_REF: ${{ github.base_ref }}
run: |
export PATH=$PATH:~/.local/bin
export ZEPHYR_BASE=$PWD
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git remote -v
git rebase origin/${BASE_REF}
./scripts/ci/check_compliance.py -m Codeowners -m Devicetree -m Gitlint -m Identity -m Nits -m pylint -m checkpatch -m Kconfig -c origin/${BASE_REF}.. || true
# debug
git log --pretty=oneline | head -n 10
west init -l . || true
west update
- name: Run Compliance Tests
continue-on-error: true
id: compliance
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=$PWD
# debug
ls -la
git log --pretty=oneline | head -n 10
./scripts/ci/check_compliance.py -m Codeowners -m Devicetree -m Gitlint -m Identity -m Nits -m pylint -m checkpatch -m Kconfig -c origin/${BASE_REF}..
- name: upload-results
uses: actions/upload-artifact@master
Expand All @@ -44,71 +64,21 @@ jobs:

- name: check-warns
run: |
if [ -s Nits.txt ]; then
errors=$(cat Nits.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Nits.txt::$errors"
exit=1
fi
if [ -s checkpatch.txt ]; then
errors=$(cat checkpatch.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Checkpatch.txt::$errors"
exit=1
fi
if [ -s Identity.txt ]; then
errors=$(cat Identity.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Identity.txt::$errors"
exit=1
fi
if [ -s Gitlint.txt ]; then
errors=$(cat Gitlint.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Gitlint.txt::$errors"
exit=1
fi
if [ -s pylint.txt ]; then
errors=$(cat pylint.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=pylint.txt::$errors"
exit=1
fi
if [ -s Devicetree.txt ]; then
errors=$(cat Devicetree.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Devicetree.txt::$errors"
exit=1
fi
if [ -s Kconfig.txt ]; then
errors=$(cat Kconfig.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Kconfig.txt::$errors"
exit=1
fi
if [ -s Codeowners.txt ]; then
errors=$(cat Codeowners.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=Codeowners.txt::$errors"
exit=1
if [[ ! -s "compliance.xml" ]]; then
exit 1;
fi
for file in Nits.txt checkpatch.txt Identity.txt Gitlint.txt pylint.txt Devicetree.txt Kconfig.txt Codeowners.txt; do
if [[ -s $file ]]; then
errors=$(cat $file)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=${file}::$errors"
exit=1
fi
done
if [ ${exit} == 1 ]; then
exit 1;
fi
Loading

0 comments on commit 0f6500e

Please sign in to comment.