-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (70 loc) · 2.39 KB
/
ci.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Continuous Integration
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
jobs:
build_and_check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: install dependencies
run: sudo apt-get install -y autoconf libghc-criterion-dev libcriterion-dev
- name: autoreconf install
run: autoreconf --install
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make clean
run: make clean
clang-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y clang-format
- name: Run clang-format
run: find $(git rev-parse --show-toplevel) -name "*.h" -o -name "*.c" | xargs clang-format -i
- name: Check for changes
run: |
git diff --exit-code
if [ $? -eq 1 ]; then
echo "Code is not clang-format compliant. Please format your code."
exit 1
fi
clang-tidy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: create clang-tidy output file and witness file
run: touch clang_tidy_output.txt clang_tidy_witness.txt
- name: Run clang-tidy script
run: ./.github/workflows/clang_tidy.sh > clang_tidy_output.txt
- name: Check for changes
run: |
diff clang_tidy_output.txt clang_tidy_witness.txt
if [ $? -eq 1 ]; then
echo "Code is not clang-tidy compliant. Please fix your code."
exit 1
fi
doxygen:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y doxygen graphviz
- name: Run doxygen
run: doxygen Doxyfile
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: html