14 optimize pipeline #22
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: Check code quality | ||
on: | ||
pull_request: | ||
branches: main | ||
jobs: | ||
check-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sudo apt install clang-format | ||
- run: pip install cmakelang | ||
- run: clang-format --dry-run $(git ls-files | grep -E "\.(hpp|cpp)$") | ||
- run: cmake-format --check $(git ls-files | grep -E "(CMakeLists.txt|\.cmake)$") | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: cmake -B build | ||
- run: cmake --build build -t check | ||
configure-chip: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: sudo apt install iwyu gcc-arm-none-eabi clang-tidy | ||
- run: cmake -B build -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain.cmake | ||
iwyu: | ||
needs: configure-chip | ||
Check failure on line 28 in .github/workflows/code-quality.yml GitHub Actions / Check code qualityInvalid workflow file
|
||
steps: | ||
- run: wget https://raw.githubusercontent.com/include-what-you-use/include-what-you-use/clang_15/iwyu_tool.py | ||
- run: chmod +x iwyu_tool.py | ||
- run: "! ./iwyu_tool.py -p build/compile_commands.json | grep should" | ||
clang-tidy: | ||
needs: configure-chip | ||
steps: | ||
- run: git ls-files | grep -E "\.cpp$" | xargs clang-tidy -p build | ||
build: | ||
needs: configure-chip | ||
steps: | ||
- run: cmake --build build -t app | ||
build-test-chip: | ||
needs: configure-chip | ||
steps: | ||
- run: cmake --build build -t check |