From 55c8cd5a9acebc1e2ec99bc19a24928953f7f8c9 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 17:07:22 +1000 Subject: [PATCH 1/8] Exclude some files when extracting UE on macOS. Using the same exclude list as Linux currently. --- .github/actions/install-unreal-macos/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-unreal-macos/action.yml b/.github/actions/install-unreal-macos/action.yml index b5dc84687..4a528cd28 100644 --- a/.github/actions/install-unreal-macos/action.yml +++ b/.github/actions/install-unreal-macos/action.yml @@ -23,5 +23,5 @@ runs: - name: Unzip Unreal Engine shell: bash run: | - unzip -q ue.zip -d $HOME + unzip -q ue.zip "Engine/*" -d $HOME -x "Engine/Binaries/Android/*" "Engine/Binaries/LinuxArm64/*" "Engine/Intermediate/Build/Android/*" "Engine/Intermediate/Build/LinuxArm64/*" rm ue.zip From a3330011f69d59804935489bf7893657673af2be Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 17:22:03 +1000 Subject: [PATCH 2/8] Don't let ktx be a framework on iOS. --- extern/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 5a13a960d..c38c16a4d 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -74,7 +74,7 @@ endif() option(CESIUM_USE_UNREAL_TRACING "Whether to trace cesium-native events using Unreal's tracing framework.") if (CESIUM_USE_UNREAL_TRACING) - # Trace Cesium Native with Unreal Insights. Need to include Unreal Engine headers when building + # Trace Cesium Native with Unreal Insights. Need to include Unreal Engine headers when building # Cesium Native. # Change this line to change engine version. Note you will have to set an environment variable to @@ -82,13 +82,13 @@ if (CESIUM_USE_UNREAL_TRACING) set(UNREAL_ENGINE_DIR $ENV{UE427}) list(APPEND CESIUM_EXTRA_INCLUDES "${UNREAL_ENGINE_DIR}/Engine/Source/Runtime/TraceLog/Public") list(APPEND CESIUM_EXTRA_INCLUDES "${UNREAL_ENGINE_DIR}/Engine/Source/Runtime/Core/Public") - # Change this line depending on where your project's PCH is. + # Change this line depending on where your project's PCH is. list(APPEND CESIUM_EXTRA_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/../Intermediate/Build/Win64/UnrealEditor/Development/CesiumRuntime") # Let Cesium Native know that we are tracing and overriding the default tracing macros. add_compile_definitions(CESIUM_TRACING_ENABLED) add_compile_definitions(CESIUM_OVERRIDE_TRACING) - # Overrides Cesium Native's macro definitions with Unreal Insights macros. + # Overrides Cesium Native's macro definitions with Unreal Insights macros. # This allows us to trace Unreal, Cesium for Unreal, and Cesium Native all in Unreal Insights. list(APPEND CESIUM_EXTRA_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include") endif() @@ -108,6 +108,11 @@ if (ANDROID OR IOS) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mikktspace ) + + if (IOS) + # ktx tags itself as a FRAMEWORK on iOS, which causes linker errors. Undo that. + set_target_properties(ktx PROPERTIES FRAMEWORK FALSE) + endif() endif() option(BUILD_SHARED_LIB OFF) From c46658d1be4eabb7879eca18f03d58e2e21e10dd Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 17:28:58 +1000 Subject: [PATCH 3/8] Fix UE path in zip file. --- .github/actions/install-unreal-macos/action.yml | 5 ++++- .github/workflows/buildMac.yml | 1 + .github/workflows/buildiOS.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-unreal-macos/action.yml b/.github/actions/install-unreal-macos/action.yml index 4a528cd28..c4ed4f0e3 100644 --- a/.github/actions/install-unreal-macos/action.yml +++ b/.github/actions/install-unreal-macos/action.yml @@ -9,6 +9,9 @@ inputs: aws-secret-access-key: required: true type: string + unreal-program-name: + required: true + type: string runs: using: composite steps: @@ -23,5 +26,5 @@ runs: - name: Unzip Unreal Engine shell: bash run: | - unzip -q ue.zip "Engine/*" -d $HOME -x "Engine/Binaries/Android/*" "Engine/Binaries/LinuxArm64/*" "Engine/Intermediate/Build/Android/*" "Engine/Intermediate/Build/LinuxArm64/*" + unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/LinuxArm64/*" "${{ inputs.unreal-program-name }}/Engine/Intermediate/Build/Android/*" "${{ inputs.unreal-program-name }}/Engine/Intermediate/Build/LinuxArm64/*" rm ue.zip diff --git a/.github/workflows/buildMac.yml b/.github/workflows/buildMac.yml index a2df23904..5756e2d6f 100644 --- a/.github/workflows/buildMac.yml +++ b/.github/workflows/buildMac.yml @@ -50,6 +50,7 @@ jobs: unreal-engine-zip: ${{ inputs.unreal-engine-zip }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + unreal-program-name: ${{ inputs.unreal-program-name }} - name: Set environment variables run: | export CESIUM_UNREAL_VERSION=$GITHUB_REF_NAME diff --git a/.github/workflows/buildiOS.yml b/.github/workflows/buildiOS.yml index ce8ff034f..846d8df99 100644 --- a/.github/workflows/buildiOS.yml +++ b/.github/workflows/buildiOS.yml @@ -60,6 +60,7 @@ jobs: unreal-engine-zip: ${{ inputs.unreal-engine-zip }} aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + unreal-program-name: ${{ inputs.unreal-program-name }} - name: Build cesium-native run: | mkdir -p extern/build-ios From 87fea9ce523396414975a5a53f997902969cda49 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 18:37:55 +1000 Subject: [PATCH 4/8] Better macOS UE exclude list. --- .github/actions/install-unreal-macos/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-unreal-macos/action.yml b/.github/actions/install-unreal-macos/action.yml index c4ed4f0e3..f5ef00228 100644 --- a/.github/actions/install-unreal-macos/action.yml +++ b/.github/actions/install-unreal-macos/action.yml @@ -26,5 +26,5 @@ runs: - name: Unzip Unreal Engine shell: bash run: | - unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/LinuxArm64/*" "${{ inputs.unreal-program-name }}/Engine/Intermediate/Build/Android/*" "${{ inputs.unreal-program-name }}/Engine/Intermediate/Build/LinuxArm64/*" + unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping" rm ue.zip From cd70b135326efccf55964384b605f658be4da642 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 19:06:14 +1000 Subject: [PATCH 5/8] Display disk space. --- .github/actions/install-unreal-macos/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/install-unreal-macos/action.yml b/.github/actions/install-unreal-macos/action.yml index f5ef00228..4c6866c60 100644 --- a/.github/actions/install-unreal-macos/action.yml +++ b/.github/actions/install-unreal-macos/action.yml @@ -22,9 +22,11 @@ runs: AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }} shell: bash run: | + df -h aws s3 cp ${{ inputs.unreal-engine-zip }} ./ue.zip --no-progress - name: Unzip Unreal Engine shell: bash run: | + df -h unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping" rm ue.zip From b409a6d9033533e9db0ee38716599d303e7466b7 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 19:15:54 +1000 Subject: [PATCH 6/8] Don't extract any of the dSYM files. --- .github/actions/install-unreal-macos/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-unreal-macos/action.yml b/.github/actions/install-unreal-macos/action.yml index 4c6866c60..9055365fe 100644 --- a/.github/actions/install-unreal-macos/action.yml +++ b/.github/actions/install-unreal-macos/action.yml @@ -28,5 +28,5 @@ runs: shell: bash run: | df -h - unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping" + unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/*.dSYM" rm ue.zip From 078d13a9224d1065355d589e0355ab209a302c63 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 19:20:54 +1000 Subject: [PATCH 7/8] Print disk space on various macOS runners. --- .github/workflows/build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 125b352f1..8250ebc11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -326,6 +326,26 @@ jobs: unreal-program-name: "UE_5.4" upload-package-base-name: "CesiumForUnreal-54-macos" xcode-version: "14.2" + TestMacOS12: + runs-on: macos-12 + steps: + - name: Test + run: df -h + TestMacOS13: + runs-on: macos-13 + steps: + - name: Test + run: df -h + TestMacOS14: + runs-on: macos-14 + steps: + - name: Test + run: df -h + TestMacOSLatest: + runs-on: macos-latest + steps: + - name: Test + run: df -h iOS54: uses: ./.github/workflows/buildiOS.yml secrets: inherit From 98d7ba17603c5d3ac5d167b9904ecd8786dcf147 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 May 2024 21:04:56 +1000 Subject: [PATCH 8/8] Try building UE 5.4 on macOS 13 instead of 12. --- .../actions/install-unreal-macos/action.yml | 2 ++ .github/workflows/build.yml | 24 ++----------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/actions/install-unreal-macos/action.yml b/.github/actions/install-unreal-macos/action.yml index 9055365fe..11e21a452 100644 --- a/.github/actions/install-unreal-macos/action.yml +++ b/.github/actions/install-unreal-macos/action.yml @@ -29,4 +29,6 @@ runs: run: | df -h unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/Android/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/UnrealGame-Mac-Shipping" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/*.dSYM" + df -h rm ue.zip + df -h diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8250ebc11..e08cf1a7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -320,37 +320,17 @@ jobs: uses: ./.github/workflows/buildMac.yml secrets: inherit with: - runner-label: macos-12 + runner-label: macos-13 unreal-engine-version: "5.4.0" unreal-engine-zip: "s3://cesium-unreal-engine/5.4.0/UE_54_macOS.zip" unreal-program-name: "UE_5.4" upload-package-base-name: "CesiumForUnreal-54-macos" xcode-version: "14.2" - TestMacOS12: - runs-on: macos-12 - steps: - - name: Test - run: df -h - TestMacOS13: - runs-on: macos-13 - steps: - - name: Test - run: df -h - TestMacOS14: - runs-on: macos-14 - steps: - - name: Test - run: df -h - TestMacOSLatest: - runs-on: macos-latest - steps: - - name: Test - run: df -h iOS54: uses: ./.github/workflows/buildiOS.yml secrets: inherit with: - runner-label: macos-12 + runner-label: macos-13 unreal-engine-version: "5.4.0" unreal-engine-zip: "s3://cesium-unreal-engine/5.4.0/UE_54_macOS.zip" unreal-program-name: "UE_5.4"