Skip to content

Commit 84059f0

Browse files
authored
Merge branch 'main' into add-gltf-converting-for-vctr
2 parents 2645941 + 8f17045 commit 84059f0

File tree

762 files changed

+49621
-7668
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

762 files changed

+49621
-7668
lines changed

.clang-tidy

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Checks:
1717
- "bugprone-dynamic-static-initializers"
1818
- "-bugprone-easily-swappable-parameters"
1919
- "bugprone-empty-catch"
20-
- "bugprone-exception-escape"
20+
# See https://github.com/CesiumGS/cesium-native/issues/348
21+
#- "bugprone-exception-escape"
2122
- "bugprone-fold-init-type"
2223
- "bugprone-forward-declaration-namespace"
2324
- "bugprone-forwarding-reference-overload"
@@ -36,7 +37,8 @@ Checks:
3637
- "bugprone-macro-repeated-side-effects"
3738
- "bugprone-misplaced-operator-in-strlen-in-alloc"
3839
- "bugprone-misplaced-pointer-arithmetic-in-alloc"
39-
- "bugprone-misplaced-widening-cast"
40+
# Produces a lot of results that are just extra-verbose - skipping for now
41+
#- "bugprone-misplaced-widening-cast"
4042
- "bugprone-move-forwarding-reference"
4143
- "bugprone-multi-level-implicit-pointer-conversion"
4244
- "bugprone-multiple-new-in-one-expression"
@@ -53,7 +55,6 @@ Checks:
5355
- "bugprone-return-const-ref-from-parameter"
5456
- "bugprone-shared-ptr-array-mismatch"
5557
- "bugprone-signal-handler"
56-
- "bugprone-signed-char-misuse"
5758
- "bugprone-sizeof-container"
5859
- "bugprone-sizeof-expression"
5960
- "bugprone-spuriously-wake-up-functions"
@@ -72,24 +73,66 @@ Checks:
7273
- "bugprone-suspicious-string-compare"
7374
- "bugprone-suspicious-stringview-data-usage"
7475
- "bugprone-swapped-arguments"
75-
- "bugprone-switch-missing-default-case"
7676
- "bugprone-terminating-continue"
7777
- "bugprone-throw-keyword-missing"
7878
- "bugprone-too-small-loop-variable"
7979
- "bugprone-undefined-memory-manipulation"
8080
- "bugprone-undelegated-constructor"
81-
- "bugprone-unhandled-exception-at-new"
81+
#- "bugprone-unhandled-exception-at-new"
8282
- "bugprone-unique-ptr-array-mismatch"
8383
- "bugprone-unsafe-functions"
8484
- "bugprone-unused-local-non-trivial-variable"
8585
- "bugprone-unused-raii"
8686
- "bugprone-unused-return-value"
8787
- "bugprone-use-after-move"
8888
- "bugprone-virtual-near-miss"
89+
- "cppcoreguidelines-avoid-capturing-lambda-coroutines"
90+
- "cppcoreguidelines-avoid-goto"
91+
- "cppcoreguidelines-avoid-reference-coroutine-parameters"
92+
- "cppcoreguidelines-interfaces-global-init"
93+
- "cppcoreguidelines-misleading-capture-default-by-value"
94+
- "cppcoreguidelines-no-suspend-with-lock"
95+
- "cppcoreguidelines-prefer-member-initializer"
96+
- "cppcoreguidelines-pro-type-cstyle-cast"
97+
- "cppcoreguidelines-pro-type-static-cast-downcast"
98+
- "cppcoreguidelines-pro-type-union-access"
99+
- "cppcoreguidelines-slicing"
100+
- "google-runtime-int"
101+
# We should enable this one at some point, but it produces a huge number of changes
102+
# - "misc-const-correctness"
103+
- "misc-misleading-bidrectional"
104+
- "misc-misleading-identifier"
105+
- "misc-misplaced-const"
106+
- "misc-non-copyable-objects"
107+
- "misc-redundant-expression"
108+
- "misc-unused-parameters"
109+
- "misc-unused-using-decls"
110+
- "misc-use-anonymous-namespace"
111+
- "misc-use-internal-linkage"
112+
- "modernize-deprecated-headers"
113+
#- "modernize-loop-convert"
114+
- "modernize-make-shared"
115+
- "modernize-make-unique"
116+
- "modernize-min-max-use-initializer-list"
117+
- "modernize-raw-string-literal"
118+
- "modernize-redundant-void-arg"
119+
- "modernize-replace-auto-ptr"
120+
#- "modernize-type-traits"
121+
#- "modernize-use-constraints"
122+
- "modernize-use-emplace"
123+
- "modernize-use-equals-default"
124+
- "modernize-use-equals-delete"
125+
- "modernize-use-nullptr"
126+
- "modernize-use-starts-ends-with"
127+
# The <numbers> header is unfortunately not available in Android NDK r25b,
128+
# which is an important target for cesium-native via Unreal Engine.
129+
#- "modernize-use-std-numbers"
130+
#- "modernize-use-using"
131+
- "performance-*"
132+
- "-performance-enum-size"
89133
- "-readability-redundant-member-init"
90134

