-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (107 loc) · 2.9 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Testing and release
on:
push:
branches:
- main
- development
tags:
# The regex: /^v?((\d+)(\.\d+)*)(-?(a|b|c|rc|alpha|beta)([0-9]+)?)?$
- 'v[0-9].[0-9]+.[0-9]+*'
pull_request:
branches:
- main
- development
jobs:
build_linux:
name: Build-Test Linux
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Build and test
run: |
mkdir -p build && cd build;
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_CASCTESTS=ON ..
cmake --build . --config Release -j 4
ctest -C Release -V -j 4
build_macos:
name: Build-Test macOS
strategy:
fail-fast: false
matrix:
os: [macos-10.15]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Build and test
run: |
mkdir -p build && cd build;
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_CASCTESTS=ON ..
cmake --build . --config Release -j 4
ctest -C Release -V -j 4
build_windows:
name: Build-Test Windows
strategy:
fail-fast: false
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Build and test
run: |
mkdir -p build && cd build;
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_CASCTESTS=ON ..
cmake --build . --config Release -j 4
ctest -C Release -V -j 4
deploy_documentation:
name: Deploy documentation to Github pages
runs-on: ubuntu-latest
# needs: [build_windows, build_linux, build_macos]
if: github.ref == 'refs/heads/main'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Resolve dependencies
run: sudo apt install doxygen
- name: Get Project Version
id: version
run: |
casc_version=$(git describe --tags --always --dirty)
echo $casc_version
echo ::set-output name=version::$casc_version
- name: Build docs
run: |
mkdir -p build && cd build;
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
cmake --build . --target docs --config Release -j 4
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# destination_dir: /
publish_dir: ./build/html