Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 5 additions & 43 deletions .github/workflows/coding_guidelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,9 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip

- name: Install python dependencies
run: |
pip3 install unidiff
pip3 install wheel
pip3 install sh

- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install coccinelle

- name: Run Coding Guildeines Checks
continue-on-error: true
id: coding_guidelines
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=$PWD
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
git remote -v
git rebase origin/${BASE_REF}
source zephyr-env.sh
# debug
ls -la
git log --pretty=oneline | head -n 10
./scripts/ci/guideline_check.py --output output.txt -c origin/${BASE_REF}..

- name: check-warns
- name: Test
run: |
if [[ -s "output.txt" ]]; then
errors=$(cat output.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=output.txt::$errors"
exit 1;
fi
echo '::warning file=.github/workflows/coding_guidelines.yml,line=1,title=API-Check Warning::Parameter "ptr" type changed in "arch_xtensa_uncached_ptr".'
echo '::error file=.github/workflows/coding_guidelines.yml,line=17,title=API-Check Critical::Field "usage2" deleted from structure "pm_device".'
echo '::notice file=test.md,line=1,title=API-Check Notice::Function "sys_cache_is_ptr_cached" added.'
cat test.md > $GITHUB_STEP_SUMMARY
90 changes: 0 additions & 90 deletions .github/workflows/compliance.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/license_check.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/manifest.yml

This file was deleted.

40 changes: 40 additions & 0 deletions test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# API compatibility issues

:package: **Device Model (`device_model`)**

:white_circle: **Notice:** Field `pm_base` added to `device` structure at [include/zephyr/device.h:415](https://github.com/doki-nordic/zephyr/pull/2/files#diff-6aea4492e95abb93e4d71f06c6cfe42b52c3b78a1edaa62416fc41927334d2b2R1)

:white_circle: **Notice:** Field `pm_isr` added to `device` structure at [include/zephyr/device.h:416](https://github.com/doki-nordic/zephyr/pull/2/files#diff-6aea4492e95abb93e4d71f06c6cfe42b52c3b78a1edaa62416fc41927334d2b2R1)

:package: **Device (`subsys_pm_device`)**

:red_circle: **Critical:** Field `usage` deleted from `pm_device` structure at [include/zephyr/device.h:416](https://github.com/doki-nordic/zephyr/pull/2/files#diff-6aea4492e95abb93e4d71f06c6cfe42b52c3b78a1edaa62416fc41927334d2b2R1)

:red_circle: **Critical:** Field `flags` deleted from `pm_device` structure at [include/zephyr/device.h:417](https://github.com/doki-nordic/zephyr/pull/2/files#diff-6aea4492e95abb93e4d71f06c6cfe42b52c3b78a1edaa62416fc41927334d2b2R1)

:white_circle: **Notice:** New structure "pm_device_isr" added at [include/zephyr/device.h:676](https://github.com/doki-nordic/zephyr/pull/2/files#diff-6aea4492e95abb93e4d71f06c6cfe42b52c3b78a1edaa62416fc41927334d2b2R1)

# Issue recomendations

All the issues must be handled according to [compability guildline](#aaaa).

## Structure field deleted

Deleting public field in a structure break the API compatibility.
Please folow the guildlines regarding this change.

## Structure added

Normally adding a structure does not break an API.
In some rare cases, user is obligated to use some structures.
Make sure that it is not the case.

## Structure field added

Normally adding a field to a structure does not break an API, but there are some cases when it might:
* user is responsible for initializing it,
* user is obligated to handle a value from that field,
* a structure is used as binary data (e.g. it is part of some protocol), so adding a field will break binary compatibility.

If your change affects the API compability, please folow the guildlines.