91-
#WarningsAsErrors: "*"
92-
WarningsAsErrors: ""
135+
WarningsAsErrors: "*"
93136
FormatStyle: none
94137
CheckOptions:
95138
- key: readability-implicit-bool-conversion.AllowPointerConditions
@@ -99,7 +142,10 @@ CheckOptions:
99142
- key: modernize-use-auto.RemoveStars
100143
value: "true"
101144
- key: misc-include-cleaner.IgnoreHeaders
102-
value: ".*cesium-async\\+\\+\\.h"
145+
value: ".*cesium-async\\+\\+\\.h;.*bits\/.*.h"
146+
- key: performance-move-const-arg.CheckTriviallyCopyableMove
147+
value: "false"
103148
HeaderFilterRegex: ".*"
104149
HeaderFileExtensions: ["h"]
150+
ExcludeHeaderFilterRegex: ".*\\.ezvcpkg\/.*"
105151
ImplementationFileExtensions: ["cpp"]

.github/workflows/build.yml

Lines changed: 70 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: cesium-native
22
on: [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
38
jobs:
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: |

.github/workflows/prod.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'cesium.com-staging'
77
jobs:
88
deploy-docs:
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
env:
1111
AWS_ACCESS_KEY_ID: ${{ secrets.NATIVE_ACCESS_KEY }}
1212
AWS_SECRET_ACCESS_KEY: ${{ secrets.NATIVE_SECRET_KEY }}
@@ -15,9 +15,9 @@ jobs:
1515
- name: Install Doxygen
1616
run: |
1717
cd ~
18-
wget https://github.com/doxygen/doxygen/releases/download/Release_1_12_0/doxygen-1.12.0.linux.bin.tar.gz
19-
tar xzf doxygen-1.12.0.linux.bin.tar.gz
20-
export PATH=$PWD/doxygen-1.12.0/bin:$PATH
18+
wget https://github.com/doxygen/doxygen/releases/download/Release_1_13_2/doxygen-1.13.2.linux.bin.tar.gz
19+
tar xzf doxygen-1.13.2.linux.bin.tar.gz
20+
export PATH=$PWD/doxygen-1.13.2/bin:$PATH
2121
echo "PATH=$PATH" >> "$GITHUB_ENV"
2222
doxygen --version
2323
- name: Check out repository code
@@ -27,19 +27,19 @@ jobs:
2727
- name: ccache
2828
uses: hendrikmuhs/ccache-action@v1.2.9
2929
with:
30-
key: ccache-ubuntu-22.04-doxygen
30+
key: ccache-ubuntu-24.04-doxygen
3131
- name: Cache vcpkg artifacts
3232
uses: actions/cache@v4
3333
with:
3434
path: ~/.ezvcpkg
35-
key: vcpkg-ubuntu-22.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
35+
key: vcpkg-ubuntu-24.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
3636
restore-keys: |
37-
vcpkg-ubuntu-22.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
38-
vcpkg-ubuntu-22.04-doxygen
37+
vcpkg-ubuntu-24.04-doxygen-${{ hashFiles('CMakeLists.txt') }}
38+
vcpkg-ubuntu-24.04-doxygen
3939
- name: Mark documentation official
4040
if: ${{ github.ref_name == 'cesium.com' }}
4141
run: |
42-
echo "EXTRA_CONFIGURE_ARGS=-DCESIUM_PRODUCTION_DOCS" >> "$GITHUB_ENV"
42+
echo "EXTRA_CONFIGURE_ARGS=-DCESIUM_PRODUCTION_DOCS=TRUE" >> "$GITHUB_ENV"
4343
- name: Generate Documentation
4444
run: |
4545
npm install

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ CMakeSettings.json
1010
test.db
1111
build-wsl
1212
.idea
13+
build-debug
14+
clang-tidy.log

0 commit comments

Comments
 (0)