Skip to content

Upgrade on HDR brackets estimation #3271

Upgrade on HDR brackets estimation

Upgrade on HDR brackets estimation #3271

name: Continuous Integration
on:
push:
branches:
- master
- develop
# Skip jobs when only documentation files are changed
paths-ignore:
- '**.md'
- '**.rst'
- '**.db'
- 'docs/**'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- '**.db'
- 'docs/**'
jobs:
build-linux:
runs-on: ubuntu-latest
container:
image: alicevision/alicevision-deps:2024.08.28-centos7-cuda11.3.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
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_BUILD_SWIG_BINDING: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" \
-DSWIG_DIR:PATH="${DEPS_INSTALL_DIR}/share/swig/4.2.0" \
-DSWIG_EXECUTABLE:PATH="${DEPS_INSTALL_DIR}/bin-deps/swig"
- 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/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/
# select meshroom branch
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
export MESHROOM_INSTALL_DIR=$PWD
export PYTHONPATH=$PWD:${PYTHONPATH}
export PATH=$PATH:${ALICEVISION_ROOT}/bin
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
mkdir ./outputData
cd bin/
python3 --version
pip3 --version
pip3 install psutil
echo "ldd aliceVision_cameraInit"
ldd ${ALICEVISION_ROOT}/bin/aliceVision_cameraInit
python3 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}:${PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
echo "ldd aliceVision_cameraInit"
ldd ${ALICEVISION_ROOT}/bin/aliceVision_cameraInit
python --version
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}:${PYTHONPATH}
export LD_LIBRARY_PATH=${ALICEVISION_ROOT}/lib:${ALICEVISION_ROOT}/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
pip3 install pytest
pytest ./pyTests
build-windows:
runs-on: windows-latest
env:
DEPS_INSTALL_DIR: '${{ github.workspace }}/install'
buildDir: '${{ github.workspace }}/build/'
vcpkgDir: '${{ github.workspace }}\..\vcpkg'
vcpkgArchive: '${{ github.workspace }}\..\vcpkg\installed.zip'
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
ALICEVISION_ROOT: '${{ github.workspace }}/install'
VCPKG_ROOT: '${{ github.workspace}}\..\vcpkg'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: vcpkg - Clone repository
# Uses a specific version of vcpkg
run: |
cd ..
git clone https://github.com/alicevision/vcpkg.git
cd vcpkg
cd ${{ github.workspace }}
- name: vcpkg - Bootstrap
run: |
${{ env.vcpkgDir }}\bootstrap-vcpkg.bat
- name: vcpkg - Download zip file with prebuilt binaries
uses: suisei-cn/actions-download-file@v1.3.0
id: vcpkgDownload
with:
url: "https://gitlab.com/alicevision/vcpkgArchive/-/raw/main/aliceVisionDeps-2024.08.28.zip?ref_type=heads&inline=false"
target: "${{ env.vcpkgDir }}"
filename: installed.zip
- name: vcpkg - Unzip prebuilt binaries
run: |
tar -xvzf "${{ env.vcpkgArchive }}" -C "${{ env.vcpkgDir }}"
- name: vcpkg - Display installed packages
run: |
${{ env.vcpkgDir }}\vcpkg list
- name: vcpkg - Remove zip file with prebuilt binaries
run: |
rm ${{ env.vcpkgArchive }}
- name: Get CUDA Toolkit
uses: Jimver/cuda-toolkit@v0.2.10
id: cuda-toolkit
with:
cuda: '11.6.0'
- 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
# Install latest CMake.
- uses: lukka/get-cmake@latest
- name: Display remaining disk space (16 Go max)
run: |
Get-CimInstance -Class Win32_logicaldisk
- name: Build
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
buildWithCMakeArgs: '--config Release --target install'
cmakeAppendedArgs: -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}\scripts\buildsystems\vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=x64-windows
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-A x64 -T host=x64
-DBUILD_SHARED_LIBS=ON
-DTARGET_ARCHITECTURE=core
-DCMAKE_INSTALL_PREFIX=${{ env.ALICEVISION_ROOT }}
-DALICEVISION_BUILD_TESTS=ON
-DALICEVISION_BUILD_EXAMPLES=OFF
-DALICEVISION_USE_OPENCV=ON
-DALICEVISION_USE_CUDA=ON
-DALICEVISION_USE_CCTAG=OFF
-DALICEVISION_USE_POPSIFT=OFF
-DALICEVISION_USE_ALEMBIC=ON
-DALICEVISION_USE_OPENGV=OFF
-DALICEVISION_BUILD_STEREOPHOTOMETRY=OFF
-DALICEVISION_BUILD_SEGMENTATION=OFF
-DBOOST_NO_CXX11=ON
# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
cmakeBuildType: Release
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'
cmakeAppendedArgs: -DCMAKE_INSTALL_PREFIX:PATH=${{ env.ALICEVISION_ROOT }}
# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
cmakeBuildType: Release
useVcpkgToolchainFile: true
buildWithCMake: true