Skip to content

Commit

Permalink
Merge pull request #1447 from CesiumGS/vcpkg
Browse files Browse the repository at this point in the history
Use the vcpkg-enabled version of cesium-native.
  • Loading branch information
j9liu authored Aug 16, 2024
2 parents 346daef + 349214a commit 23632f2
Show file tree
Hide file tree
Showing 83 changed files with 1,616 additions and 592 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-unreal-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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" "${{ inputs.unreal-program-name }}/Engine/Binaries/Mac/*.dSYM"
unzip -q ue.zip "${{ inputs.unreal-program-name }}/Engine/*" -d $HOME -x $(cat "$GITHUB_WORKSPACE/.github/actions/install-unreal-macos/exclude-from-unzip.lst")
df -h
rm ue.zip
df -h
47 changes: 47 additions & 0 deletions .github/actions/install-unreal-macos/exclude-from-unzip.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
UE_5.2/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*
UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*
UE_5.2/Engine/Binaries/Mac/UnrealGame.app/*
UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*
UE_5.2/Engine/Binaries/Mac/Android/*
UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame
UE_5.2/Engine/Binaries/Mac/UnrealGame
UE_5.2/Engine/Binaries/Mac/UnrealGame-Mac-Shipping
UE_5.2/Engine/Binaries/Mac/*.dSYM
UE_5.2/Engine/Plugins/Experimental/NNERuntimeIREE/*
UE_5.2/Engine/Plugins/Experimental/Avalanche/*
UE_5.3/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*
UE_5.3/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*
UE_5.3/Engine/Binaries/Mac/UnrealGame.app/*
UE_5.3/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*
UE_5.3/Engine/Binaries/Mac/Android/*
UE_5.3/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame
UE_5.3/Engine/Binaries/Mac/UnrealGame
UE_5.3/Engine/Binaries/Mac/UnrealGame-Mac-Shipping
UE_5.3/Engine/Binaries/Mac/*.dSYM
UE_5.3/Engine/Plugins/Experimental/NNERuntimeIREE/*
UE_5.3/Engine/Plugins/Experimental/Avalanche/*
UE_5.4/Engine/Binaries/Mac/LiveLinkHub-Mac-Shipping.app/*
UE_5.4/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame.app/*
UE_5.4/Engine/Binaries/Mac/UnrealGame.app/*
UE_5.4/Engine/Binaries/Mac/UnrealGame-Mac-Shipping.app/*
UE_5.4/Engine/Binaries/Mac/Android/*
UE_5.4/Engine/Binaries/Mac/ZenDashboard.app/*
UE_5.4/Engine/Binaries/Mac/UnrealEditorServices.app/*
UE_5.4/Engine/Binaries/Mac/UnrealEditor-Mac-DebugGame.app/*
UE_5.4/Engine/Binaries/Mac/UnrealGame-Mac-DebugGame
UE_5.4/Engine/Binaries/Mac/UnrealGame
UE_5.4/Engine/Binaries/Mac/UnrealGame-Mac-Shipping
UE_5.4/Engine/Binaries/ThirdParty/DotNet/6.0.302/mac-x64/*
UE_5.4/Engine/Binaries/ThirdParty/CEF3/*
UE_5.4/Engine/Binaries/DotNET/AutomationTool/AutomationScripts/Platforms/Windows/*
UE_5.4/Engine/Intermediate/ScriptModules/Win.Automation.json
UE_5.4/Engine/Binaries/DotNET/AutomationTool/AutomationScripts/Platforms/Android/*
UE_5.4/Engine/Intermediate/ScriptModules/Android.Automation.json
UE_5.4/Engine/Binaries/DotNET/AutomationTool/AutomationScripts/Platforms/Linux/*
UE_5.4/Engine/Intermediate/ScriptModules/Linux.Automation.json
UE_5.4/Engine/Binaries/DotNET/AutomationTool/AutomationScripts/Platforms/TVOS/*
UE_5.4/Engine/Intermediate/ScriptModules/TVOS.Automation.json
UE_5.4/Engine/Binaries/DotNET/AutomationTool/AutomationScripts/Platforms/SteamDeck/*
UE_5.4/Engine/Intermediate/ScriptModules/SteamDeck.Automation.json
UE_5.4/Engine/Binaries/DotNET/Android/*
*.dSYM
15 changes: 15 additions & 0 deletions .github/actions/vcpkg-cache/action.yml
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', 'extern/vcpkg-overlays/triplets/**/*', 'extern/*toolchain.cmake') }}-${{ hashFiles('extern/cesium-native/CMakeLists.txt', 'extern/CMakeLists.txt') }}
restore-keys: |
vcpkg-${{ inputs.id }}-${{ hashFiles('extern/vcpkg-overlays/**/vcpkg.json', 'extern/vcpkg-overlays/triplets/**/*', 'extern/*toolchain.cmake') }}-
93 changes: 24 additions & 69 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,29 +75,19 @@ jobs:
unreal-program-name: "UE_5.2"
upload-package-base-name: "CesiumForUnreal-52-linux"
clang-version: "v21_clang-15.0.1-centos7"
macOS52:
uses: ./.github/workflows/buildMac.yml
Apple52:
uses: ./.github/workflows/buildApple.yml
secrets: inherit
with:
runner-label: macos-12
runner-label: macos-14
unreal-engine-version: "5.2.0"
unreal-engine-zip: "s3://cesium-unreal-engine/UE_52_macOS.zip"
unreal-program-name: "UE_5.2"
upload-package-base-name: "CesiumForUnreal-52-macos"
xcode-version: "14.2"
iOS52:
uses: ./.github/workflows/buildiOS.yml
secrets: inherit
with:
runner-label: macos-12
unreal-engine-version: "5.2.0"
unreal-engine-zip: "s3://cesium-unreal-engine/UE_52_macOS.zip"
unreal-program-name: "UE_5.2"
upload-package-base-name: "CesiumForUnreal-52-ios"
xcode-version: "14.2"
upload-package-base-name: "CesiumForUnreal-52-apple"
xcode-version: "14.3.1"
Combine52:
runs-on: ubuntu-latest
needs: [Windows52, Linux52, Android52, MacOS52, iOS52]
needs: [Windows52, Linux52, Android52, Apple52]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -110,15 +100,10 @@ jobs:
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV
- name: Download iOS build
uses: actions/download-artifact@v4
with:
name: CesiumForUnreal-52-ios-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Download macOS build
- name: Download Apple build
uses: actions/download-artifact@v4
with:
name: CesiumForUnreal-52-macos-${{ env.CESIUM_UNREAL_VERSION}}
name: CesiumForUnreal-52-apple-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Download Android build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -208,29 +193,19 @@ jobs:
unreal-program-name: "UE_5.3"
upload-package-base-name: "CesiumForUnreal-53-linux"
clang-version: "v22_clang-16.0.6-centos7"
macOS53:
uses: ./.github/workflows/buildMac.yml
secrets: inherit
with:
runner-label: macos-12
unreal-engine-version: "5.3.0"
unreal-engine-zip: "s3://cesium-unreal-engine/5.3.0/UE_53_macOS.zip"
unreal-program-name: "UE_5.3"
upload-package-base-name: "CesiumForUnreal-53-macos"
xcode-version: "14.2"
iOS53:
uses: ./.github/workflows/buildiOS.yml
Apple53:
uses: ./.github/workflows/buildApple.yml
secrets: inherit
with:
runner-label: macos-12
runner-label: macos-14
unreal-engine-version: "5.3.0"
unreal-engine-zip: "s3://cesium-unreal-engine/5.3.0/UE_53_macOS.zip"
unreal-program-name: "UE_5.3"
upload-package-base-name: "CesiumForUnreal-53-ios"
xcode-version: "14.2"
upload-package-base-name: "CesiumForUnreal-53-apple"
xcode-version: "14.3.1"
Combine53:
runs-on: ubuntu-latest
needs: [Windows53, Android53, Linux53, MacOS53, iOS53]
needs: [Windows53, Android53, Linux53, Apple53]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -243,15 +218,10 @@ jobs:
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV
- name: Download iOS build
uses: actions/download-artifact@v4
with:
name: CesiumForUnreal-53-ios-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Download macOS build
- name: Download Apple build
uses: actions/download-artifact@v4
with:
name: CesiumForUnreal-53-macos-${{ env.CESIUM_UNREAL_VERSION}}
name: CesiumForUnreal-53-apple-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Download Android build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -341,29 +311,19 @@ jobs:
unreal-program-name: "UE_5.4"
upload-package-base-name: "CesiumForUnreal-54-linux"
clang-version: "v22_clang-16.0.6-centos7"
macOS54:
uses: ./.github/workflows/buildMac.yml
secrets: inherit
with:
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"
iOS54:
uses: ./.github/workflows/buildiOS.yml
Apple54:
uses: ./.github/workflows/buildApple.yml
secrets: inherit
with:
runner-label: macos-13
runner-label: macos-14
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-ios"
xcode-version: "14.2"
upload-package-base-name: "CesiumForUnreal-54-apple"
xcode-version: "14.3.1"
Combine54:
runs-on: ubuntu-latest
needs: [Windows54, Android54, Linux54, MacOS54, iOS54]
needs: [Windows54, Android54, Linux54, Apple54]
steps:
- name: Check out repository code
uses: actions/checkout@v4
Expand All @@ -376,15 +336,10 @@ jobs:
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV
- name: Download iOS build
uses: actions/download-artifact@v4
with:
name: CesiumForUnreal-54-ios-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Download macOS build
- name: Download Apple build
uses: actions/download-artifact@v4
with:
name: CesiumForUnreal-54-macos-${{ env.CESIUM_UNREAL_VERSION}}
name: CesiumForUnreal-54-apple-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Download Android build
uses: actions/download-artifact@v4
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/buildAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -52,25 +56,28 @@ jobs:
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${ENV:BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> $ENV:GITHUB_ENV
- name: Install nasm
uses: ilammy/setup-nasm@v1.5.1
- 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 }}"
$env:CESIUM_VCPKG_RELEASE_ONLY="TRUE"
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
((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.2.0"','"EngineVersion": "${{ inputs.unreal-engine-version }}"') | Set-Content -Path CesiumForUnreal.uplugin
- name: Customize BuildConfiguration.xml
run: |
mkdir -p "$env:USERPROFILE\AppData\Roaming\Unreal Engine\UnrealBuildTool"
Expand All @@ -92,10 +99,6 @@ jobs:
if: ${{ failure() }}
run: |
cat "C:\Users\runneradmin\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Program+Files+Epic+Games+${{ inputs.unreal-program-name }}\UBT-UnrealGame-Android-Development.txt"
- name: Compress debug sections
run: |
dir packages/CesiumForUnreal/Intermediate/Build/Android/UnrealGame/Development/CesiumRuntime/*.o | Foreach-Object { & $ENV:ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objcopy.exe --compress-debug-sections $_.FullName }
dir packages/CesiumForUnreal/Intermediate/Build/Android/UnrealGame/Shipping/CesiumRuntime/*.o | Foreach-Object { & $ENV:ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-objcopy.exe --compress-debug-sections $_.FullName }
- name: Publish plugin package artifact
if: ${{ success() }}
uses: actions/upload-artifact@v4
Expand Down
Loading

0 comments on commit 23632f2

Please sign in to comment.