-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the vcpkg-enabled version of cesium-native. #1447
Open
kring
wants to merge
120
commits into
main
Choose a base branch
from
vcpkg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 69 commits
Commits
Show all changes
120 commits
Select commit
Hold shift + click to select a range
c843346
Use the vcpkg-enabled version of cesium-native.
kring 903bac0
Use libSearchPattern.
kring 45c54d6
Add unmodified ktx port from the 2024.02.14 label of microsoft/vcpkg.
kring 109d2c5
Add our patch to the ktx vcpkg port.
kring 3c12468
Move some changes previously in cesium-native to cesium-unreal.
kring 2b64650
Fix release build.
kring 711e120
Update cesium-native.
kring e33a412
First crack at vcpkg / Android support.
kring 6f2d53b
Cache vcpkg.
kring 82dbba1
Better vcpkg cache key.
kring 053417f
Fix variable usage in cache key.
kring a2e9cf8
Add zlib-ng port from 2024.02.14 tag in microsoft/vcpkg repo.
kring 475c95a
Fix several problems with the Android build.
kring 674cf4a
Add vcpkg caching to Android, and always save it.
kring 860bb5b
Maybe make some progress toward working Android and iOS.
kring 315010b
Temporarily disable most of the Android build.
kring 26cf067
Better vcpkg cache warmup.
kring 94e3375
Better cache key.
kring 886882e
Restore full Android build.
kring 8266b4c
Re-add MikkTSpace PrivateIncludePath for Android / iOS.
kring 7789321
Fix Linux vcpkg build.
kring b1544af
Linux-AMD64 -> Linux-x86_64
kring cdac578
Update cesium-native.
kring 87f6399
Hacky library rename, as an experiment.
kring e72c55d
Fix path in hack.
kring 3114793
Use OpenSSL from Unreal Engine.
kring d568abd
Remove a hack.
kring 29b59f4
Proper overlay port for Unreal OpenSSL.
kring b73f00c
Add OpenSSL paths for other platforms.
kring fdb6be6
Exclude libssl and libcrypto from CfUnreal build.
kring 9737a61
Specify UNREAL_ENGINE_ROOT.
kring 727cdd5
Fix Linux UE 5.3 / 5.4 build, hopefully.
kring 16903c5
Cache vcpkg on Linux, macOS, and iOS.
kring 770eff7
First attempt at vcpkg on macOS.
kring bc4ff80
Specify system name on macOS.
kring 139777d
VCPKG_SYSTEM_NAME -> VCPKG_CMAKE_SYSTEM_NAME
kring 4c5c548
Remove installation of msys2 during ktx build.
kring 66a5848
UE OpenSSL paths on macOS / iOS.
kring 1e5cf5c
Add asyncplusplus overlay port.
kring d5bb575
Use a version of Async++ with a required fix for C++20 support.
kring 610bbdd
Fix typo.
kring 0268d89
Better macOS CPU architecture selection.
kring f07c237
Better CPU arch selection, attempt universal (not optimistic).
kring 6321d1c
Improve vcpkg caching on CI.
kring 912eefd
Android triplet.
kring 2a60eaa
Pass cache ID explicitly.
kring c81df69
Remove redundant restore-key.
kring b85c2ca
Flesh out android triplet.
kring 9b1447e
libwebp inexplicably requires ANDROID_NDK to be set.
kring 818199e
Maybe better without an explicit android toolchain.
kring 8a83611
Update cesium-native.
kring c1e5fa4
Specify VCPKG_OSX_ARCHITECTURES in macOS triplets.
kring 6b1e224
Specify UNREAL_ENGINE_ROOT on iOS.
kring f2c1701
Add arm64-ios-unreal triplet.
kring 33acbc5
Set CMAKE_SYSTEM_PROCESSOR on macOS.
kring 12a8723
Another go at robust VCPKG_TRIPLET detection logic.
kring bca5167
Use toolchain file on iOS, flesh out iOS triplet.
kring 1cb60fc
Don't try to set properties on non-existent target.
kring b7a67b1
Specify CMAKE_SYSTEM_NAME=Darwin when building on macOS.
kring bf6da8e
Don't let ktx be a framework on iOS.
kring a01ff2f
More fixes for KTX build on iOS, build macOS to separate dirs.
kring 3173f8e
Explicitly set CMAKE_SYSTEM_PROCESSOR in iOS toolchain.
kring 60d373a
Use the lipo tool correctly.
kring 25c88e1
Fix vcpkg cache path for non-Windows.
kring 8321143
Don't try to lipo-together identical libraries.
kring 7ef5e8f
Try again to fix the cache path.
kring 2a358fa
Improve triplet organization.
kring 6e80bd5
Merge remote-tracking branch 'origin/fix-warnings' into vcpkg
kring fd1625f
Add visibility-related flags to triplets.
kring 35bc6ab
Invalidate vcpkg cache on triplet or toolchain changes.
kring 0982821
Fix restore-key.
kring 308a4cf
Set VCPKG_C_FLAGS on macOS.
kring 40b6127
Merge remote-tracking branch 'origin/fix-warnings' into vcpkg
kring a7db660
Set IncludeOrderVersion, remove unnecessary precompiled header.
kring ce8334f
Use C++20 and swl::variant instead of std::variant.
kring f470d09
Fix compile problems on Android.
kring cc5640b
Fix swl-variant problem on Windows.
kring 6e76d42
Specify VCPKG_PLATFORM_TOOLSET_VERSION=14.34 on Windows.
kring 3590c0d
Merge remote-tracking branch 'origin/vcpkg' into vcpkg-swl
kring b6d7594
Update cesium-native.
kring 14752f3
Update cesium-native.
kring 6110ba1
Update cesium-native.
kring e3b342f
Store PropertyArrayCopy in variants.
kring e614d8b
Fix test failures caused by bad tests.
kring 9ef66c2
View plus explicit storage for MetadataValue / PropertyArray
kring de4c5e0
Test build with origin swl-variant.
kring 1751fc2
Run Apple builds on macos-13-arm64.
kring e8621c0
Combine macOS / iOS build jobs.
kring a35b935
Fix combine step dependencies.
kring 6a3a716
Use macos-13 runner.
kring 3ec0de5
Let's try macOS 14.
kring eed71cd
Only build vcpkg release on CI, build Intel+Apple on UE5.2
kring 83415cb
Fix artifacts in combine steps.
kring b4d48ab
Exclude more stuff when extracting UE.
kring 14a7e71
Another attempt at excluding files.
kring ef18e49
Remove previous attempt at listifying.
kring bd4d1c7
Exclude more stuff from the ZIP.
kring 7afd807
Restore apparently-required TextToSpeech plugin.
kring 532ec91
Only exclude some experimental plugins.
kring 2690c7e
Restore non-experimental plugins for 5.2 and 5.3, too.
kring 20622af
Delete reference to deleted AutomationScripts.
kring e234f09
Restore svn.
kring 95951fb
Print brew inventory.
kring 9c6c642
Restore oodle, remove google chrome.
kring 9c4a1e3
Combine macOS / iOS plugin build steps.
kring cddd054
Re-add Python.
kring 9d4ebae
Apparently in UE 5.4 we just can't remove any plugins at all.
kring b61cf60
Delete things.
kring 86dc9b5
Remove the entire xcode 16 directory that might exist.
kring 65ba91b
Don't compress debug sections.
kring 4466573
Fix warnings in UE 5.4.
kring 89719d0
Fix another UE 5.4 warning.
kring b668fca
Merge pull request #1455 from CesiumGS/vcpkg-swl
kring e620dba
Merge remote-tracking branch 'origin/main' into vcpkg
kring 11e26aa
Only specify MSVC toolset version on CI.
kring d1f2fd6
Merge remote-tracking branch 'origin/main' into vcpkg
kring 0605fa5
Add port overlay for sqlite3.
kring c83b36b
Isolate sqlite.
kring 89eef57
Update cesium-native.
kring 00a26bd
Fix find_package(OpenSSL).
kring File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Configure vcpkg caching | ||
inputs: | ||
id: | ||
required: true | ||
type: string | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache vcpkg artifacts | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ runner.os == 'Windows' && '/.ezvcpkg' || '~/.ezvcpkg' }} | ||
key: vcpkg-${{ inputs.id }}-${{ hashFiles('extern/vcpkg-overlays/**/vcpkg.json') }}-${{ hashFiles('extern/cesium-native/CMakeLists.txt', 'extern/CMakeLists.txt') }} | ||
restore-keys: | | ||
vcpkg-${{ inputs.id }}-${{ hashFiles('extern/vcpkg-overlays/**/vcpkg.json') }}- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,10 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Configure vcpkg caching | ||
uses: ./.github/actions/vcpkg-cache | ||
with: | ||
id: ${{ inputs.upload-package-base-name }} | ||
- name: Set environment variables | ||
run: | | ||
$env:CESIUM_UNREAL_VERSION=$env:GITHUB_REF_NAME | ||
|
@@ -52,22 +56,24 @@ jobs: | |
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${ENV:BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> $ENV:GITHUB_ENV | ||
- name: Install nasm | ||
uses: ilammy/[email protected] | ||
- name: Install Unreal Engine | ||
uses: ./.github/actions/install-unreal-windows | ||
with: | ||
unreal-engine-zip: ${{ inputs.unreal-engine-zip }} | ||
unreal-program-name: ${{ inputs.unreal-program-name }} | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
- name: Build cesium-native | ||
run: | | ||
# CMake gets confused by the Windows backslashes | ||
$env:ANDROID_NDK_ROOT=$env:ANDROID_NDK_ROOT.replace('\', '/') | ||
$env:ANDROID_NDK_HOME=$env:ANDROID_NDK_ROOT | ||
$env:UNREAL_ENGINE_ROOT="D:/Program Files/Epic Games/${{ inputs.unreal-program-name }}" | ||
cd extern | ||
cmake -B build-android -S . -G Ninja -DCMAKE_TOOLCHAIN_FILE="unreal-android-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release | ||
cmake --build build-android --config Release --target install -j8 | ||
cd .. | ||
rm -r -fo extern | ||
- name: Install Unreal Engine | ||
uses: ./.github/actions/install-unreal-windows | ||
with: | ||
unreal-engine-zip: ${{ inputs.unreal-engine-zip }} | ||
unreal-program-name: ${{ inputs.unreal-program-name }} | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
- name: Overwrite plugin engine version | ||
run: | | ||
((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.1.0"','"EngineVersion": "${{ inputs.unreal-engine-version }}"') | Set-Content -Path CesiumForUnreal.uplugin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,10 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Configure vcpkg caching | ||
uses: ./.github/actions/vcpkg-cache | ||
with: | ||
id: ${{ inputs.upload-package-base-name }} | ||
- name: Install Unreal Engine | ||
uses: ./.github/actions/install-unreal-macos | ||
with: | ||
|
@@ -62,20 +66,31 @@ jobs: | |
uses: ilammy/[email protected] | ||
- name: Build cesium-native | ||
run: | | ||
mkdir -p extern/build | ||
cd extern/build | ||
INSTALL_LIBDIR=`cmake .. -LA | grep CMAKE_INSTALL_LIBDIR` | ||
INSTALL_LIBDIR=${INSTALL_LIBDIR##CMAKE_INSTALL_LIBDIR:PATH=} | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=arm64 | ||
export UNREAL_ENGINE_ROOT=$HOME/${{ inputs.unreal-program-name }} | ||
mkdir -p extern/build-arm64 | ||
cd extern/build-arm64 | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=arm64 | ||
cmake --build . -j4 --target install | ||
mv $INSTALL_LIBDIR ${INSTALL_LIBDIR}-silicon | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=x86_64 | ||
cd .. | ||
mkdir -p build-x64 | ||
cd build-x64 | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_SYSTEM_NAME=Darwin -DCMAKE_SYSTEM_PROCESSOR=x86_64 | ||
cmake --build . -j4 --target install | ||
for f in ${INSTALL_LIBDIR}/*.a | ||
mkdir -p ${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-universal-Release | ||
for f in ${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-x86_64-Release/*.a | ||
do | ||
lipo -create -output $f ${INSTALL_LIBDIR}-silicon/$(basename -- $f) $f | ||
arm64f=${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-arm64-Release/$(basename -- $f) | ||
x64f=${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-x86_64-Release/$(basename -- $f) | ||
universalf=${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-universal-Release/$(basename -- $f) | ||
if diff $arm64f $x64f; then | ||
# arm64 and x64 files are identical, so just copy one to the universal directory. | ||
cp $arm64f $universalf | ||
else | ||
lipo -create -output $universalf $arm64f $x64f | ||
fi | ||
done | ||
rm -r -f ${INSTALL_LIBDIR}-silicon | ||
rm -r -f ${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-x86_64-Release | ||
rm -r -f ${GITHUB_WORKSPACE}/Source/ThirdParty/lib/Darwin-arm64-Release | ||
cd ../.. | ||
rm -rf extern | ||
- name: Customize BuildConfiguration.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the caching mechanism automatically segment by OS, or is the intent to have all the different platforms / architectures in one cache blob? The latter is going to be very tricky because as far as I know the cache upload won't merge the local packages with the overall package list.
Also, I don't know what the max cache entry size is, but trying to put all the binaries together is going to be more likely to overrun it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bleh, never mind... I get that the inputs.id will do the segemenation now.