1616 strategy :
1717 matrix :
1818 config : [
19-
19+ {
20+ os : ubuntu-24.04,
21+ cmakeBuildType : RelWithDebInfo,
22+ asanEnabled : false,
23+ cudaEnabled : false,
24+ checkCodeFormat : true,
25+ },
2026 {
2127 os : ubuntu-22.04,
2228 cmakeBuildType : Release,
3541 os : ubuntu-22.04,
3642 cmakeBuildType : Release,
3743 asanEnabled : true,
38- cudaEnabled : true ,
44+ cudaEnabled : false ,
3945 checkCodeFormat : false,
4046 },
4147 {
@@ -62,14 +68,15 @@ jobs:
6268 key : v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }}
6369 restore-keys : v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}
6470 path : ${{ env.COMPILER_CACHE_DIR }}
65-
6671 - name : Install compiler cache
6772 run : |
6873 mkdir -p "$CCACHE_DIR" "$CTCACHE_DIR"
6974 echo "$COMPILER_CACHE_DIR/bin" >> $GITHUB_PATH
75+
7076 if [ -f "$COMPILER_CACHE_DIR/bin/ccache" ]; then
7177 exit 0
7278 fi
79+
7380 set -x
7481 wget https://github.com/ccache/ccache/releases/download/v4.8.2/ccache-4.8.2-linux-x86_64.tar.xz
7582 echo "0b33f39766fe9db67f40418aed6a5b3d7b2f4f7fab025a8213264b77a2d0e1b1 ccache-4.8.2-linux-x86_64.tar.xz" | sha256sum --check
@@ -81,26 +88,26 @@ jobs:
8188 echo "108b087f156a9fe7da0c796de1ef73f5855d2a33a27983769ea39061359a40fc ${ctcache_commit_id}.zip" | sha256sum --check
8289 unzip "${ctcache_commit_id}.zip"
8390 mv ctcache-${ctcache_commit_id}/clang-tidy* "$COMPILER_CACHE_DIR/bin"
91+
8492 - name : Check code format
8593 if : matrix.config.checkCodeFormat
8694 run : |
8795 set +x -euo pipefail
88- sudo apt-get update && sudo apt-get install -y clang-format-14 black
89- ./scripts/format/clang_format .sh
96+ python -m pip install clang-format==19.1.0
97+ ./scripts/format/c++ .sh
9098 git diff --name-only
9199 git diff --exit-code || (echo "Code formatting failed" && exit 1)
100+
92101 - name : Setup Ubuntu
93102 run : |
94103 sudo apt-get update && sudo apt-get install -y \
95104 build-essential \
96105 cmake \
97106 ninja-build \
98107 libboost-program-options-dev \
99- libboost-filesystem-dev \
100108 libboost-graph-dev \
101109 libboost-system-dev \
102110 libeigen3-dev \
103- libsuitesparse-dev \
104111 libceres-dev \
105112 libflann-dev \
106113 libfreeimage-dev \
@@ -116,7 +123,9 @@ jobs:
116123 libcgal-qt5-dev \
117124 libgl1-mesa-dri \
118125 libunwind-dev \
126+ libcurl4-openssl-dev \
119127 xvfb
128+
120129 if [ "${{ matrix.config.cudaEnabled }}" == "true" ]; then
121130 if [ "${{ matrix.config.os }}" == "ubuntu-20.04" ]; then
122131 sudo apt-get install -y \
@@ -134,16 +143,19 @@ jobs:
134143 echo "CUDAHOSTCXX=/usr/bin/g++-10" >> $GITHUB_ENV
135144 fi
136145 fi
146+
137147 if [ "${{ matrix.config.asanEnabled }}" == "true" ]; then
138148 sudo apt-get install -y clang-15 libomp-15-dev
139149 echo "CC=/usr/bin/clang-15" >> $GITHUB_ENV
140150 echo "CXX=/usr/bin/clang++-15" >> $GITHUB_ENV
141151 fi
152+
142153 if [ "${{ matrix.config.cmakeBuildType }}" == "ClangTidy" ]; then
143154 sudo apt-get install -y clang-15 clang-tidy-15 libomp-15-dev
144155 echo "CC=/usr/bin/clang-15" >> $GITHUB_ENV
145156 echo "CXX=/usr/bin/clang++-15" >> $GITHUB_ENV
146157 fi
158+
147159 - name : Upgrade CMake
148160 run : |
149161 CMAKE_VERSION=3.28.6
@@ -152,6 +164,7 @@ jobs:
152164 tar -xzf ${CMAKE_DIR}.tar.gz
153165 sudo cp -r ${CMAKE_DIR}/* /usr/local/
154166 rm -rf ${CMAKE_DIR}*
167+
155168 - name : Configure and build
156169 run : |
157170 set -x
@@ -167,6 +180,7 @@ jobs:
167180 -DTESTS_ENABLED=ON \
168181 -DASAN_ENABLED=${{ matrix.config.asanEnabled }}
169182 ninja -k 10000
183+
170184 - name : Run tests
171185 if : ${{ matrix.config.cmakeBuildType != 'ClangTidy' }}
172186 run : |
@@ -176,15 +190,17 @@ jobs:
176190 sleep 3
177191 cd build
178192 ctest --output-on-failure -E .+colmap_.*
193+
179194 - name : Cleanup compiler cache
180195 run : |
181196 set -x
182197 ccache --show-stats --verbose
183198 ccache --evict-older-than 1d
184199 ccache --show-stats --verbose
200+
185201 echo "Size of ctcache before: $(du -sh $CTCACHE_DIR)"
186202 echo "Number of ctcache files before: $(find $CTCACHE_DIR | wc -l)"
187203 # Delete cache older than 10 days.
188204 find "$CTCACHE_DIR"/*/ -mtime +10 -print0 | xargs -0 rm -rf
189205 echo "Size of ctcache after: $(du -sh $CTCACHE_DIR)"
190- echo "Number of ctcache files after: $(find $CTCACHE_DIR | wc -l)"''
206+ echo "Number of ctcache files after: $(find $CTCACHE_DIR | wc -l)"
0 commit comments