@@ -16,33 +16,44 @@ jobs:
1616 strategy :
1717 matrix :
1818 config : [
19-
19+ {
20+ os : ubuntu-24.04,
21+ cmakeBuildType : RelWithDebInfo,
22+ asanEnabled : false,
23+ cudaEnabled : false,
24+ e2eTests : false,
25+ checkCodeFormat : true,
26+ },
2027 {
2128 os : ubuntu-22.04,
2229 cmakeBuildType : Release,
2330 asanEnabled : false,
2431 cudaEnabled : false,
32+ e2eTests : true,
2533 checkCodeFormat : true,
2634 },
2735 {
2836 os : ubuntu-22.04,
2937 cmakeBuildType : Release,
3038 asanEnabled : false,
3139 cudaEnabled : true,
40+ e2eTests : false,
3241 checkCodeFormat : false,
3342 },
3443 {
3544 os : ubuntu-22.04,
3645 cmakeBuildType : Release,
3746 asanEnabled : true,
38- cudaEnabled : true,
47+ cudaEnabled : false,
48+ e2eTests : false,
3949 checkCodeFormat : false,
4050 },
4151 {
4252 os : ubuntu-22.04,
4353 cmakeBuildType : ClangTidy,
4454 asanEnabled : false,
4555 cudaEnabled : false,
56+ e2eTests : false,
4657 checkCodeFormat : false,
4758 },
4859 ]
@@ -62,14 +73,15 @@ jobs:
6273 key : v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }}
6374 restore-keys : v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}
6475 path : ${{ env.COMPILER_CACHE_DIR }}
65-
6676 - name : Install compiler cache
6777 run : |
6878 mkdir -p "$CCACHE_DIR" "$CTCACHE_DIR"
6979 echo "$COMPILER_CACHE_DIR/bin" >> $GITHUB_PATH
80+
7081 if [ -f "$COMPILER_CACHE_DIR/bin/ccache" ]; then
7182 exit 0
7283 fi
84+
7385 set -x
7486 wget https://github.com/ccache/ccache/releases/download/v4.8.2/ccache-4.8.2-linux-x86_64.tar.xz
7587 echo "0b33f39766fe9db67f40418aed6a5b3d7b2f4f7fab025a8213264b77a2d0e1b1 ccache-4.8.2-linux-x86_64.tar.xz" | sha256sum --check
@@ -81,26 +93,26 @@ jobs:
8193 echo "108b087f156a9fe7da0c796de1ef73f5855d2a33a27983769ea39061359a40fc ${ctcache_commit_id}.zip" | sha256sum --check
8294 unzip "${ctcache_commit_id}.zip"
8395 mv ctcache-${ctcache_commit_id}/clang-tidy* "$COMPILER_CACHE_DIR/bin"
96+
8497 - name : Check code format
8598 if : matrix.config.checkCodeFormat
8699 run : |
87100 set +x -euo pipefail
88- sudo apt-get update && sudo apt-get install -y clang-format-14 black
89- ./scripts/format/clang_format .sh
101+ python -m pip install clang-format==19.1.0
102+ ./scripts/format/c++ .sh
90103 git diff --name-only
91104 git diff --exit-code || (echo "Code formatting failed" && exit 1)
105+
92106 - name : Setup Ubuntu
93107 run : |
94108 sudo apt-get update && sudo apt-get install -y \
95109 build-essential \
96110 cmake \
97111 ninja-build \
98112 libboost-program-options-dev \
99- libboost-filesystem-dev \
100113 libboost-graph-dev \
101114 libboost-system-dev \
102115 libeigen3-dev \
103- libsuitesparse-dev \
104116 libceres-dev \
105117 libflann-dev \
106118 libfreeimage-dev \
@@ -116,7 +128,9 @@ jobs:
116128 libcgal-qt5-dev \
117129 libgl1-mesa-dri \
118130 libunwind-dev \
131+ libcurl4-openssl-dev \
119132 xvfb
133+
120134 if [ "${{ matrix.config.cudaEnabled }}" == "true" ]; then
121135 if [ "${{ matrix.config.os }}" == "ubuntu-20.04" ]; then
122136 sudo apt-get install -y \
@@ -134,16 +148,19 @@ jobs:
134148 echo "CUDAHOSTCXX=/usr/bin/g++-10" >> $GITHUB_ENV
135149 fi
136150 fi
151+
137152 if [ "${{ matrix.config.asanEnabled }}" == "true" ]; then
138153 sudo apt-get install -y clang-15 libomp-15-dev
139154 echo "CC=/usr/bin/clang-15" >> $GITHUB_ENV
140155 echo "CXX=/usr/bin/clang++-15" >> $GITHUB_ENV
141156 fi
157+
142158 if [ "${{ matrix.config.cmakeBuildType }}" == "ClangTidy" ]; then
143159 sudo apt-get install -y clang-15 clang-tidy-15 libomp-15-dev
144160 echo "CC=/usr/bin/clang-15" >> $GITHUB_ENV
145161 echo "CXX=/usr/bin/clang++-15" >> $GITHUB_ENV
146162 fi
163+
147164 - name : Upgrade CMake
148165 run : |
149166 CMAKE_VERSION=3.28.6
@@ -152,6 +169,7 @@ jobs:
152169 tar -xzf ${CMAKE_DIR}.tar.gz
153170 sudo cp -r ${CMAKE_DIR}/* /usr/local/
154171 rm -rf ${CMAKE_DIR}*
172+
155173 - name : Configure and build
156174 run : |
157175 set -x
@@ -167,6 +185,7 @@ jobs:
167185 -DTESTS_ENABLED=ON \
168186 -DASAN_ENABLED=${{ matrix.config.asanEnabled }}
169187 ninja -k 10000
188+
170189 - name : Run tests
171190 if : ${{ matrix.config.cmakeBuildType != 'ClangTidy' }}
172191 run : |
@@ -176,15 +195,17 @@ jobs:
176195 sleep 3
177196 cd build
178197 ctest --output-on-failure -E .+colmap_.*
198+
179199 - name : Cleanup compiler cache
180200 run : |
181201 set -x
182202 ccache --show-stats --verbose
183203 ccache --evict-older-than 1d
184204 ccache --show-stats --verbose
205+
185206 echo "Size of ctcache before: $(du -sh $CTCACHE_DIR)"
186207 echo "Number of ctcache files before: $(find $CTCACHE_DIR | wc -l)"
187208 # Delete cache older than 10 days.
188209 find "$CTCACHE_DIR"/*/ -mtime +10 -print0 | xargs -0 rm -rf
189210 echo "Size of ctcache after: $(du -sh $CTCACHE_DIR)"
190- echo "Number of ctcache files after: $(find $CTCACHE_DIR | wc -l)"''
211+ echo "Number of ctcache files after: $(find $CTCACHE_DIR | wc -l)"
0 commit comments