-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (57 loc) · 1.71 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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y clang-tidy-14 cppcheck doxygen
- name: Download utest.h
run: |
mkdir -p test/source
curl -o test/source/utest.h https://raw.githubusercontent.com/sheredom/utest.h/master/utest.h
- name: Configure
run: |
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=build/install
- name: Build
run: |
cmake --build build --config Release
- name: Install
run: |
cmake --install build --config Release --prefix build/install
- name: Test
working-directory: build
run: |
ctest --output-on-failure --no-tests=error -C Release -- -j 2
docs:
runs-on: ubuntu-22.04
needs: test
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Doxygen
run: sudo apt-get install -y doxygen
- name: Build documentation
run: |
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build --target docs
- name: Deploy documentation to branch
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git checkout --orphan gh-pages
git rm -rf .
cp -r build/docs/html/* .
git add .
git commit -m "Deploy docs"
git push --force origin gh-pages