-
Notifications
You must be signed in to change notification settings - Fork 97
Use vcpkg version of cesium-native #479
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
Merged
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
fc343e5
Fix the Windows build after vcpkg.
kring 17a3e31
Link against Release (not Debug) in RelWithDebInfo.
kring e895874
Add asyncplusplus overlay port.
kring e075776
Use a version of Async++ with a required fix for C++20 support.
kring abfee34
Remove unnecessary exclusion of UWP from Async++.
kring 93648ba
Fix UWP build, hopefully.
kring 538fbb8
Add zlib-ng port from 2024.07.12 tag in microsoft/vcpkg repo.
kring 41ffcd4
Fix zlib-ng build on Android.
kring 2d9e22b
Bump version to match hash.
kring 068438e
Fix Android build.
kring 77c4563
Print Android build log.
kring 3238e59
vcpkg release builds only, use Unity's Android NDK.
kring e3fca36
Don't crash when there's no Android NDK.
kring 40628a9
Add triplet files for macOS.
53efd6f
Add iOS triplet.
4752cb2
Only build release vcpkg dependencies on macOS too.
00102c7
Print macOS log.
kring b78b6a7
Target macOS 10.15.
kring d8b12ed
Target 10.15 in player builds, too.
kring 45ac07b
Change iOS lib/include/package resolution.
kring df77ca6
iOS improvements.
kring 1338bba
Add original KTX from vcpkg 2024.07.12 tag.
kring 1c16f80
Add our modifications to KTX.
kring cd005f4
Don't modify nonexistent targets.
kring 67f21cf
Use ktx directly from cesium-unreal.
kring bd234d1
Fix iOS build by installing the right stuff.
kring 21a67a9
Use macos-latest runner and don't force an xcode version.
kring 13fc626
Reduce Unity build time by shutting down immediately after compile.
kring 2b3898b
Make property static.
kring 672dbb1
Failed the build if cmake invocation fails.
kring d48f3de
Desperate attempt to debug CI-only Android build failure.
kring 8d9060a
More and better logging.
kring 9bda024
Account for pernicketyness.
kring e7a0129
More debugging.
kring 4ffb869
Temporarily skip Windows player and UWP build.
kring c17f561
Don't try to print WSA log.
kring 6584091
Explicitly specify ezvcpkg path.
kring b53487f
Use Ninja to build Android.
kring 2c2ec89
Reactivate builds, other cleanup.
kring 270da43
Add vcpkg caching.
kring e819812
Print Android build log again.
kring d90ebbe
Use swl-variant to improve compile times.
kring 3974495
Make sure UWP directory has the correct name (WSA) in newer Unity.
kring 7bbde8f
Only include copies of Reinterop-generated code.
kring 5742086
Use Unity 2022.3.41f1 for the build.
kring ba3d480
Print name of build directory while compiling native code.
kring 7212179
Attempt to install the correct JDK.
kring b6ab280
Run tests using new Unity version.
kring 54c6998
Install correct JDK module, remove non-existent uwp-il2cpp module.
kring fd98235
Publish build logs as artifact.
kring bc60225
Fix log path.
kring 9e98da2
Fix CesiumIonSession race condition.
kring c5c7f52
Don't specify explicit Unity processor on macOS.
kring c6a8437
Explicitly specify Unity use arm64 on macOS.
kring 46fc8ff
Disable Unity audio.
kring a175d90
Disable Unity audio for running tests, too.
kring f94ab7b
Fix test failures on macOS/ARM.
kring a7cccce
Don't try to compare float to double.
kring 0402763
Fix macOS test, add another test.
kring 1a09665
Merge pull request #487 from CesiumGS/vcpkg-swl
kring 638bd23
Attempt to target iOS 12 and macOS 10.15.
kring e4fd568
Specify iOS 12 in toolchain, too.
kring 8a4ed88
Merge remote-tracking branch 'origin/main' into vcpkg
kring 8f9ab6e
Changes from review.
kring e9de747
Remove a pointless std::move.
kring aabbee1
Update CHANGES.md.
kring e4f1933
Update cesium-native.
kring 6034e86
Update cesium-native.
kring 772619f
Update cesium-native.
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 hidden or 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 |
---|---|---|
|
@@ -41,6 +41,16 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Cache vcpkg artifacts | ||
uses: actions/cache@v4 | ||
with: | ||
path: "d:/.ezvcpkg" | ||
key: vcpkg-windows-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-${{ hashFiles('native~/extern/cesium-native/CMakeLists.txt', 'native~/CMakeLists.txt') }} | ||
restore-keys: | | ||
vcpkg-windows-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}- | ||
- name: Install Ninja | ||
run: | | ||
choco install -y ninja | ||
- name: Install nasm | ||
uses: ilammy/[email protected] | ||
- name: Install wget | ||
|
@@ -53,8 +63,8 @@ jobs: | |
del ./UnityHubSetup.exe | ||
- name: Install Unity | ||
run: | | ||
Start-Process -FilePath "C:/Program Files/Unity Hub/Unity Hub.exe" -Args "-- --headless install --version 2021.3.13f1 --changeset 9e7d58001ecf" -Wait | ||
Start-Process -FilePath "C:/Program Files/Unity Hub/Unity Hub.exe" -Args "-- --headless install-modules --version 2021.3.13f1 --changeset 9e7d58001ecf --module android android-sdk-ndk-tools android-open-jdk-8u172-b11 universal-windows-platform uwp-il2cpp" -Wait | ||
Start-Process -FilePath "C:/Program Files/Unity Hub/Unity Hub.exe" -Args "-- --headless install --version 2022.3.41f1 --changeset 0f988161febf" -Wait | ||
Start-Process -FilePath "C:/Program Files/Unity Hub/Unity Hub.exe" -Args "-- --headless install-modules --version 2022.3.41f1 --changeset 0f988161febf --module android android-sdk-ndk-tools android-open-jdk-11.0.14.1+1 universal-windows-platform" -Wait | ||
- name: Create SSH tunnel to Unity License Server | ||
env: | ||
UNITY_LICENSE_SERVER_SSH_KEY: ${{ secrets.UNITY_LICENSE_SERVER_SSH_KEY }} | ||
|
@@ -93,6 +103,10 @@ jobs: | |
run: | | ||
mkdir -p d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity | ||
mv $ENV:GITHUB_WORKSPACE/* d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity | ||
# Disable Unity audio | ||
mkdir -p d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity\ProjectSettings | ||
$text="%YAML 1.1`n%TAG !u! tag:unity3d.com,2011:`n--- !u!11 &1`nAudioManager:`n m_DisableAudio: 1`n" | ||
[IO.File]::WriteAllLines("d:/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/ProjectSettings/AudioManager.asset",$text) | ||
- name: Build Reinterop | ||
run: | | ||
cd d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity | ||
|
@@ -103,9 +117,20 @@ jobs: | |
mkdir -p d:\cesium\temp | ||
# Store temp files on the D drive, which is much faster than the EBS-backed C drive. | ||
$ENV:TEMP="d:\cesium\temp" | ||
# We only need a release build of vcpkg dependencies | ||
$ENV:CESIUM_VCPKG_RELEASE_ONLY="TRUE" | ||
# Clear ANDROID_NDK_ROOT so that we use Unity's version | ||
Remove-Item Env:ANDROID_NDK_ROOT | ||
# Explicitly set the ezvcpkg path. Otherwise it will be `/.ezvcpkg` and the drive letter is ambiguous. | ||
$ENV:EZVCPKG_BASEDIR="D:/.ezvcpkg" | ||
# Run the build | ||
dotnet run --project Build~ | ||
cat D:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity\native~\build-WSA-x86_64\build.log | ||
dir d:\cesium\CesiumForUnityBuildProject | ||
- name: Publish Logs | ||
if: success() || failure() # run this step even if previous step failed | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Native Build Logs - Windows | ||
path: d:/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/native~/build-*/build.log | ||
- name: Publish package artifact | ||
if: ${{ success() }} | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -114,7 +139,7 @@ jobs: | |
path: d:\cesium\CesiumForUnityBuildProject\*.tgz | ||
- name: Run Tests | ||
run: | | ||
start -FilePath "C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Unity.exe" -ArgumentList "-runTests -batchmode -projectPath d:\cesium\CesiumForUnityBuildProject -testResults d:\cesium\temp\TestResults.xml -testPlatform PlayMode -logFile d:\cesium\temp\test-log.txt" -Wait | ||
start -FilePath "C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Unity.exe" -ArgumentList "-runTests -batchmode -projectPath d:\cesium\CesiumForUnityBuildProject -testResults d:\cesium\temp\TestResults.xml -testPlatform PlayMode -logFile d:\cesium\temp\test-log.txt" -Wait | ||
cat d:\cesium\temp\test-log.txt | ||
- name: Test Report | ||
uses: kring/[email protected] | ||
|
@@ -125,22 +150,23 @@ jobs: | |
reporter: dotnet-nunit | ||
MacOS: | ||
needs: [QuickChecks] | ||
runs-on: macos-12 | ||
runs-on: macos-latest | ||
# Only allow a single macOS build at a time, for Unity licensing reasons | ||
concurrency: mac | ||
steps: | ||
- name: Set XCode version | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: "14.1" | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Cache vcpkg artifacts | ||
uses: actions/cache@v4 | ||
with: | ||
path: "~/.ezvcpkg" | ||
key: vcpkg-mac-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-${{ hashFiles('native~/extern/cesium-native/CMakeLists.txt', 'native~/CMakeLists.txt') }} | ||
restore-keys: | | ||
vcpkg-mac-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}- | ||
- name: Install nasm | ||
uses: ilammy/[email protected] | ||
- name: Install jq | ||
run: brew install jq | ||
- name: Install Unity Hub | ||
run: | | ||
wget --quiet https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.dmg | ||
|
@@ -149,14 +175,14 @@ jobs: | |
sudo cp -R "./UnityHubSetup/Unity Hub.app" /Applications | ||
hdiutil detach ./UnityHubSetup | ||
rm ./UnityHubSetup.dmg | ||
- name: Install Unity 2021.3.13f1 | ||
- name: Install Unity 2022.3.41f1 | ||
# This command sometimes returns exit code 130, despite actually succeeding. | ||
continue-on-error: true | ||
run: | | ||
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 2021.3.13f1 --changeset 9e7d58001ecf --architecture x86_64 | ||
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 2022.3.41f1 --changeset 0f988161febf --architecture arm64 | ||
- name: Install Unity iOS Support | ||
run: | | ||
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-modules --version 2021.3.13f1 --changeset 9e7d58001ecf --module ios --architecture x86_64 | ||
/Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-modules --version 2022.3.41f1 --changeset 0f988161febf --module ios --architecture arm64 | ||
- name: Configure Unity to Use the License Server | ||
run: | | ||
sudo mkdir -p "/Library/Application Support/Unity/config" | ||
|
@@ -196,19 +222,26 @@ jobs: | |
run: | | ||
mkdir -p ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity | ||
mv $GITHUB_WORKSPACE/* ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity | ||
# Disable Unity audio | ||
mkdir -p ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/ProjectSettings | ||
echo '%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!11 &1\nAudioManager:\n m_DisableAudio: 1\n' > ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/ProjectSettings/AudioManager.asset | ||
- name: Build Reinterop | ||
run: | | ||
cd ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity | ||
dotnet publish Reinterop~ -o . | ||
- name: Build Package | ||
run: | | ||
# We only need a release build of vcpkg dependencies | ||
export CESIUM_VCPKG_RELEASE_ONLY="TRUE" | ||
cd ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity | ||
dotnet run --project Build~ | ||
ls -l ~/cesium/CesiumForUnityBuildProject | ||
- name: Print log | ||
if: ${{ failure() }} | ||
run: | | ||
cat /Users/runner/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/native~/build-iOS/build.log | ||
- name: Publish Logs | ||
if: success() || failure() # run this step even if previous step failed | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Native Build Logs - macOS | ||
path: ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/native~/build-*/build.log | ||
- name: Publish package artifact | ||
if: ${{ success() }} | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -217,7 +250,7 @@ jobs: | |
path: ~/cesium/CesiumForUnityBuildProject/*.tgz | ||
- name: Run Tests | ||
run: | | ||
/Applications/Unity/Hub/Editor/2021.3.13f1/Unity.app/Contents/MacOS/Unity -runTests -batchmode -projectPath ~/cesium/CesiumForUnityBuildProject -testResults ~/cesium/CesiumForUnityBuildProject/TestResults.xml -testPlatform PlayMode -logFile ~/cesium/CesiumForUnityBuildProject/test-log.txt | ||
/Applications/Unity/Hub/Editor/2022.3.41f1/Unity.app/Contents/MacOS/Unity -runTests -batchmode -projectPath ~/cesium/CesiumForUnityBuildProject -testResults ~/cesium/CesiumForUnityBuildProject/TestResults.xml -testPlatform PlayMode -logFile ~/cesium/CesiumForUnityBuildProject/test-log.txt | ||
cat ~/cesium/CesiumForUnityBuildProject/test-log.txt | ||
ls /Users/runner/cesium/CesiumForUnityBuildProject/TestResults.xml | ||
- name: Test Report | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.