4141 uses : actions/checkout@v4
4242 with :
4343 submodules : recursive
44+ - name : Cache vcpkg artifacts
45+ uses : actions/cache@v4
46+ with :
47+ path : " d:/.ezvcpkg"
48+ 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') }}
49+ restore-keys : |
50+ vcpkg-windows-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-
51+ - name : Install Ninja
52+ run : |
53+ choco install -y ninja
4454 - name : Install nasm
4555 uses : ilammy/setup-nasm@v1.5.1
4656 - name : Install wget
5363 del ./UnityHubSetup.exe
5464 - name : Install Unity
5565 run : |
56- Start-Process -FilePath "C:/Program Files/Unity Hub/Unity Hub.exe" -Args "-- --headless install --version 2021 .3.13f1 --changeset 9e7d58001ecf " -Wait
57- 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
66+ Start-Process -FilePath "C:/Program Files/Unity Hub/Unity Hub.exe" -Args "-- --headless install --version 2022 .3.41f1 --changeset 0f988161febf " -Wait
67+ 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
5868 - name : Create SSH tunnel to Unity License Server
5969 env :
6070 UNITY_LICENSE_SERVER_SSH_KEY : ${{ secrets.UNITY_LICENSE_SERVER_SSH_KEY }}
@@ -93,6 +103,10 @@ jobs:
93103 run : |
94104 mkdir -p d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity
95105 mv $ENV:GITHUB_WORKSPACE/* d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity
106+ # Disable Unity audio
107+ mkdir -p d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity\ProjectSettings
108+ $text="%YAML 1.1`n%TAG !u! tag:unity3d.com,2011:`n--- !u!11 &1`nAudioManager:`n m_DisableAudio: 1`n"
109+ [IO.File]::WriteAllLines("d:/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/ProjectSettings/AudioManager.asset",$text)
96110 - name : Build Reinterop
97111 run : |
98112 cd d:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity
@@ -103,9 +117,20 @@ jobs:
103117 mkdir -p d:\cesium\temp
104118 # Store temp files on the D drive, which is much faster than the EBS-backed C drive.
105119 $ENV:TEMP="d:\cesium\temp"
120+ # We only need a release build of vcpkg dependencies
121+ $ENV:CESIUM_VCPKG_RELEASE_ONLY="TRUE"
122+ # Clear ANDROID_NDK_ROOT so that we use Unity's version
123+ Remove-Item Env:ANDROID_NDK_ROOT
124+ # Explicitly set the ezvcpkg path. Otherwise it will be `/.ezvcpkg` and the drive letter is ambiguous.
125+ $ENV:EZVCPKG_BASEDIR="D:/.ezvcpkg"
126+ # Run the build
106127 dotnet run --project Build~
107- cat D:\cesium\CesiumForUnityBuildProject\Packages\com.cesium.unity\native~\build-WSA-x86_64\build.log
108- dir d:\cesium\CesiumForUnityBuildProject
128+ - name : Publish Logs
129+ if : success() || failure() # run this step even if previous step failed
130+ uses : actions/upload-artifact@v4
131+ with :
132+ name : Native Build Logs - Windows
133+ path : d:/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/native~/build-*/build.log
109134 - name : Publish package artifact
110135 if : ${{ success() }}
111136 uses : actions/upload-artifact@v4
@@ -114,7 +139,7 @@ jobs:
114139 path : d:\cesium\CesiumForUnityBuildProject\*.tgz
115140 - name : Run Tests
116141 run : |
117- 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
142+ 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
118143 cat d:\cesium\temp\test-log.txt
119144 - name : Test Report
120145 uses : kring/test-reporter@v1.6.2-kring
@@ -125,22 +150,23 @@ jobs:
125150 reporter : dotnet-nunit
126151 MacOS :
127152 needs : [QuickChecks]
128- runs-on : macos-12
153+ runs-on : macos-latest
129154 # Only allow a single macOS build at a time, for Unity licensing reasons
130155 concurrency : mac
131156 steps :
132- - name : Set XCode version
133- uses : maxim-lobanov/setup-xcode@v1
134- with :
135- xcode-version : " 14.1"
136157 - name : Check out repository code
137158 uses : actions/checkout@v4
138159 with :
139160 submodules : recursive
161+ - name : Cache vcpkg artifacts
162+ uses : actions/cache@v4
163+ with :
164+ path : " ~/.ezvcpkg"
165+ 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') }}
166+ restore-keys : |
167+ vcpkg-mac-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-
140168 - name : Install nasm
141169 uses : ilammy/setup-nasm@v1.5.1
142- - name : Install jq
143- run : brew install jq
144170 - name : Install Unity Hub
145171 run : |
146172 wget --quiet https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.dmg
@@ -149,14 +175,14 @@ jobs:
149175 sudo cp -R "./UnityHubSetup/Unity Hub.app" /Applications
150176 hdiutil detach ./UnityHubSetup
151177 rm ./UnityHubSetup.dmg
152- - name : Install Unity 2021 .3.13f1
178+ - name : Install Unity 2022 .3.41f1
153179 # This command sometimes returns exit code 130, despite actually succeeding.
154180 continue-on-error : true
155181 run : |
156- /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 2021 .3.13f1 --changeset 9e7d58001ecf --architecture x86_64
182+ /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install --version 2022 .3.41f1 --changeset 0f988161febf --architecture arm64
157183 - name : Install Unity iOS Support
158184 run : |
159- /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-modules --version 2021 .3.13f1 --changeset 9e7d58001ecf --module ios --architecture x86_64
185+ /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -- --headless install-modules --version 2022 .3.41f1 --changeset 0f988161febf --module ios --architecture arm64
160186 - name : Configure Unity to Use the License Server
161187 run : |
162188 sudo mkdir -p "/Library/Application Support/Unity/config"
@@ -196,19 +222,26 @@ jobs:
196222 run : |
197223 mkdir -p ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity
198224 mv $GITHUB_WORKSPACE/* ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity
225+ # Disable Unity audio
226+ mkdir -p ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/ProjectSettings
227+ 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
199228 - name : Build Reinterop
200229 run : |
201230 cd ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity
202231 dotnet publish Reinterop~ -o .
203232 - name : Build Package
204233 run : |
234+ # We only need a release build of vcpkg dependencies
235+ export CESIUM_VCPKG_RELEASE_ONLY="TRUE"
205236 cd ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity
206237 dotnet run --project Build~
207238 ls -l ~/cesium/CesiumForUnityBuildProject
208- - name : Print log
209- if : ${{ failure() }}
210- run : |
211- cat /Users/runner/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/native~/build-iOS/build.log
239+ - name : Publish Logs
240+ if : success() || failure() # run this step even if previous step failed
241+ uses : actions/upload-artifact@v4
242+ with :
243+ name : Native Build Logs - macOS
244+ path : ~/cesium/CesiumForUnityBuildProject/Packages/com.cesium.unity/native~/build-*/build.log
212245 - name : Publish package artifact
213246 if : ${{ success() }}
214247 uses : actions/upload-artifact@v4
@@ -217,7 +250,7 @@ jobs:
217250 path : ~/cesium/CesiumForUnityBuildProject/*.tgz
218251 - name : Run Tests
219252 run : |
220- /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
253+ /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
221254 cat ~/cesium/CesiumForUnityBuildProject/test-log.txt
222255 ls /Users/runner/cesium/CesiumForUnityBuildProject/TestResults.xml
223256 - name : Test Report
0 commit comments