drv/bluetooth_btstack: Avoid broadcast in tight loop. #2565
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format | |
# TODO: only do this on pull requests and add commit if there is a diff | |
# NB: Paths should match paths defined in ./tools/codeformat.py | |
on: | |
push: | |
paths: | |
- "bricks/**/*.[ch]" | |
- "lib/pbio/**/*.[ch]" | |
- "py/*.[ch]" | |
- "pybricks/**/*.[ch]" | |
- "bricks/**/*.py" | |
- "tests/**/*.py" | |
- "tools/**/*.py" | |
pull_request: | |
paths: | |
- "bricks/**/*.[ch]" | |
- "lib/pbio/**/*.[ch]" | |
- "py/*.[ch]" | |
- "pybricks/**/*.[ch]" | |
- "bricks/**/*.py" | |
- "tests/**/*.py" | |
- "tools/**/*.py" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
format: | |
name: Check code formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install uncrustify | |
run: | | |
sudo apt-add-repository --update --yes ppa:pybricks/ppa | |
sudo apt-get install uncrustify | |
uncrustify --version | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.6' | |
- name: Install black | |
run: python -m pip install black | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Run codeformat.py | |
run: | | |
./tools/codeformat.py | |
git diff --exit-code |