Skip to content

Add TCP Listen and Accept #865

Add TCP Listen and Accept

Add TCP Listen and Accept #865

Workflow file for this run

name: Compliance
on:
pull_request:
jobs:
compliance_job:
runs-on: ubuntu-24.04
name: Run compliance checks on patch series (PR)
# Skip job if it was triggered by Renovate Bot
if: ${{ !contains(github.actor, 'renovate') }}
steps:
- name: Installation
run: |
apt-get update && apt-get install --no-install-recommends -y libmagic1 git
pip install west gitlint
- name: Checkout the code
uses: actions/checkout@v4
with:
path: serial_modem
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Initialize
working-directory: serial_modem
run: |
if [ ! -d "../.west" ]; then
west init -l .
else
echo ".west folder already exists, skipping west init."
fi
west update -o=--depth=1 -n
- name: Install zephyr requirements
run: |
pip install -r zephyr/scripts/requirements-actions.txt
# Junitparser v3 and 4 don't work with check_compliance.py
pip install --upgrade junitparser==2.8.0
- name: Run Compliance Tests
id: compliance
shell: bash
env:
BASE_REF: ${{ github.base_ref }}
working-directory: serial_modem
run: |
# Debug command
ls -la
git log --oneline -n 5
export ZEPHYR_BASE="../zephyr"
$ZEPHYR_BASE/scripts/ci/check_compliance.py \
--annotate \
-e Kconfig \
-e KconfigBasicNoModules \
-e ClangFormat \
-e Ruff \
-e SysbuildKconfigBasicNoModules
- name: Process Compliance Results
working-directory: serial_modem
shell: bash
run: |
# Debug command
ls -la
# Check for compliance.xml existence
if [[ ! -s "compliance.xml" ]]; then
echo "::error::compliance.xml file is missing or empty"
exit 1
fi
# Initialize exit code
exit_code=0
export ZEPHYR_BASE="../zephyr"
files=($($ZEPHYR_BASE/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 f=${f}::$errors"
exit_code=1
fi
done
# Check if compliance test failed
if [[ "$COMPLIANCE_FAILED" == "true" ]]; then
echo "::error::Compliance tests failed. Please check the logs for details."
exit_code=1
fi
exit $exit_code