From df255490b608d829e1fb97d5b6ad129fe12e960d Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 13:28:24 +0100 Subject: [PATCH 01/10] Create test.md --- test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.md diff --git a/test.md b/test.md new file mode 100644 index 0000000000000..9daeafb9864cf --- /dev/null +++ b/test.md @@ -0,0 +1 @@ +test From 732ea23c0d17b3bfa7745be3dacb5b5179fde7c3 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 15:10:08 +0100 Subject: [PATCH 02/10] Update coding_guidelines.yml --- .github/workflows/coding_guidelines.yml | 49 +------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/.github/workflows/coding_guidelines.yml b/.github/workflows/coding_guidelines.yml index ea632b7f0b2b9..f74aaa7ec9b84 100644 --- a/.github/workflows/coding_guidelines.yml +++ b/.github/workflows/coding_guidelines.yml @@ -7,53 +7,6 @@ jobs: runs-on: ubuntu-22.04 name: Run coding guidelines checks on patch series (PR) steps: - - name: Checkout the code - uses: actions/checkout@v3 - with: - 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 "actions@zephyrproject.org" - 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 - 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 '::error file=zephyr/.github/workflows/coding_guidelines.yml,line=7,title=API-Check Critical:: :red_circle: Field "usage" deleted from structure "pm_device".' From e6faa54e3f3aafdefa5c382919eda3ab58fc6d70 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 15:41:28 +0100 Subject: [PATCH 03/10] Update coding_guidelines.yml --- .github/workflows/coding_guidelines.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coding_guidelines.yml b/.github/workflows/coding_guidelines.yml index f74aaa7ec9b84..f95e2652ca2f8 100644 --- a/.github/workflows/coding_guidelines.yml +++ b/.github/workflows/coding_guidelines.yml @@ -7,6 +7,15 @@ jobs: runs-on: ubuntu-22.04 name: Run coding guidelines checks on patch series (PR) steps: - - name: Install python dependencies + - name: Checkout the code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Test run: | - echo '::error file=zephyr/.github/workflows/coding_guidelines.yml,line=7,title=API-Check Critical:: :red_circle: Field "usage" deleted from structure "pm_device".' + echo '::warning file=.github/workflows/coding_guidelines.yml,line=5,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 "usage" 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 From 41cf6fb499676c6db7c737b8e66a7b17b0ccc971 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 15:46:17 +0100 Subject: [PATCH 04/10] Delete .github/workflows/license_check.yml --- .github/workflows/license_check.yml | 32 ----------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/license_check.yml diff --git a/.github/workflows/license_check.yml b/.github/workflows/license_check.yml deleted file mode 100644 index e869df1fb6328..0000000000000 --- a/.github/workflows/license_check.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Scancode - -on: [pull_request] - -jobs: - scancode_job: - runs-on: ubuntu-22.04 - name: Scan code for licenses - steps: - - name: Checkout the code - uses: actions/checkout@v1 - - name: Scan the code - id: scancode - uses: zephyrproject-rtos/action_scancode@v4 - with: - directory-to-scan: 'scan/' - - name: Artifact Upload - uses: actions/upload-artifact@v3 - with: - name: scancode - path: ./artifacts - - - name: Verify - run: | - if [ -s ./artifacts/report.txt ]; then - report=$(cat ./artifacts/report.txt) - report="${report//'%'/'%25'}" - report="${report//$'\n'/'%0A'}" - report="${report//$'\r'/'%0D'}" - echo "::error file=./artifacts/report.txt::$report" - exit 1 - fi From 288a91c7745b4fd520111792f7dde3c62b674be7 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 15:46:29 +0100 Subject: [PATCH 05/10] Delete .github/workflows/manifest.yml --- .github/workflows/manifest.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/manifest.yml diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml deleted file mode 100644 index 1ea0031fb564e..0000000000000 --- a/.github/workflows/manifest.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Manifest -on: - pull_request_target: - -jobs: - contribs: - runs-on: ubuntu-22.04 - name: Manifest - steps: - - name: Checkout the code - uses: actions/checkout@v3 - with: - path: zephyrproject/zephyr - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - persist-credentials: false - - - name: Manifest - uses: zephyrproject-rtos/action-manifest@a6d0c6e52bbbb7d6df23ceb42842edcb4582b8dc - with: - github-token: ${{ secrets.ZB_GITHUB_TOKEN }} - manifest-path: 'west.yml' - checkout-path: 'zephyrproject/zephyr' - label-prefix: 'manifest-' - verbosity-level: '1' - labels: 'manifest' - dnm-labels: 'DNM' From c578fe423c07ffa9d8b91cc9730ea7cbc2eb8a16 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 15:46:40 +0100 Subject: [PATCH 06/10] Delete .github/workflows/compliance.yml --- .github/workflows/compliance.yml | 90 -------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 .github/workflows/compliance.yml diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml deleted file mode 100644 index f84faff3e4afa..0000000000000 --- a/.github/workflows/compliance.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Compliance Checks - -on: pull_request - -jobs: - check_compliance: - runs-on: ubuntu-22.04 - 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@v3 - with: - 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 setuptools - pip3 install wheel - pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint - pip3 install west - - - name: west setup - env: - BASE_REF: ${{ github.base_ref }} - run: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - git remote -v - # Ensure there's no merge commits in the PR - [[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \ - (echo "::error ::Merge commits not allowed, rebase instead";false) - git rebase origin/${BASE_REF} - # debug - git log --pretty=oneline | head -n 10 - west init -l . || true - west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log - - - 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 --annotate -e KconfigBasic \ - -c origin/${BASE_REF}.. - - - name: upload-results - uses: actions/upload-artifact@v3 - continue-on-error: true - with: - name: compliance.xml - path: compliance.xml - - - name: check-warns - run: | - if [[ ! -s "compliance.xml" ]]; then - exit 1; - fi - - files=($(./scripts/ci/check_compliance.py -l)) - for file in "${files[@]}"; do - f="${file}.txt" - if [[ -s $f ]]; then - errors=$(cat $f) - errors="${errors//'%'/'%25'}" - errors="${errors//$'\n'/'%0A'}" - errors="${errors//$'\r'/'%0D'}" - echo "::error file=${f}::$errors" - exit=1 - fi - done - - if [ "${exit}" == "1" ]; then - exit 1; - fi From 8d5c0b8442a6dffc474a26bfa2c5309406c405ae Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 15:49:16 +0100 Subject: [PATCH 07/10] Update coding_guidelines.yml --- .github/workflows/coding_guidelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coding_guidelines.yml b/.github/workflows/coding_guidelines.yml index f95e2652ca2f8..51ac61c23ec83 100644 --- a/.github/workflows/coding_guidelines.yml +++ b/.github/workflows/coding_guidelines.yml @@ -15,7 +15,7 @@ jobs: - name: Test run: | - echo '::warning file=.github/workflows/coding_guidelines.yml,line=5,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 "usage" deleted from structure "pm_device".' + 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 From ba3493bdd3631214a107dbf4c4d5172510939de4 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 16:26:12 +0100 Subject: [PATCH 08/10] Update test.md --- test.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/test.md b/test.md index 9daeafb9864cf..93d9f94bcd4ae 100644 --- a/test.md +++ b/test.md @@ -1 +1,45 @@ -test +# 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) +〚[recomendations](#structure-field-added)〛 + +: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) +〚[recomendations](#structure-field-added)〛 + +: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) +〚[recomendations](#structure-field-deleted)〛 + +: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) +〚[recomendations](#structure-field-deleted)〛 + +: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) +〚[recomendations](#structure-added)〛 + +# Issue recomendations + +All the issues must be handled according to [compability guildline](#aaaa). + +## :red_circle: Structure field deleted + +Deleting public field in a structure break the API compatibility. +Please folow the guildlines regarding this change. + +## :white_circle: 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. + +## :white_circle: 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. + From e5b59009b0ba568760a952b2c0e979c3e6378a4c Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 16:32:42 +0100 Subject: [PATCH 09/10] Update test.md --- test.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/test.md b/test.md index 93d9f94bcd4ae..d87329c5db84b 100644 --- a/test.md +++ b/test.md @@ -2,39 +2,34 @@ :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) -〚[recomendations](#structure-field-added)〛 +: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) 〚[recomendations](#structure-field-added)〛 -: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) -〚[recomendations](#structure-field-added)〛 +: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) 〚[recomendations](#structure-field-added)〛 :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) -〚[recomendations](#structure-field-deleted)〛 +: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) 〚[recomendations](#structure-field-deleted)〛 -: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) -〚[recomendations](#structure-field-deleted)〛 +: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) 〚[recomendations](#structure-field-deleted)〛 -: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) -〚[recomendations](#structure-added)〛 +: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) 〚[recomendations](#structure-added)〛 # Issue recomendations All the issues must be handled according to [compability guildline](#aaaa). -## :red_circle: Structure field deleted +## Structure field deleted Deleting public field in a structure break the API compatibility. Please folow the guildlines regarding this change. -## :white_circle: Structure added +## 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. -## :white_circle: Structure field added +## 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, From a18502f0ab3056c11a99898fe4bee4d7c5ae3c81 Mon Sep 17 00:00:00 2001 From: Dominik Kilian Date: Fri, 9 Feb 2024 16:36:53 +0100 Subject: [PATCH 10/10] Update test.md --- test.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test.md b/test.md index d87329c5db84b..cc5e805099f8b 100644 --- a/test.md +++ b/test.md @@ -2,17 +2,17 @@ :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) 〚[recomendations](#structure-field-added)〛 +: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) 〚[recomendations](#structure-field-added)〛 +: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) 〚[recomendations](#structure-field-deleted)〛 +: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) 〚[recomendations](#structure-field-deleted)〛 +: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) 〚[recomendations](#structure-added)〛 +: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