-
-
Notifications
You must be signed in to change notification settings - Fork 873
165 lines (144 loc) · 8.07 KB
/
build-linux.yml
File metadata and controls
165 lines (144 loc) · 8.07 KB
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
name: Build Linux
on:
workflow_call:
jobs:
build-linux:
runs-on: ubuntu-latest
container:
image: "alicevision/alicevision-deps:2026.02.17-rocky9-cuda12.1.1"
env:
DEPS_INSTALL_DIR: /opt/AliceVision_install
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
ALICEVISION_ROOT: ${{ github.workspace }}/../AV_install
ALICEVISION_SENSOR_DB: ${{ github.workspace }}/../AV_install/share/aliceVision/cameraSensors.db
ALICEVISION_LENS_PROFILE_INFO: ""
steps:
- uses: actions/checkout@v1
- name: Prepare File Tree
run: |
mkdir ./build
mkdir ./build_as_3rdparty
mkdir ./functional_tests
mkdir ../AV_install
- name: Configure CMake
working-directory: ./build
run: |
cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_PREFIX_PATH="${DEPS_INSTALL_DIR}" \
-DCMAKE_INSTALL_PREFIX="${ALICEVISION_ROOT}" \
-DTARGET_ARCHITECTURE=core \
-DALICEVISION_BUILD_TESTS=ON \
-DALICEVISION_BUILD_SWIG_BINDING=ON \
-DALICEVISION_USE_OPENCV=ON \
-DALICEVISION_USE_CUDA=ON \
-DALICEVISION_USE_CCTAG=ON \
-DALICEVISION_USE_POPSIFT=ON \
-DALICEVISION_USE_ALEMBIC=ON \
-DOpenCV_DIR="${DEPS_INSTALL_DIR}/share/OpenCV" \
-DCeres_DIR="${DEPS_INSTALL_DIR}/share/Ceres" \
-DAlembic_DIR="${DEPS_INSTALL_DIR}/lib/cmake/Alembic" \
-DSWIG_DIR="${DEPS_INSTALL_DIR}/share/swig/4.3.0" \
-DSWIG_EXECUTABLE="${DEPS_INSTALL_DIR}/bin-deps/swig" \
-DPython3_EXECUTABLE=/usr/bin/python
- name: Build
working-directory: ./build
run: |
make -j$(nproc)
- name: Install
working-directory: ./build
run: |
make install
- name: Unit Tests
working-directory: ./build
run: |
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
make test
- name: Build As Third Party
working-directory: ./build_as_3rdparty
run: |
cmake ../src/software/utils/aliceVisionAs3rdParty \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_PREFIX_PATH:PATH="$PWD/../../AV_install;${DEPS_INSTALL_DIR}"
make -j$(nproc)
- name: Functional Tests - PanoramaFisheyeHdr Pipeline
working-directory: ./functional_tests
run: |
# Clone required repos
git clone --branch develop https://github.com/alicevision/Meshroom.git
git clone --branch main https://github.com/alicevision/dataset_panoramaFisheyeHdr.git
cd Meshroom/
meshroom_avBranch=$(git ls-remote --heads https://github.com/alicevision/Meshroom.git $GITHUB_HEAD_REF | cut -f 1)
if [ $meshroom_avBranch != "" ]; then git checkout $meshroom_avBranch; echo "Use Meshroom/$GITHUB_HEAD_REF"; fi
# Set environment variables specific to Meshroom
export MESHROOM_INSTALL_DIR=$PWD
export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom
export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom
# Set environment variables to find executables and libraries
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
export PATH=$PATH:${ALICEVISION_ROOT}/bin
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
# Run the test pipeline
python -m pip install psutil
cd bin/
mkdir ./outputData
python meshroom_batch -i $PWD/../../dataset_panoramaFisheyeHdr/RAW -p panoramaFisheyeHdr -o $PWD/../outputData
- name: Functional Tests - SfM Quality Evaluation
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 36e3bf2d05c64d1726cb4a0e770923794f203f98
export PYTHONPATH=${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python$:{PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
python EvaluationLauncher.py -s ${ALICEVISION_ROOT}/bin -i $PWD/Benchmarking_Camera_Calibration_2008/ -o $PWD/reconstructions/ -r $PWD/results.json -v
- name: Python Binding - Unit Tests
run: |
export PYTHONPATH=${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
python -m pip install pytest
pytest ./pyTests
- name: Meshroom Plugin - Templates validity
working-directory: ./functional_tests
run: |
# Clone and checkout mrSegmentation, align the branch if necessary
git clone https://github.com/meshroomHub/mrSegmentation.git
cd mrSegmentation
mrSegmentation_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrSegmentation.git $GITHUB_HEAD_REF | cut -f 1)
if [ $mrSegmentation_avBranch != "" ]; then git checkout $mrSegmentation_avBranch; echo "Use mrSegmentation/$GITHUB_HEAD_REF"; fi
cd ..
# Clone and checkout mrBlenderSfmRenderer, align the branch if necessary
git clone https://github.com/meshroomHub/mrBlenderSfmRenderer.git
cd mrBlenderSfmRenderer
mrBlenderSfmRenderer_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrBlenderSfmRenderer.git $GITHUB_HEAD_REF | cut -f 1)
if [ $mrBlenderSfmRenderer_avBranch != "" ]; then git checkout $mrBlenderSfmRenderer_avBranch; echo "Use mrBlenderSfmRenderer/$GITHUB_HEAD_REF"; fi
cd ..
# Clone and checkout mrIntrinsicImageDecomposition, align the branch if necessary
git clone https://github.com/meshroomHub/mrIntrinsicImageDecomposition.git
cd mrIntrinsicImageDecomposition
mrIntrinsicImageDecomposition_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrIntrinsicImageDecomposition.git $GITHUB_HEAD_REF | cut -f 1)
if [ $mrIntrinsicImageDecomposition_avBranch != "" ]; then git checkout $mrIntrinsicImageDecomposition_avBranch; echo "Use mrIntrinsicImageDecomposition/$GITHUB_HEAD_REF"; fi
cd ..
# Clone and checkout mrRoma, align the branch if necessary
git clone https://github.com/meshroomHub/mrRoma.git
cd mrRoma
mrRoma_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrRoma $GITHUB_HEAD_REF | cut -f 1)
if [ $mrRoma_avBranch != "" ]; then git checkout $mrRoma_avBranch; echo "Use mrRoma/$GITHUB_HEAD_REF"; fi
cd ../Meshroom/
export MESHROOM_INSTALL_DIR=$PWD
export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom:$PWD/../mrSegmentation/meshroom:$PWD/../mrBlenderSfmRenderer/meshroom:$PWD/../mrIntrinsicImageDecomposition/meshroom:$PWD/../mrRoma/meshroom
export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
export PATH=$PATH:${ALICEVISION_ROOT}/bin
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
echo "
import sys
from meshroom.core import test
if test.checkAllTemplatesVersions():
sys.exit(0)
sys.exit(1)
" | tee test_templatesVersions.py
python test_templatesVersions.py