Skip to content

Commit c02920f

Browse files
author
Fabien Servant
committed
Vcpkg manifest mode
1 parent ca6170e commit c02920f

File tree

2 files changed

+39
-191
lines changed

2 files changed

+39
-191
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 37 additions & 191 deletions
Original file line numberDiff line numberDiff line change
@@ -19,233 +19,80 @@ on:
1919
- 'docs/**'
2020

2121
jobs:
22-
build-linux:
23-
runs-on: ubuntu-latest
24-
container:
25-
image: "alicevision/alicevision-deps:2025.08.05-rocky9-cuda12.1.1"
26-
env:
27-
DEPS_INSTALL_DIR: /opt/AliceVision_install
28-
BUILD_TYPE: Release
29-
CTEST_OUTPUT_ON_FAILURE: 1
30-
ALICEVISION_ROOT: ${{ github.workspace }}/../AV_install
31-
ALICEVISION_SENSOR_DB: ${{ github.workspace }}/../AV_install/share/aliceVision/cameraSensors.db
32-
ALICEVISION_LENS_PROFILE_INFO: ""
33-
steps:
34-
- uses: actions/checkout@v1
35-
36-
- name: Prepare File Tree
37-
run: |
38-
mkdir ./build
39-
mkdir ./build_as_3rdparty
40-
mkdir ./functional_tests
41-
mkdir ../AV_install
42-
43-
- name: Configure CMake
44-
working-directory: ./build
45-
run: |
46-
cmake .. \
47-
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
48-
-DBUILD_SHARED_LIBS=ON \
49-
-DCMAKE_PREFIX_PATH="${DEPS_INSTALL_DIR}" \
50-
-DCMAKE_INSTALL_PREFIX="${ALICEVISION_ROOT}" \
51-
-DTARGET_ARCHITECTURE=core \
52-
-DALICEVISION_BUILD_TESTS=ON \
53-
-DALICEVISION_BUILD_SWIG_BINDING=ON \
54-
-DALICEVISION_USE_OPENCV=ON \
55-
-DALICEVISION_USE_CUDA=ON \
56-
-DALICEVISION_USE_CCTAG=ON \
57-
-DALICEVISION_USE_POPSIFT=ON \
58-
-DALICEVISION_USE_ALEMBIC=ON \
59-
-DOpenCV_DIR="${DEPS_INSTALL_DIR}/share/OpenCV" \
60-
-DALICEVISION_USE_OPENGV=ON \
61-
-DCeres_DIR="${DEPS_INSTALL_DIR}/share/Ceres" \
62-
-DAlembic_DIR="${DEPS_INSTALL_DIR}/lib/cmake/Alembic" \
63-
-DSWIG_DIR="${DEPS_INSTALL_DIR}/share/swig/4.3.0" \
64-
-DSWIG_EXECUTABLE="${DEPS_INSTALL_DIR}/bin-deps/swig" \
65-
-DPython3_EXECUTABLE=/usr/bin/python
6622

