-
-
Notifications
You must be signed in to change notification settings - Fork 44
76 lines (55 loc) · 1.65 KB
/
c-cpp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: C/C++ CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
strategy:
matrix:
compiler: [gcc, clang]
runs-on: ubuntu-latest
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- name: Install CMake and Clang
run: sudo apt update && sudo apt install -y cmake
- name: Install Clang
if: matrix.compiler == 'clang'
run: sudo apt install -y clang
- name: Tests
run: bash scripts/test.sh
test-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install libevent, CMake, FFMpeg
run: sudo apt update && sudo apt install -y libevent-dev cmake ffmpeg xxd
- name: Test the example server
run: sudo bash scripts/test-server.sh
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libevent
run: sudo apt update && sudo apt install -y clang-format
- name: Download run-clang-format
run: git submodule update --init run-clang-format
- name: Check code formatting
run: bash scripts/check-fmt.sh
deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt update && sudo apt install -y doxygen graphviz
- name: Build the docs
run: bash scripts/docs.sh
- name: Deploy the docs
if: ${{ !env.ACT && github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/