Skip to content

Commit

Permalink
Upgrade compilation option and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Feb 21, 2025
1 parent d55bbff commit 81a23b7
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ SpaceInEmptyParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: "c++17"
Standard: "c++20"
IncludeCategories:
- Regex: '^".*"'
Priority: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
container: ["alicevision/alicevision-deps:2025.01.06-ubuntu22.04-cuda12.1.1", "alicevision/alicevision-deps:2025.01.06-rocky9-cuda12.1.1"]
container: ["alicevision/alicevision-deps:2025.02.21-ubuntu22.04-cuda12.1.1", "alicevision/alicevision-deps:2025.02.21-rocky9-cuda12.1.1"]
container:
image: ${{ matrix.container }}
env:
Expand All @@ -33,7 +33,7 @@ jobs:
ALICEVISION_ROOT: ${{ github.workspace }}/../AV_install
ALICEVISION_SENSOR_DB: ${{ github.workspace }}/../AV_install/share/aliceVision/cameraSensors.db
ALICEVISION_LENS_PROFILE_INFO: ""
BUILD_CCTAG: "${{ matrix.container == 'alicevision/alicevision-deps:2025.01.06-ubuntu22.04-cuda12.1.1' && 'ON' || 'OFF' }}"
BUILD_CCTAG: "${{ matrix.container == 'alicevision/alicevision-deps:2025.02.21-ubuntu22.04-cuda12.1.1' && 'ON' || 'OFF' }}"
steps:
- uses: actions/checkout@v1

Expand Down
17 changes: 11 additions & 6 deletions docker/Dockerfile_ubuntu_deps
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ RUN . ./etc/os-release && \
nasm \
automake \
cmake \
gfortran \
clang-format \
libxerces-c-dev \
gcc-10 \
g++-10 \
cpp-10 \
gcc-12 \
g++-12 \
cpp-12 \
gfortran-12 \
python3-dev \
python3-pip \
libpcre2-dev \
bison && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-12

# Install numpy
RUN python3 -m pip install numpy
Expand Down Expand Up @@ -92,6 +92,7 @@ RUN mkdir -p "${AV_INSTALL}/lib" && \

RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib/x86_64-linux-gnu/libcublas.so /usr/local/cuda/lib64/libcublas.so

# RUN make -j ${CPU_CORES} lapack
# RUN make -j ${CPU_CORES} onnxruntime
# RUN make -j ${CPU_CORES} pcl
# RUN make -j ${CPU_CORES} turbojpeg
Expand All @@ -102,7 +103,6 @@ RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib/x86_64-linux-gn
# RUN make -j ${CPU_CORES} geogram
# RUN make -j ${CPU_CORES} eigen
# RUN make -j ${CPU_CORES} opengv
# RUN make -j ${CPU_CORES} lapack
# RUN make -j ${CPU_CORES} suitesparse
# RUN make -j ${CPU_CORES} ceres
# RUN make -j ${CPU_CORES} tiff
Expand All @@ -115,6 +115,11 @@ RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib/x86_64-linux-gn
# RUN make -j ${CPU_CORES} expat
# RUN make -j ${CPU_CORES} SWIG
# RUN make -j ${CPU_CORES} E57Format
# RUN make -j ${CPU_CORES} LEMON
# RUN make -j ${CPU_CORES} opengv
# RUN make -j ${CPU_CORES} OpenMesh
# RUN make -j ${CPU_CORES} flann
# RUN make -j ${CPU_CORES} clp

# RUN make -j ${CPU_CORES} popsift
# RUN make -j ${CPU_CORES} cctag
Expand Down
2 changes: 1 addition & 1 deletion docker/build-rocky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test -e docker/fetch.sh || {
exit 1
}

test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2025.01.06
test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2025.02.21
test -z "$AV_VERSION" && AV_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)"
test -z "$CUDA_VERSION" && CUDA_VERSION=12.1.1
test -z "$ROCKY_VERSION" && ROCKY_VERSION=9
Expand Down
2 changes: 1 addition & 1 deletion docker/build-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test -e docker/fetch.sh || {
exit 1
}

test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2025.01.06
test -z "$AV_DEPS_VERSION" && AV_DEPS_VERSION=2025.02.21
test -z "$AV_VERSION" && AV_VERSION="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)"
test -z "$CUDA_VERSION" && CUDA_VERSION=12.1.1
test -z "$UBUNTU_VERSION" && UBUNTU_VERSION=22.04
Expand Down
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function(trilean_option NAME DESCRIPTION DEFAULT_VALUE)
endif()
endfunction()

