diff --git a/.github/workflows/coding_guidelines.yml b/.github/workflows/coding_guidelines.yml index ea632b7f0b2b9..51ac61c23ec83 100644 --- a/.github/workflows/coding_guidelines.yml +++ b/.github/workflows/coding_guidelines.yml @@ -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 "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 + - 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 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 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 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' diff --git a/test.md b/test.md new file mode 100644 index 0000000000000..cc5e805099f8b --- /dev/null +++ b/test.md @@ -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. +