CI tweaks #2
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
| # Check style of codebase | |
| name: Style | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| ocaml-format: | |
| name: OCamlFormat | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout CN | |
| uses: actions/checkout@v4 | |
| - name: Install OCamlFormat | |
| run: | | |
| sudo apt-get install opam | |
| opam init --yes --no-setup --shell=sh --compiler=5.2.0 | |
| eval $(opam env) | |
| opam install ocamlformat.0.27.0 | |
| - name: Check CN code formatting | |
| run: | | |
| eval $(opam env) | |
| dune build @fmt | |
| clang-format: | |
| name: ClangFormat | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout CN | |
| uses: actions/checkout@v4 | |
| - name: Install ClangFormat | |
| run: | | |
| 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-19 main" | |
| sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" | |
| sudo apt-get update | |
| sudo apt-get install clang-format-19 | |
| - name: Check LibCN code formatting | |
| run: | | |
| find runtime/libcn/ -iname '*.h' -o -iname '*.c' | xargs clang-format-19 --dry-run -Werror | |
| clang-warnings: | |
| name: Clang warnings | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout CN | |
| uses: actions/checkout@v4 | |
| - name: Install Clang | |
| run: | | |
| 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-19 main" | |
| sudo add-apt-repository "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" | |
| sudo apt-get update | |
| sudo apt-get install clang-19 | |
| - name: Check Clang warnings | |
| run: | | |
| find runtime/libcn/ -iname '*.c' | xargs clang-19 -I runtime/libcn/include/ -fsyntax-only -Werror | |
| gcc-warnings: | |
| name: GCC warnings | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout CN | |
| uses: actions/checkout@v4 | |
| - name: Install GCC | |
| run: | | |
| sudo apt-get install gcc-14 | |
| - name: Check GCC warnings | |
| run: | | |
| find runtime/libcn/ -iname '*.c' | xargs gcc-14 -I runtime/libcn/include/ -fsyntax-only -Werror |