Skip to content

23 create class interfaces for motion control #33

23 create class interfaces for motion control

23 create class interfaces for motion control #33

Workflow file for this run

name: Check code quality
on:
pull_request:
branches: main
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: mkdir __tmp
- run: sudo apt install clang-15 clang-format clang-tidy-15 libclang-15-dev lld
- run: pip install cmakelang
- run: sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 0
- run: sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 0
- run: cd __tmp && wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
- run: cd __tmp && sudo tar xvf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -C /
- run: cd __tmp && sudo mv /arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi /arm-gcc
- run: cd __tmp && echo /arm-gcc/bin >> $GITHUB_PATH
- run: cd __tmp && git clone --depth=1 -b clang_15 https://github.com/include-what-you-use/include-what-you-use
- run: cd __tmp/include-what-you-use && cmake -B build -DCMAKE_PREFIX_PATH=/usr/lib/llvm-15
- run: cd __tmp/include-what-you-use && sudo cmake --build build -t install -j4
- run: cd __tmp/include-what-you-use && sudo ln -s /usr/local/bin/include-what-you-use /usr/bin/iwyu
- run: cd __tmp/include-what-you-use && sudo mv iwyu_tool.py /usr/bin/
- run: clang-format --dry-run $(git ls-files | grep -E "\.(hpp|cpp)$")
- run: cmake-format --check $(git ls-files | grep -E "(CMakeLists.txt|\.cmake)$")
- run: cmake -B build-host
- run: cmake --build build-host -t check
- run: cmake -B build-chip -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain.cmake
- run: git ls-files | grep -E "\.cpp$" | xargs clang-tidy-15 -p build-chip
- run: "! ./iwyu_tool.py -p build-chip/compile_commands.json -- -Xiwyu --error --target=arm-none-eabi | grep should"
- run: cmake --build build-chip -t app