1name: Verify Kconfig 2on: 3 push: 4 pull_request: 5 6# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency 7# Ensure that only one commit will be running tests at a time on each push 8concurrency: 9 group: ${{ github.ref }}-${{ github.workflow }} 10 cancel-in-progress: true 11 12jobs: 13 verify-kconfig: 14 if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} 15 runs-on: ubuntu-22.04 16 steps: 17 - name: Checkout 18 uses: actions/checkout@v4 19 with: 20 persist-credentials: false 21 fetch-depth: 0 22 - name: Setup Python 23 uses: actions/setup-python@v5 24 with: 25 python-version: 3.7 26 - name: Check for leading spaces in Kconfig 27 working-directory: . 28 run: | 29 if grep -qP '^ +' Kconfig; then 30 echo "Error: Kconfig contains leading spaces instead of tabs" 31 exit 1 32 fi 33 - name: Run kconfig_verify.py 34 run: python3 -m pip install kconfiglib && python kconfig_verify.py ../Kconfig 35 working-directory: scripts 36