-
Notifications
You must be signed in to change notification settings - Fork 38
177 lines (146 loc) · 6.87 KB
/
buildAndDocumentation.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: CI (linux/macOS/windows)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CONFIG_GLOBAL:
CONFIG_LINUX: -DWITH_MAGICK=true -DWITH_GMP=true -DWITH_FFTW3=true -DWARNING_AS_ERROR=ON -DWITH_HDF5=true -DWITH_QGLVIEWER=true -DWITH_CAIRO=true -DWITH_EIGEN=true -DDGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS=true
CONFIG_MAC: -DWITH_EIGEN=true -DWITH_GMP=tue
CONFIG_WINDOWS: -DWITH_OPENMP=true -DENABLE_CONAN=true #-DWITH_FFTW3=true #-DWITH_CAIRO=true #-DWITH_ITK=true -DWITH_GMP=true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macOS-latest,windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Install linux deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install zsh libqglviewer-dev-qt5 libboost-dev libeigen3-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libgraphicsmagick++1-dev libfftw3-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
- name: Get white list tools
run : |
echo "::set-output name=WHITE_LIST_TOOLS::$(cat ${{runner.workspace}}/DGtalTools/cmake/whiteListBuildTools.txt | tr -d '\n' ; ${{runner.workspace}}/DGtalTools/cmake/create_whitelist.sh ${{runner.workspace}}/DGtalTools)"
id: whitelisttools
- name: Install macOS deps
if: matrix.os == 'macOS-latest'
run: brew install boost ninja eigen gmp
- name: Install conan
if: matrix.os == 'windows-latest'
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.57.0
- name: Create conan default profile
if: matrix.os == 'windows-latest'
run: conan profile new default --detect
- uses: actions/cache@v3
if: matrix.os == 'windows-latest'
with:
path: ~/.conan
key: ${{ runner.os }}-conan-Release
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: DGtalBuild (linux)
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
git clone --depth 1 https://github.com/DGtal-team/DGtal.git
cd DGtal
mkdir buildDGtal
cd buildDGtal
echo cmake .. $CONFIG_LINUX -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja
cmake .. $CONFIG_LINUX -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja
ninja
- name: DGtalBuild (macOS)
if: matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
git clone --depth 1 https://github.com/DGtal-team/DGtal.git
cd DGtal
mkdir buildDGtal
cd buildDGtal
echo cmake .. $CONFIG_MAC -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja
cmake .. $CONFIG_MAC -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja
ninja
- name: DGtalBuild (windows)
if: matrix.os == 'windows-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
git clone --depth 1 https://github.com/DGtal-team/DGtal.git
cd DGtal
mkdir buildDGtal
cd buildDGtal
echo cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_WINDOWS -DBUILD_EXAMPLES=false -DBUILD_TESTING=false
cmake --build . --config Release --parallel 3
- name: Configure CMake (linux)
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DDGtal_DIR=${{runner.workspace}}/build/DGtal/buildDGtal -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL $CONFIG_LINUX -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -DDGTALTOOLS_RANDOMIZED_BUILD_WHITELIST="${{ steps.whitelisttools.outputs.WHITE_LIST_TOOLS }}" -G Ninja
- name: Configure CMake (macOS)
if: matrix.os == 'macOS-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DDGtal_DIR=${{runner.workspace}}/build/DGtal/buildDGtal -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CONFIG_GLOBAL -DDGTALTOOLS_RANDOMIZED_BUILD_THRESHOLD=25 -DDGTALTOOLS_RANDOMIZED_BUILD_WHITELIST="${{ steps.whitelisttools.outputs.WHITE_LIST_TOOLS }}" $CONFIG_MAC -G Ninja
- name: Configure CMake (windows)
if: matrix.os == 'windows-latest'
shell: bash
working-directory: "${{runner.workspace}}/build"
run: cmake $GITHUB_WORKSPACE -DCMAKE_MODULE_PATH="D:/a/DGtalTools/build/DGtal/buildDGtal" -DDGtal_DIR="D:/a/DGtalTools/build/DGtal/buildDGtal" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDGTAL_RANDOMIZED_TESTING_WHITELIST="${{ steps.whitelist.outputs.WHITELIST }}"
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
# Documentation (build, check and deploy)
Documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up
run: |
sudo apt-get update
sudo apt-get install libboost-dev graphviz texlive doxygen libqglviewer-dev-qt5 libeigen3-dev ninja-build libhdf5-serial-dev libboost-dev libcairo2-dev libgmp-dev libgraphicsmagick++1-dev libfftw3-dev
- name: DGtalBuild (linux)
shell: bash
working-directory: ${{runner.workspace}}
run: |
git clone --depth 1 https://github.com/DGtal-team/DGtal.git
cd DGtal
mkdir buildDGtal
cd buildDGtal
echo cmake .. $CONFIG_LINUX -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja
cmake .. $CONFIG_LINUX -DBUILD_EXAMPLES=false -DBUILD_TESTING=false -G Ninja
ninja
- name: Building pages
working-directory: ${{runner.workspace}}/DGtalTools
run: |
mkdir build
cd build
cmake .. -DDGtal_DIR=${{runner.workspace}}/DGtal/buildDGtal
wget --no-check-certificate -O "${{runner.workspace}}/DGtalTools/build/DGtal-tagfile" http://dgtal.org/doc/tags/DGtal-tagfile;
make doc > buildDoc.log
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
with:
token: ${{ secrets.DEPLOYTOKEN }}
branch: master
repository-name: DGtal-team/doctools-nightly
folder: build/html
single-comit: true
clean: true