-
-
Notifications
You must be signed in to change notification settings - Fork 0
220 lines (197 loc) · 8.82 KB
/
continuous-integration.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: Continuous Integration
on:
push:
branches:
- master
- develop
# Skip jobs when only documentation files are changed
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
jobs:
build-linux:
runs-on: ubuntu-latest
container:
image: alicevision/alicevision-deps:ci-2021-10-28-centos7-cuda10.2
env:
DEPS_INSTALL_DIR: /opt/AliceVision_install
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- uses: actions/checkout@v1
- name: Prepare File Tree
run: |
mkdir ./build
mkdir ./build_as_3rdparty
mkdir ./functional_tests
mkdir ../AV_install
git submodule update -i
- name: Configure CMake
working-directory: ./build
run: |
cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_PREFIX_PATH="${DEPS_INSTALL_DIR}" \
-DCMAKE_INSTALL_PREFIX:PATH=$PWD/../../AV_install \
-DTARGET_ARCHITECTURE=core \
-DALICEVISION_BUILD_TESTS:BOOL=ON \
-DALICEVISION_BUILD_EXAMPLES:BOOL=ON \
-DALICEVISION_USE_OPENCV:BOOL=ON \
-DALICEVISION_USE_CUDA:BOOL=ON \
-DALICEVISION_USE_CCTAG:BOOL=ON \
-DALICEVISION_USE_POPSIFT:BOOL=ON \
-DALICEVISION_USE_ALEMBIC:BOOL=ON \
-DOpenCV_DIR:PATH="${DEPS_INSTALL_DIR}/share/OpenCV" \
-DALICEVISION_USE_OPENGV:BOOL=ON \
-DOPENGV_DIR:PATH="${DEPS_INSTALL_DIR}" \
-DBOOST_NO_CXX11:BOOL=ON \
-DCeres_DIR:PATH="${DEPS_INSTALL_DIR}/share/Ceres" \
-DEIGEN_INCLUDE_DIR_HINTS:PATH="${DEPS_INSTALL_DIR}" \
-DAlembic_DIR:PATH="${DEPS_INSTALL_DIR}/lib/cmake/Alembic"
- name: Build
working-directory: ./build
run: |
make -j$(nproc)
- name: Install
working-directory: ./build
run: |
make install
- name: Unit Tests
working-directory: ./build
run: |
make test
- name: Build As Third Party
working-directory: ./build_as_3rdparty
run: |
cmake ../src/samples/aliceVisionAs3rdParty \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_PREFIX_PATH:PATH="$PWD/../../AV_install;${DEPS_INSTALL_DIR}"
make -j$(nproc)
- name: Functional Tests
working-directory: ./functional_tests
run: |
git clone --branch master https://github.com/alicevision/SfM_quality_evaluation.git
cd SfM_quality_evaluation/
# checkout a specific commit to ensure repeatability
git checkout 130d12a0f59ebe1695dafdc42dfe109fe08407ea
export LD_LIBRARY_PATH=$PWD/../../../AV_install/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
echo "ldd aliceVision_cameraInit"
ldd $PWD/../../../AV_install/bin/aliceVision_cameraInit
python EvaluationLauncher.py -s $PWD/../../../AV_install/bin -i $PWD/Benchmarking_Camera_Calibration_2008/ -o $PWD/reconstructions/ -r $PWD/results.json -v
build-windows:
runs-on: windows-latest
env:
DEPS_INSTALL_DIR: '${{ github.workspace }}/install'
buildDir: '${{ github.workspace }}/build/'
vcpkgDir: '${{ github.workspace }}\..\vcpkg'
tripletPath: '${{ github.workspace }}\..\vcpkg\triplets\community\x64-windows-release.cmake'
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
COMMIT_ID: 7678fa940527fa675b3a1eabf3fb77814d0f81e7
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: vcpkg - Clone repository
# Uses a specific version of vcpkg with a fix on Alemnbic portfile (to change once the PR is merged)
# git clone https://github.com/microsoft/vcpkg.git --branch 2021.05.12 https://github.com/DanielDelaporus/vcpkg.git --branch alembic-fix-build-types
run: |
cd ..
git clone https://github.com/fabiencastan/vcpkg.git
cd vcpkg
git checkout ${{ env.COMMIT_ID }}
cd ${{ github.workspace }}
New-Item -Path ${{ env.tripletPath}} -ItemType File
"set(VCPKG_TARGET_ARCHITECTURE x64)" | Out-File -FilePath ${{ env.tripletPath}} -Append
"set(VCPKG_CRT_LINKAGE dynamic)" | Out-File -FilePath ${{ env.tripletPath}} -Append
"set(VCPKG_LIBRARY_LINKAGE dynamic)" | Out-File -FilePath ${{ env.tripletPath}} -Append
"set(VCPKG_BUILD_TYPE release)" | Out-File -FilePath ${{ env.tripletPath}} -Append
- name: vcpkg - Boostrap
run: |
${{ env.vcpkgDir }}\bootstrap-vcpkg.bat
#- uses: Jimver/[email protected]
# id: cuda-toolkit
# with:
# cuda: '11.2.2'
#
#- name: Display CUDA information
# run: echo "Installed cuda version is "${{steps.cuda-toolkit.outputs.cuda}}
# echo "Cuda install location "${{steps.cuda-toolkit.outputs.CUDA_PATH}}
# nvcc -V
# CUDA doesn't seem to handle Custom Build with "Jimver/[email protected]" well raising an error MSB8066 during build
# This needs a fix before implementation
- name: Display remaining disk space (16 Go max)
run: |
Get-CimInstance -Class Win32_logicaldisk
# Install latest CMake.
- uses: lukka/get-cmake@latest
# Restore from cache the previously built ports. If a "cache miss" occurs, then vcpkg is bootstrapped. Since a the vcpkg.json is being used later on to install the packages when run-cmake runs, no packages are installed at this time and the input 'setupOnly:true' is mandatory.
- name: vcpkg - Setup dependencies
uses: lukka/run-vcpkg@v7
with:
# Just install vcpkg for now, do not install any ports in this step yet.
setupOnly: false
# Location of the vcpkg submodule in the Git repository.
vcpkgDirectory: ${{ env.vcpkgDir }}
vcpkgGitCommitId: ${{ env.COMMIT_ID }}
vcpkgArguments: boost-algorithm boost-accumulators boost-atomic boost-container boost-date-time boost-exception boost-filesystem boost-graph boost-log
boost-program-options boost-property-tree boost-ptr-container boost-regex boost-serialization boost-system boost-test boost-thread boost-timer
lz4
openexr
geogram
eigen3
alembic
opencv[eigen,ffmpeg,webp,contrib,nonFree]
openimageio[libraw,ffmpeg,freetype,opencv,gif,webp,opencolorio]
ceres[suitesparse,cxsparse]
tbb
assimp
# without "cuda" for now
vcpkgTriplet: x64-windows-release
# doNotCache: true
# Ensure the vcpkg artifacts are cached, they are generated in the 'CMAKE_BINARY_DIR/vcpkg_installed' directory.
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
- name: vcpkg - Display installed packages
run:
vcpkg list
- name: Build
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release'
cmakeAppendedArgs: -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DBUILD_SHARED_LIBS:BOOL=ON
-DTARGET_ARCHITECTURE=core
-DALICEVISION_BUILD_TESTS:BOOL=ON
-DALICEVISION_BUILD_EXAMPLES:BOOL=ON
-DALICEVISION_USE_OPENCV:BOOL=ON
-DALICEVISION_USE_CUDA:BOOL=OFF
-DALICEVISION_USE_CCTAG:BOOL=OFF
-DALICEVISION_USE_POPSIFT:BOOL=OFF
-DALICEVISION_USE_ALEMBIC:BOOL=ON
-DALICEVISION_USE_OPENGV:BOOL=OFF
# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
cmakeBuildType: Release
useVcpkgToolchainFile: true
buildWithCMake: true
- name: UnitTests
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release --target RUN_TESTS'
# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
cmakeBuildType: Release
useVcpkgToolchainFile: true
buildWithCMake: true