-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (104 loc) · 3.63 KB
/
build.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
99
100
101
102
103
104
105
106
name: Building
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
run-tests-coverage-docs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Get all git tags
run: git fetch --prune --unshallow --tags
- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential \
git \
cmake \
libopencv-dev \
python3-opencv \
libasio-dev \
libboost-dev \
libgoogle-glog-dev \
libyaml-cpp-dev \
qtbase5-dev \
libqt5charts5-dev \
libeigen3-dev \
libprotobuf-dev \
protobuf-compiler \
lcov \
doxygen \
ccache \
python3-pandas \
python3-tqdm
pip install sphinx>=4.2.0 \
sphinx_rtd_theme>=1.0.0 \
breathe \
pybind11
- name: Uses ccache
uses: hendrikmuhs/ccache-action@v1
- name: Configure
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake -B ${{github.workspace}}/build \
-Dpybind11_DIR=$(pip show pybind11 | grep Location | cut -d " " -f 2)/pybind11/share/cmake/pybind11 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_STUDIO=On \
-DENABLE_COVERAGE=On \
-DBUILD_DOCS=On \
-DBUILD_PYTHON=On
- name: Build
working-directory: ${{github.workspace}}/build
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make all
- name: Test
uses: GabrielBB/xvfb-action@v1
with:
run: make coverage
working-directory: ${{github.workspace}}/build
- name: Sends coverage
uses: codecov/codecov-action@v2
id: send-coverage
with:
directory: ${{github.workspace}}/build/coverage
- name: Build documentation
run: make fort-myrmidon-docs
working-directory: ${{github.workspace}}/build/
- name: Uploads documentation
uses: actions/upload-artifact@v2
with:
name: sphinx-documentation
path: ${{github.workspace}}/build/docs/sphinx
deploys-documentation:
runs-on: ubuntu-latest
needs: run-tests-coverage-docs
steps:
- name: Checkout pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Download build documentation
uses: actions/download-artifact@v2
with:
name: sphinx-documentation
path: _build
- name: Copy new build
run: |
set -x
rsync -avh --exclude _static _build/ latest --delete
ln -sf ../_static latest/_static
rsync -avh _build/_static/ _static
./linkVersion.sh
rm -f _static/_static
- name: Deploy
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' }}
with:
branch: gh-pages
folder: .