Fix build failures and add reproducible development environment through devenv.nix #365
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: "Linting" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| name: "Linux Linting" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: "Installing dependencies" | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y | |
| sudo apt-get install -y --no-install-recommends curl cmake pkg-config findutils wget | |
| sudo apt-get remove -y clang-13 llvm-13 clang-format-13 clang-tidy-13 clang-12 llvm-12 clang-format-12 clang-tidy-12 | |
| sudo apt install -y --no-install-recommends clang-14 llvm-14 clang-format-14 clang-tidy-14 | |
| git submodule update --init --recursive | |
| env: | |
| CC: clang-14 | |
| CXX: clang++-14 | |
| - name: "Generating Compile Commands" | |
| run: | | |
| mkdir -p Debug | |
| pushd Debug | |
| cmake .. | |
| popd | |
| ln -s $PWD/Debug/compile_commands.json $PWD/compile_commands.json | |
| env: | |
| CC: clang-14 | |
| CXX: clang++-14 | |
| - name: Trunk cache | |
| id: cache-trunk | |
| uses: actions/cache@v3.0.4 | |
| with: | |
| path: ~/.cache/trunk/ | |
| key: ${{ runner.os }}-trunk | |
| - name: Trunk Check | |
| uses: trunk-io/trunk-action@v1 |