Skip to content

Commit

Permalink
[github] removing the CUDA image
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDelaporus committed Jul 12, 2021
1 parent a378ddc commit bd63841
Showing 1 changed file with 141 additions and 153 deletions.
294 changes: 141 additions & 153 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,192 +17,180 @@ on:
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest
container:
image: alicevision/alicevision-deps:ci-2021-04-22-centos7-cuda10.2
#build:
# runs-on: ubuntu-latest
# container:
# image: alicevision/alicevision-deps:ci-2021-04-22-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 40ad6a089969cb9426a0b9879c28fbeb08c1a24c
# 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: /opt/AliceVision_install
DEPS_INSTALL_DIR: '${{ github.workspace }}/install'
buildDir: '${{ github.workspace }}/build/'
BUILD_TYPE: Release
tripletPath: '${{ github.workspace }}\vcpkg\triplets\community\x64-windows-release.cmake'
CTEST_OUTPUT_ON_FAILURE: 1
COMMIT_ID: 5568f110b509a9fd90711978a7cb76bae75bb092
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
- name: check remaining space (Before cloning)
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)
Get-CimInstance -Class Win32_logicaldisk
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Install
working-directory: ./build
- name: get vcpkg
run: |
make install
git clone https://github.com/microsoft/vcpkg.git --branch 2021.05.12
- name: Unit Tests
working-directory: ./build
- name: boostrap vcpkg
run: |
make test
${{ github.workspace }}\vcpkg\bootstrap-vcpkg.bat
- name: Build As Third Party
working-directory: ./build_as_3rdparty
- uses: Jimver/cuda-toolkit@v0.2.3
id: cuda-toolkit
with:
cuda: '11.2.2'
- run: echo "Installed cuda version is "${{steps.cuda-toolkit.outputs.cuda}}
- run: echo "Cuda install location "${{steps.cuda-toolkit.outputs.CUDA_PATH}}
- run: nvcc -V

- name: Adding release only triplet
run: |
cmake ../src/samples/aliceVisionAs3rdParty \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_PREFIX_PATH:PATH="$PWD/../../AV_install;${DEPS_INSTALL_DIR}"
make -j$(nproc)
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: Functional Tests
working-directory: ./functional_tests
- name: check remaining space (After cloning)
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 40ad6a089969cb9426a0b9879c28fbeb08c1a24c
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
#container:
# image: alicevision/alicevision-deps:ci-2021-04-22-centos7-cuda10.2
env:
DEPS_INSTALL_DIR: /opt/AliceVision_install #CHANGES THIS TOO
buildDir: '${{ github.workspace }}/build/'
BUILD_TYPE: Release
CTEST_OUTPUT_ON_FAILURE: 1
steps:
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: Restore artifacts, or setup vcpkg (do not install any package)
- name: Setup dependencies with vcpkg
uses: lukka/run-vcpkg@v7
with:
# Just install vcpkg for now, do not install any ports in this step yet.
setupOnly: true
setupOnly: false
# Location of the vcpkg submodule in the Git repository.
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgDirectory: ${{ github.workspace }}\vcpkg
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
opencv[eigen,ffmpeg,webp,contrib,nonFree]
openimageio[libraw,ffmpeg,freetype,opencv,gif,openjpeg,webp,tools]
ceres[suitesparse,cxsparse]
tbb
vcpkgTriplet: x64-windows-release

# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: ${{ hashFiles( '**/vcpkg_manifest/vcpkg.json' ) }}
vcpkgTriplet: ${{ matrix.triplet }}
# Ensure the vcpkg artifacts are cached, they are generated in the 'CMAKE_BINARY_DIR/vcpkg_installed' directory.
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed


- name: Run CMake to install the dependencies specified in the vcpkg.json manifest, generate project file and build the project
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/vcpkg_manifest/CMakeLists.txt'
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
cmakeAppendedArgs: '-DVCPKG_BUILD_TYPE=release'
# This input tells run-cmake to consume the vcpkg.cmake toolchain file set by run-vcpkg.
useVcpkgToolchainFile: true
buildWithCMake: true
#- uses: actions/checkout@v2
#
#- 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 \ #TO CHANGE MOST LIKELY
# -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: Install Make #I am trying this we will see if it works
# uses: crazy-max/ghaction-chocolatey@v1
# with:
# args: install -y make
#
#- 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}" #Same as before, the path should be changed
# 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 40ad6a089969cb9426a0b9879c28fbeb08c1a24c
# winget export LD_LIBRARY_PATH=$PWD/../../../AV_install/lib64:${DEPS_INSTALL_DIR}/lib64:${DEPS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH} #Same as before, the path should be changed (Winget for export ?)
# echo "ldd aliceVision_cameraInit"
# ldd $PWD/../../../AV_install/bin/aliceVision_cameraInit #Same as before, the path should be changed
# python EvaluationLauncher.py -s $PWD/../../../AV_install/bin -i $PWD/Benchmarking_Camera_Calibration_2008/ -o $PWD/reconstructions/ -r $PWD/results.json -v #Same as before, the path should be changed

- name: clean Cmake
run: |
cmake --build ${{ env.buildDir }} --target 'clean'
- name: check dependencies (AFTER INSTALL)
run:
vcpkg list

0 comments on commit bd63841

Please sign in to comment.