ci.yml (1640B)
1 name: GitHubCI 2 3 on: 4 push: 5 branches: [master] 6 pull_request: 7 branches: [master] 8 9 jobs: 10 macOS-gcc: 11 runs-on: macOS-latest 12 steps: 13 - uses: actions/checkout@v2 14 - name: Compile with gcc 15 env: 16 CC: gcc 17 run: | 18 export CFLAGS="$CFLAGS -Werror" 19 make clean 20 make 21 make clean 22 macOS-clang: 23 runs-on: macOS-latest 24 steps: 25 - uses: actions/checkout@v2 26 - name: Compile with clang 27 env: 28 CC: clang 29 run: | 30 # see: https://github.com/actions/setup-python/issues/577 31 brew update || true 32 brew install llvm || true 33 brew unlink python@3.11 && brew link python@3.11 34 export PATH="/usr/local/opt/llvm/bin:$PATH" 35 export PATH="/opt/homebrew/opt/llvm/bin:$PATH" 36 export CFLAGS="$CFLAGS -Werror" 37 make clean 38 make 39 make clean 40 clang-tidy src/* -- -I/usr/include 41 ubuntu-patches: 42 runs-on: ubuntu-latest 43 steps: 44 - uses: actions/checkout@v2 45 - name: Compile patches with gcc 46 env: 47 CC: gcc 48 run: | 49 sudo apt install libreadline-dev 50 make checkpatches 51 ubuntu-cppcheck: 52 runs-on: ubuntu-latest 53 steps: 54 - uses: actions/checkout@v2 55 - name: Static analysis with cppcheck 56 run: | 57 sudo apt install cppcheck libreadline-dev 58 cppcheck --std="c11" --error-exitcode=1 --enable=performance,portability \ 59 --force --inline-suppr --max-ctu-depth=8 -j"$(nproc)" \ 60 $(pkg-config --cflags ncurses) src/nnn.c