11name : cesium-native
22on : [push, pull_request]
3+ env :
4+ VCPKG_BINARY_SOURCES : ' clear;x-aws,s3://cesium-builds/vcpkg/cesium-native-cache/,readwrite'
5+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_INTERNAL_SERVICES_VCPKG_ACCESS_KEY }}
6+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_INTERNAL_SERVICES_VCPKG_SECRET_KEY }}
7+ AWS_REGION : us-east-1
38jobs :
49 QuickChecks :
510 name : " Quick Checks"
@@ -17,26 +22,25 @@ jobs:
1722 steps :
1823 - name : Check out repository code
1924 uses : actions/checkout@v4
20- - name : Install ninja
21- uses : seanmiddleditch/gha-setup-ninja@master
22- - name : Install nasm
23- uses : ilammy/setup-nasm@v1
25+ - name : Install latest CMake 3 and Ninja
26+ uses : lukka/get-cmake@latest
27+ with :
28+ cmakeVersion : " 3.31.6 "
2429 - name : ccache
2530 uses : hendrikmuhs/ccache-action@v1.2.9
2631 with :
2732 key : ccache-ubuntu-24.04-clang-clang-tidy
28- - name : Cache vcpkg artifacts
29- uses : actions/cache@v4
30- with :
31- path : ~/.ezvcpkg
32- key : vcpkg-ubuntu-24.04-clang-${{ hashFiles('CMakeLists.txt') }}
33- restore-keys : |
34- vcpkg-ubuntu-24.04-clang-${{ hashFiles('CMakeLists.txt') }}
35- vcpkg-ubuntu-24.04-clang
33+ - name : Install latest clang and clang-tidy
34+ run : |
35+ wget https://apt.llvm.org/llvm.sh
36+ chmod +x llvm.sh
37+ sudo ./llvm.sh 19
38+ sudo apt-get install clang-tidy-19
3639 - name : Set CC and CXX
3740 run : |
38- echo "CC=clang-18" >> "$GITHUB_ENV"
39- echo "CXX=clang++-18" >> "$GITHUB_ENV"
41+ echo "CC=/usr/bin/clang-19" >> "$GITHUB_ENV"
42+ echo "CXX=/usr/bin/clang++-19" >> "$GITHUB_ENV"
43+ echo "VCPKG_ROOT=${VCPKG_INSTALLATION_ROOT}" >> "$GITHUB_ENV"
4044 - name : Make more swap space available
4145 run : |
4246 sudo swapoff -a
@@ -47,39 +51,53 @@ jobs:
4751 sudo swapon --show
4852 - name : Run clang-tidy
4953 run : |
50- cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
51- cmake --build build --target clang-tidy
54+ echo `$CC --version | head -n 1`, `cmake --version | head -n 1`
55+ cp doc/cmake-presets/CMakeUserPresets.json .
56+ cmake --preset=vcpkg-linux -DCMAKE_BUILD_TYPE=Debug -DCESIUM_CLANG_TIDY_USE_THREADS=4
57+ cmake --build build --target clang-tidy > output.log
58+ - name : Print vcpkg problems
59+ if : ${{ failure() }}
60+ run : |
61+ cat "/usr/local/share/vcpkg/buildtrees/doctest/config-x64-linux-dbg-out.log"
62+ cat "/usr/local/share/vcpkg/buildtrees/doctest/config-x64-linux-dbg-err.log"
63+ - name : List clang-tidy warnings & errors
64+ if : ${{ !cancelled() }}
65+ run : |
66+ sed -n '/\(error\|warning\):/,/^$/p' output.log
67+ # On macOS, the above doesn't work because the escaped pipe is not supported.
68+ # Instead, use two commands:
69+ # sed -n '/error:/,/^$/p' output.log
70+ # sed -n '/warning:/,/^$/p' output.log
71+
5272 Documentation :
53- runs-on : ubuntu-22 .04
73+ runs-on : ubuntu-24 .04
5474 steps :
5575 - name : Install Doxygen
5676 run : |
5777 cd ~
58- wget https://github.com/doxygen/doxygen/releases/download/Release_1_12_0 /doxygen-1.12.0 .linux.bin.tar.gz
59- tar xzf doxygen-1.12.0 .linux.bin.tar.gz
60- export PATH=$PWD/doxygen-1.12.0 /bin:$PATH
78+ wget https://github.com/doxygen/doxygen/releases/download/Release_1_13_2 /doxygen-1.13.2 .linux.bin.tar.gz
79+ tar xzf doxygen-1.13.2 .linux.bin.tar.gz
80+ export PATH=$PWD/doxygen-1.13.2 /bin:$PATH
6181 echo "PATH=$PATH" >> "$GITHUB_ENV"
82+ echo "VCPKG_ROOT=${VCPKG_INSTALLATION_ROOT}" >> "$GITHUB_ENV"
6283 doxygen --version
84+ - name : Install latest CMake 3 and Ninja
85+ uses : lukka/get-cmake@latest
86+ with :
87+ cmakeVersion : " 3.31.6"
6388 - name : Check out repository code
6489 uses : actions/checkout@v4
6590 with :
6691 submodules : recursive
6792 - name : ccache
6893 uses : hendrikmuhs/ccache-action@v1.2.9
6994 with :
70- key : ccache-ubuntu-22.04-doxygen
71- - name : Cache vcpkg artifacts
72- uses : actions/cache@v4
73- with :
74- path : ~/.ezvcpkg
75- key : vcpkg-ubuntu-22.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
76- restore-keys : |
77- vcpkg-ubuntu-22.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
78- vcpkg-ubuntu-22.04-doxygen
95+ key : ccache-ubuntu-24.04-doxygen
7996 - name : Generate Documentation
8097 run : |
8198 npm install
82- cmake -B build -S .
99+ cp doc/cmake-presets/CMakeUserPresets.json .
100+ cmake --preset=vcpkg-linux
83101 cmake --build build --target cesium-native-docs
84102 - name : Publish Documentation Artifact
85103 if : ${{ success() }}
@@ -98,8 +116,10 @@ jobs:
98116 CACHE_KEY : " ${{ matrix.platform }}"
99117 runs-on : ${{ matrix.platform }}
100118 steps :
101- - name : Install ninja
102- uses : seanmiddleditch/gha-setup-ninja@master
119+ - name : Install latest CMake 3 and Ninja
120+ uses : lukka/get-cmake@latest
121+ with :
122+ cmakeVersion : " 3.31.6"
103123 - name : Install nasm
104124 uses : ilammy/setup-nasm@v1
105125 - name : Check out repository code
@@ -113,14 +133,11 @@ jobs:
113133 with :
114134 key : ccache-${{ env.CACHE_KEY}}-${{matrix.build_type}}-1
115135 variant : sccache
116- - name : Cache vcpkg artifacts
117- uses : actions/cache@v4
118- with :
119- path : /.ezvcpkg
120- key : vcpkg-${{ env.CACHE_KEY }}-${{ hashFiles('CMakeLists.txt') }}-1
121136 - name : Compile ${{matrix.build_type}} Configuration
122137 run : |
123- cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache -DCMAKE_CXX_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache
138+ $env:VCPKG_ROOT="$env:VCPKG_INSTALLATION_ROOT"
139+ Copy .\doc\cmake-presets\CMakeUserPresets.json .\
140+ cmake --preset=vcpkg-windows -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache -DCMAKE_CXX_COMPILER_LAUNCHER=C:\\Users\\runneradmin\\.cargo\\bin\\sccache
124141 cmake --build build
125142 - name : Test ${{matrix.build_type}} Configuration
126143 run : |
@@ -131,22 +148,24 @@ jobs:
131148 fail-fast : false
132149 matrix :
133150 compiler : [ gcc, clang ]
134- platform : [ ubuntu-22 .04, ubuntu-20 .04, macos-13 ]
151+ platform : [ ubuntu-24 .04, ubuntu-22 .04, macos-13 ]
135152 build_type : [Debug, RelWithDebInfo]
136153 exclude :
137154 - compiler : clang
138- platform : ubuntu-22 .04
155+ platform : ubuntu-24 .04
139156 - compiler : gcc
140157 platform : macos-13
141158 - compiler : gcc
142- platform : ubuntu-20 .04
159+ platform : ubuntu-22 .04
143160 name : " ${{matrix.platform}} / ${{matrix.compiler}} / ${{matrix.build_type}}"
144161 env :
145162 CACHE_KEY : " ${{ matrix.platform }}-${{matrix.compiler}}"
146163 runs-on : ${{ matrix.platform }}
147164 steps :
148- - name : Install ninja
149- uses : seanmiddleditch/gha-setup-ninja@master
165+ - name : Install latest CMake 3 and Ninja
166+ uses : lukka/get-cmake@latest
167+ with :
168+ cmakeVersion : " 3.31.6"
150169 - name : Install nasm
151170 uses : ilammy/setup-nasm@v1
152171 - name : Check out repository code
@@ -157,19 +176,14 @@ jobs:
157176 uses : hendrikmuhs/ccache-action@v1.2.9
158177 with :
159178 key : ccache-${{ env.CACHE_KEY}}-${{matrix.build_type}}
160- - name : Cache vcpkg artifacts
161- uses : actions/cache@v4
162- with :
163- path : ~/.ezvcpkg
164- key : vcpkg-${{ env.CACHE_KEY }}-${{ hashFiles('CMakeLists.txt') }}
165- restore-keys : |
166- vcpkg-${{ env.CACHE_KEY }}-${{ hashFiles('CMakeLists.txt') }}
167- vcpkg-${{ env.CACHE_KEY }}
168179 - name : Set CC and CXX
169180 if : ${{ matrix.compiler == 'clang' && matrix.platform != 'macos-13'}}
170181 run : |
171- echo "CC=clang-12" >> "$GITHUB_ENV"
172- echo "CXX=clang++-12" >> "$GITHUB_ENV"
182+ echo "CC=clang" >> "$GITHUB_ENV"
183+ echo "CXX=clang++" >> "$GITHUB_ENV"
184+ - name : add VCPKG_ROOT
185+ run : |
186+ echo "VCPKG_ROOT=${VCPKG_INSTALLATION_ROOT}" >> "$GITHUB_ENV"
173187 - name : Make more swap space available
174188 if : ${{ matrix.platform != 'macos-13'}}
175189 run : |
@@ -193,10 +207,11 @@ jobs:
193207 set(VCPKG_OSX_ARCHITECTURES x86_64)
194208 " > vcpkg/triplets/x64-macos-10-15.cmake
195209 # Specify the overlay triplet, and also tell cesium-native to build with the same settings.
196- echo "EXTRA_CMAKE_OPTIONS=-DVCPKG_OVERLAY_TRIPLETS=$PWD/vcpkg/triplets -DVCPKG_TRIPLET=x64-macos-10-15 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=x86_64" >> "$GITHUB_ENV"
210+ echo "EXTRA_CMAKE_OPTIONS=-DVCPKG_OVERLAY_TRIPLETS=$PWD/vcpkg/triplets -DVCPKG_TRIPLET=x64-macos-10-15 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DVCPKG_TARGET_TRIPLET=x64-macos-10-15 " >> "$GITHUB_ENV"
197211 - name : Compile ${{matrix.build_type}} Configuration
198212 run : |
199- cmake -B build -S . -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} $EXTRA_CMAKE_OPTIONS
213+ cp doc/cmake-presets/CMakeUserPresets.json .
214+ cmake --preset=vcpkg -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} $EXTRA_CMAKE_OPTIONS
200215 cmake --build build --parallel
201216 - name : Test ${{matrix.build_type}} Configuration
202217 run : |
0 commit comments