chore: Add clang-format #10
Workflow file for this run
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: Format Dry Run | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| dry-run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.8' | |
| - name: Install clang-format | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install clang-format | |
| clang-format --version | |
| # wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| # sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | |
| # sudo apt-get update | |
| # sudo apt-get install -y clang-format-18=18.1.8 | |
| # sudo ln -s /usr/bin/clang-format-18 /usr/bin/clang-format | |
| # - name: Run format script with dry_run | |
| # run: | | |
| # python tools/format.py dry_run |