67-
- name: Build
68-
working-directory: ./build
69-
run: |
70-
make -j$(nproc)
71-
72-
- name: Install
73-
working-directory: ./build
74-
run: |
75-
make install
76-
77-
- name: Unit Tests
78-
working-directory: ./build
79-
run: |
80-
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
81-
make test
82-
83-
- name: Build As Third Party
84-
working-directory: ./build_as_3rdparty
85-
run: |
86-
cmake ../src/software/utils/aliceVisionAs3rdParty \
87-
-DBUILD_SHARED_LIBS:BOOL=ON \
88-
-DCMAKE_PREFIX_PATH:PATH="$PWD/../../AV_install;${DEPS_INSTALL_DIR}"
89-
make -j$(nproc)
90-
91-
- name: Functional Tests - PanoramaFisheyeHdr Pipeline
92-
working-directory: ./functional_tests
93-
run: |
94-
# Clone required repos
95-
git clone --branch develop https://github.com/alicevision/Meshroom.git
96-
git clone --branch main https://github.com/alicevision/dataset_panoramaFisheyeHdr.git
97-
cd Meshroom/
98-
meshroom_avBranch=$(git ls-remote --heads https://github.com/alicevision/Meshroom.git $GITHUB_HEAD_REF | cut -f 1)
99-
if [ $meshroom_avBranch != "" ]; then git checkout $meshroom_avBranch; echo "Use Meshroom/$GITHUB_HEAD_REF"; fi
100-
101-
# Set environment variables specific to Meshroom
102-
export MESHROOM_INSTALL_DIR=$PWD
103-
export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom
104-
export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom
105-
106-
# Set environment variables to find executables and libraries
107-
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
108-
export PATH=$PATH:${ALICEVISION_ROOT}/bin
109-
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
110-
111-
# Run the test pipeline
112-
python -m pip install psutil
113-
cd bin/
114-
mkdir ./outputData
115-
python meshroom_batch -i $PWD/../../dataset_panoramaFisheyeHdr/RAW -p panoramaFisheyeHdr -o $PWD/../outputData
116-
117-
- name: Functional Tests - SfM Quality Evaluation
118-
working-directory: ./functional_tests
119-
run: |
120-
git clone --branch master https://github.com/alicevision/SfM_quality_evaluation.git
121-
cd SfM_quality_evaluation/
122-
# Checkout a specific commit to ensure repeatability
123-
git checkout 36e3bf2d05c64d1726cb4a0e770923794f203f98
124-
export PYTHONPATH=${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python$:{PYTHONPATH}
125-
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
126-
127-
python EvaluationLauncher.py -s ${ALICEVISION_ROOT}/bin -i $PWD/Benchmarking_Camera_Calibration_2008/ -o $PWD/reconstructions/ -r $PWD/results.json -v
128-
129-
- name: Python Binding - Unit Tests
130-
run: |
131-
export PYTHONPATH=${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
132-
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
133-
python -m pip install pytest
134-
pytest ./pyTests
135-
136-
- name: Meshroom Plugin - Templates validity
137-
working-directory: ./functional_tests
138-
run: |
139-
# Clone and checkout mrSegmentation, align the branch if necessary
140-
git clone https://github.com/meshroomHub/mrSegmentation.git
141-
cd mrSegmentation
142-
mrSegmentation_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrSegmentation.git $GITHUB_HEAD_REF | cut -f 1)
143-
if [ $mrSegmentation_avBranch != "" ]; then git checkout $mrSegmentation_avBranch; echo "Use mrSegmentation/$GITHUB_HEAD_REF"; fi
144-
cd ..
145-
146-
# Clone and checkout mrBlenderSfmRenderer, align the branch if necessary
147-
git clone https://github.com/meshroomHub/mrBlenderSfmRenderer.git
148-
cd mrBlenderSfmRenderer
149-
mrBlenderSfmRenderer_avBranch=$(git ls-remote --heads https://github.com/meshroomHub/mrBlenderSfmRenderer.git $GITHUB_HEAD_REF | cut -f 1)
150-
if [ $mrBlenderSfmRenderer_avBranch != "" ]; then git checkout $mrBlenderSfmRenderer_avBranch; echo "Use mrBlenderSfmRenderer/$GITHUB_HEAD_REF"; fi
151-
cd ../Meshroom/
152-
153-
export MESHROOM_INSTALL_DIR=$PWD
154-
export MESHROOM_NODES_PATH=${MESHROOM_NODES_PATH}:${ALICEVISION_ROOT}/share/meshroom:$PWD/../mrSegmentation/meshroom:$PWD/../mrBlenderSfmRenderer/meshroom
155-
export MESHROOM_PIPELINE_TEMPLATES_PATH=${MESHROOM_PIPELINE_TEMPLATES_PATH}:${ALICEVISION_ROOT}/share/meshroom
156-
export PYTHONPATH=$PWD:${ALICEVISION_ROOT}/lib64/python:${ALICEVISION_ROOT}/lib/python:${PYTHONPATH}
157-
export PATH=$PATH:${ALICEVISION_ROOT}/bin
158-
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
159-
160-
echo "
161-
import sys
162-
from meshroom.core import test
163-
if test.checkAllTemplatesVersions():
164-
sys.exit(0)
165-
sys.exit(1)
166-
" | tee test_templatesVersions.py
167-
python test_templatesVersions.py
16823

16924
build-windows:
17025
runs-on: windows-latest
26+
17127
env:
172-
DEPS_INSTALL_DIR: '${{ github.workspace }}/install'
173-
buildDir: '${{ github.workspace }}/build/'
174-
vcpkgDir: '${{ github.workspace }}\..\vcpkg'
175-
vcpkgArchive: '${{ github.workspace }}\..\vcpkg\installed.zip'
28+
buildDir: '${{ github.workspace }}\build\'
29+
dependenciesDir: '${{ github.workspace }}\dependencies'
30+
archivePath: '${{ github.workspace }}\dependencies\installed.zip'
17631
BUILD_TYPE: Release
17732
CTEST_OUTPUT_ON_FAILURE: 1
178-
ALICEVISION_ROOT: '${{ github.workspace }}/install'
179-
ALICEVISION_LIBPATH: '${{ github.workspace }}/install/bundle/bin'
180-
VCPKG_ROOT: '${{ github.workspace}}\..\vcpkg'
181-
PYTHONPATH: '${{ github.workspace }}/install/bundle/lib/python;${{ github.workspace }}/install/bundle/lib64/python'
33+
ALICEVISION_ROOT: '${{ github.workspace }}\install'
34+
18235
steps:
183-
18436
- name: Checkout
185-
uses: actions/checkout@v2
37+
uses: actions/checkout@v4
18638
with:
18739
submodules: recursive
40+
41+
- name: Set up Visual Studio shell
42+
uses: egor-tensin/vs-shell@v2
43+
with:
44+
arch: x64
18845

189-
- name: Setup Python
46+
- name: Setup python
19047
uses: actions/setup-python@v5
19148
with:
192-
python-version: "3.11"
193-
194-
- name: Install numpy and pytest
195-
run: |
196-
pip install numpy==1.*
197-
pip install pytest
198-
199-
- name: vcpkg - Clone repository
200-
# Uses a specific version of vcpkg
49+
python-version: '3.11'
50+
51+
- name: Install python requirements
20152
run: |
202-
cd ..
203-
git clone https://github.com/alicevision/vcpkg.git
204-
cd vcpkg
205-
cd ${{ github.workspace }}
206-
207-
- name: vcpkg - Bootstrap
53+
pip install -r requirements.txt
54+
55+
- name: create Directories
20856
run: |
209-
${{ env.vcpkgDir }}\bootstrap-vcpkg.bat
57+
mkdir -p ${{ env.dependenciesDir }}
58+
mkdir -p ${{ env.ALICEVISION_ROOT }}
21059
211-
- name: vcpkg - Download zip file with prebuilt binaries
212-
uses: suisei-cn/actions-download-file@v1.3.0
60+
- name: Download zip file with prebuilt binaries
61+
uses: suisei-cn/actions-download-file@v1.6.0
21362
id: vcpkgDownload
21463
with:
215-
url: "https://github.com/alicevision/vcpkg/releases/download/2025.07.08/aliceVisionDeps-2025.07.08.zip"
216-
target: "${{ env.vcpkgDir }}"
64+
url: "https://github.com/alicevision/vcpkg/releases/download/2025.08.22/x64-windows-release.zip"
65+
target: "${{ env.dependenciesDir }}"
21766
filename: installed.zip
21867

21968
- name: vcpkg - Unzip prebuilt binaries
22069
run: |
221-
tar -xvzf "${{ env.vcpkgArchive }}" -C "${{ env.vcpkgDir }}"
222-
223-
- name: vcpkg - Display installed packages
224-
run: |
225-
${{ env.vcpkgDir }}\vcpkg list
226-
70+
tar -xvzf "${{ env.archivePath }}" -C "${{ env.dependenciesDir }}"
71+
22772
- name: vcpkg - Remove zip file with prebuilt binaries
22873
run: |
229-
rm ${{ env.vcpkgArchive }}
74+
rm ${{ env.archivePath }}
23075
23176
- name: Get CUDA Toolkit
23277
uses: Jimver/[email protected]
23378
id: cuda-toolkit
23479
with:
235-
cuda: '12.5.0'
80+
cuda: '12.8.0'
23681
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "cusparse", "npp", "npp_dev", "cufft", "cufft_dev"]'
23782

238-
# Install latest CMake.
83+
23984
- uses: lukka/get-cmake@latest
24085

24186
- name: Build
24287
uses: lukka/run-cmake@v3
24388
with:
89+
cmakeBuildType: Release
90+
buildWithCMake: true
24491
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
24592
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
24693
buildDirectory: ${{ env.buildDir }}
24794
buildWithCMakeArgs: '--config Release --target install'
248-
cmakeAppendedArgs: -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}\scripts\buildsystems\vcpkg.cmake
95+
cmakeAppendedArgs: -DCMAKE_TOOLCHAIN_FILE=${{ env.dependenciesDir }}\x64-windows-release\scripts\buildsystems\vcpkg.cmake
24996
-DVCPKG_TARGET_TRIPLET=x64-windows-release
25097
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
25198
-A x64 -T host=x64
@@ -263,11 +110,9 @@ jobs:
263110
-DALICEVISION_BUILD_SEGMENTATION=OFF
264111
-DALICEVISION_BUILD_SWIG_BINDING=ON
265112
-DALICEVISION_INSTALL_MESHROOM_PLUGIN=OFF
266-
-DPython3_EXECUTABLE=${{ env.pythonLocation }}\python
267113
-DBOOST_NO_CXX11=ON
268-
269-
cmakeBuildType: Release
270-
buildWithCMake: true
114+
-DVCPKG_MANIFEST_MODE=OFF
115+
-DPython3_EXECUTABLE=${{ env.Python3_ROOT_DIR }}\python.exe
271116

272117
- name: Bundle
273118
uses: lukka/run-cmake@v3
@@ -282,7 +127,8 @@ jobs:
282127

283128
- name: Python Binding - Unit Tests
284129
run: |
285-
pytest ./pyTests
130+
$Env:PYTHONPATH = "${{ env.ALICEVISION_ROOT }}/bundle/lib/python"
131+
python -m pytest ./pyTests
286132
287133
- name: Unit Tests
288134
uses: lukka/run-cmake@v3

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,5 @@ Production
7676

7777
**/.vscode
7878
**/.vs
79+
80+
vcpkg_installed/

0 commit comments

Comments
 (0)