# C++17
set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard used by the project")
# C++20
set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard used by the project")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CUDA_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "The C++ standard used to compile cuda code in the project")
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -732,7 +732,7 @@ if(ALICEVISION_HAVE_CUDA)
list(GET ALICEVISION_CUDA_CC_LIST ${ALICEVISION_CC_LIST_LEN} ALICEVISION_CUDA_CC_LIST_LAST)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-gencode;arch=compute_${ALICEVISION_CUDA_CC_LIST_LAST},code=compute_${ALICEVISION_CUDA_CC_LIST_LAST}")

set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-std=c++17")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-std=c++20")

# default stream legacy implies that the 0 stream synchronizes all streams
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};--default-stream;legacy")
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if(ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET pyalicevision
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(pyalicevision
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET camera
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(camera
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/geometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET geometry
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(geometry
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/hdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET hdr
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(hdr
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/numeric/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET numeric
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(numeric
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/sensorDB/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET sensorDB
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(sensorDB
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/sfmData/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET sfmData
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(sfmData
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/sfmDataIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET sfmDataIO
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(sfmDataIO
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/stl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (ALICEVISION_BUILD_SWIG_BINDING)
)
set_property(
TARGET stl
PROPERTY COMPILE_OPTIONS -std=c++17
PROPERTY COMPILE_OPTIONS -std=c++20
)

target_link_libraries(stl
Expand Down
16 changes: 8 additions & 8 deletions src/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ if(AV_BUILD_TBB)
set(TBB_TARGET tbb)

ExternalProject_Add(${TBB_TARGET}
URL https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.8.0.tar.gz
URL_HASH MD5=392421c6f33ebd00edb57eba36054da9
URL https://github.com/uxlfoundation/oneTBB/archive/refs/tags/v2022.1.0-rc1.tar.gz
URL_HASH MD5=e37f0538269b454c1bf2b5356c2bb617
DOWNLOAD_DIR ${BUILD_DIR}/download/tbb
PREFIX ${BUILD_DIR}
BUILD_IN_SOURCE 0
Expand Down Expand Up @@ -982,8 +982,8 @@ if(AV_BUILD_OPENCV)
set(OPENCV_TARGET opencv)

ExternalProject_Add(opencv_contrib
URL https://github.com/opencv/opencv_contrib/archive/4.7.0.zip
URL_HASH MD5=a3969f1db6732340e492c0323178f6f1
URL https://github.com/opencv/opencv_contrib/archive/refs/tags/4.11.0.tar.gz
URL_HASH MD5=7dd4bc67eb67faff96ce71745a5e3abe
DOWNLOAD_DIR ${BUILD_DIR}/download/opencv_contrib
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/opencv_contrib
BUILD_ALWAYS 0
Expand All @@ -994,8 +994,8 @@ if(AV_BUILD_OPENCV)
)

ExternalProject_Add(${OPENCV_TARGET}
URL https://github.com/opencv/opencv/archive/4.7.0.zip
URL_HASH MD5=481a9ee5b0761978832d02d8861b8156
URL https://github.com/opencv/opencv/archive/refs/tags/4.11.0.tar.gz
URL_HASH MD5=f35fbd46350cc677af13e198805b58f7
DOWNLOAD_DIR ${BUILD_DIR}/download/opencv
UPDATE_COMMAND ""
BUILD_IN_SOURCE 0
Expand Down Expand Up @@ -1271,8 +1271,8 @@ if(AV_BUILD_LEMON)
set(LEMON_TARGET LEMON)

ExternalProject_Add(${LEMON_TARGET}
GIT_REPOSITORY https://github.com/The-OpenROAD-Project/lemon-graph.git
GIT_TAG 62ac75337e5a8d7221823f03e9cc782270cfef4b
GIT_REPOSITORY https://github.com/alicevision/lemon.git
GIT_TAG 90244e2b16301d286ca5087fbb3f0130b6a1812e
DOWNLOAD_DIR ${BUILD_DIR}/download/${LEMON_TARGET}
PREFIX ${BUILD_DIR}
BUILD_IN_SOURCE 0
Expand Down

0 comments on commit 81a23b7

Please sign in to comment.