Got/flight controller/clean servocontroller #13
This file contains hidden or 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: ci | |
| on: | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install clang-format | |
| run: sudo apt-get install -y clang-format | |
| - name: Check formatting in /src | |
| run: | | |
| find ./src \( -iname '*.h' -o -iname '*.cpp' \) -print0 | xargs -0 clang-format --dry-run --Werror | |
| check-src-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| src_changed: ${{ steps.filter.outputs.src }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| src: | |
| - 'src/**' | |
| micro-build: | |
| needs: check-src-changes | |
| if: needs.check-src-changes.outputs.src_changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: install build dependancies | |
| run: sudo apt install gcc python3 cmake gcc-arm-none-eabi binutils-arm-none-eabi | |
| - name: microinstall | |
| run: | | |
| chmod +x microinstall.sh | |
| ./microinstall.sh | |
| - name: Add micro-tools to path | |
| run: | | |
| source ./aliases.sh | |
| chmod +x ./aliases.sh | |
| ./aliases.sh | |
| - name: Copy src folder to sdk | |
| run: | | |
| rsync -a --delete ./src/ ./microbit-v2-sdk/source/ | |
| - name: microbuild python | |
| run: | | |
| cd microbit-v2-sdk | |
| python3 build.py |