-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (86 loc) · 2.42 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
clang_format_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt install -y clang-format
- name: lint
run: |
clang-format --dry-run --Werror \
src/*.c tool/*.c tests/*.c \
include/*.h
clang_tidy:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Install clang-tidy
run: sudo apt install -y clang-tidy libglib2.0-dev
- name: Configure
run: cmake -DCMAKE_INSTALL_PREFIX=/usr -S . -B build_x86
- name: clang-tidy
run: clang-tidy -p build_x86 src/*.c tool/*.c tests/*.c
build:
runs-on: ubuntu-latest
needs: [clang_format_lint, clang_tidy]
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Install dependency libraries
run: sudo apt install -y libglib2.0-dev
- name: Configure
run: cmake -DCMAKE_INSTALL_PREFIX=/usr -S . -B build
- name: Build
run: cmake --build build --parallel -v
- name: Test
run: cd build && make test
- name: Install
run: DESTDIR=out cmake --install build
- name: Build artifacts
uses: actions/upload-artifact@v4
with:
name: files
path: out
deb:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
path: src
- name: Install dependency packages
run: sudo apt install -y libglib2.0-dev doxygen git-buildpackage debhelper cmake
- name: Prepare
run: cd src && cp -a packaging/jammy debian
- name: Packaging
run: cd src && gbp buildpackage -uc -us
- name: Build artifacts
uses: actions/upload-artifact@v4
with:
name: deb
path: ./*.deb
doxygen:
runs-on: ubuntu-latest
needs: [deb]
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Install doxygen
run: sudo apt-get install doxygen graphviz
- name: Generate doxygen
run: doxygen
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: doc/html
clean: true