Skip to content

Commit

Permalink
Build UE5.3 version for Windows and Android.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Sep 7, 2023
1 parent 639100f commit 159d15c
Showing 1 changed file with 269 additions and 0 deletions.
269 changes: 269 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,3 +771,272 @@ jobs:
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Plugins"
test-package-base-name: "CesiumForUnreal-52"
secrets: inherit
Windows53:
uses: ./.github/workflows/buildWindows.yml
with:
unreal-engine-version: "5.3.0"
unreal-runner-label: "unreal-53"
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles"
upload-package-base-name: "CesiumForUnreal-53-windows"
TestWindows53:
needs: [Windows53]
uses: ./.github/workflows/testWindows.yml
with:
unreal-runner-label: "unreal-53"
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64"
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.3/Engine/Plugins"
test-package-base-name: "CesiumForUnreal-53-windows"
secrets: inherit
Android53:
runs-on: ["self-hosted","windows","x64","unreal-53"]
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # so that `git describe` works.
- name: Set environment variables
run: |
$ENV:CESIUM_UNREAL_VERSION=$(git describe)
$ENV:BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-53-android-${ENV:CESIUM_UNREAL_VERSION}"
# Make these available to subsequent steps
echo "CESIUM_UNREAL_VERSION=${ENV:CESIUM_UNREAL_VERSION}" >> $ENV:GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${ENV:BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> $ENV:GITHUB_ENV
- name: Install nasm
uses: ilammy/[email protected]
- name: Build cesium-native
run: |
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
- name: Build plugin
run: |
((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.0.0"','"EngineVersion": "5.3.0"') | Set-Content -Path CesiumForUnreal.uplugin
cd "C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles"
./RunUAT.bat BuildPlugin -Plugin="$ENV:GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$ENV:GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Android -NoHostPlatform
- name: Publish plugin package artifact
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
path: packages
# Linux53:
# runs-on: ["self-hosted","linux","x64","unreal-53"]
# steps:
# - name: Check out repository code
# uses: actions/checkout@v3
# with:
# submodules: recursive
# fetch-depth: 0 # so that `git describe` works.
# - name: Set environment variables
# run: |
# export CESIUM_UNREAL_VERSION=$(git describe)
# export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-53-linux-${CESIUM_UNREAL_VERSION}"
# # Make these available to subsequent steps
# echo "CESIUM_UNREAL_VERSION=${CESIUM_UNREAL_VERSION}" >> "$GITHUB_ENV"
# echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> "$GITHUB_ENV"
# - name: Install nasm
# uses: ilammy/[email protected]
# - name: Build cesium-native
# run: |
# export UNREAL_ENGINE_DIR="/opt/ue53"
# export LINUX_MULTIARCH_ROOT="/opt/ue53/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v22_clang-16.0.6-centos7/"
# export UNREAL_ENGINE_COMPILER_DIR="${LINUX_MULTIARCH_ROOT}x86_64-unknown-linux-gnu"
# export UNREAL_ENGINE_LIBCXX_DIR="${UNREAL_ENGINE_DIR}/Engine/Source/ThirdParty/Unix/LibCxx"
# # TODO: Move this to the image instead
# export PATH=$PATH:/usr/local/bin
# cd extern
# cmake -B build -S . -G Ninja -DCMAKE_TOOLCHAIN_FILE="unreal-linux-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
# cmake --build build --config Release --target install -j8
# cd ..
# rm -rf extern
# - name: Build plugin
# run: |
# sed -i 's/\"EngineVersion\": \"5.0.0\"/\"EngineVersion\": \"5.3.0\"/g' CesiumForUnreal.uplugin
# export LINUX_MULTIARCH_ROOT="/opt/ue53/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v22_clang-16.0.6-centos7/"
# cd /opt/ue53/Engine/Build/BatchFiles
# # UnrealBuildTool writes to write to ~/.config and loses its mind if it doesn't exist. So create it.
# # TODO: move this to the image instead
# mkdir -p ~/.config
# ./RunUAT.sh BuildPlugin -Plugin="$GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux
# - name: Fix RPATH
# run: |
# sudo yum install -y patchelf
# cd $GITHUB_WORKSPACE/packages/CesiumForUnreal/Binaries/Linux
# patchelf --print-rpath libUnrealEditor-CesiumRuntime.so
# export UPDATED_RPATH=`patchelf --print-rpath libUnrealEditor-CesiumRuntime.so | sed 's/${ORIGIN}[^:]*\/SunPosition\/Binaries\/Linux/${ORIGIN}\/..\/..\/..\/..\/Runtime\/SunPosition\/Binaries\/Linux/'`
# patchelf --force-rpath --set-rpath "$UPDATED_RPATH" libUnrealEditor-CesiumRuntime.so
# - name: Publish plugin package artifact
# if: ${{ success() }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
# path: packages
# macOS53:
# runs-on: macos-12
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: us-east-1
# steps:
# - name: Get Unreal Engine
# run: |
# aws s3 cp s3://cesium-unreal-engine/UE_53_macOS.zip .
# unzip -q UE_53_macOS.zip -d $HOME
# rm UE_53_macOS.zip
# - name: Check out repository code
# uses: actions/checkout@v3
# with:
# submodules: recursive
# fetch-depth: 0 # so that `git describe` works.
# - name: Set environment variables
# run: |
# export CESIUM_UNREAL_VERSION=$(git describe)
# export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-53-macos-${CESIUM_UNREAL_VERSION}"
# # Make these available to subsequent steps
# echo "CESIUM_UNREAL_VERSION=${CESIUM_UNREAL_VERSION}" >> $GITHUB_ENV
# echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> $GITHUB_ENV
# - name: Install nasm
# 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
# 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
# cmake --build . -j4 --target install
# for f in ${INSTALL_LIBDIR}/*.a
# do
# lipo -create -output $f ${INSTALL_LIBDIR}-silicon/$(basename -- $f) $f
# done
# rm -r -f ${INSTALL_LIBDIR}-silicon
# cd ../..
# rm -rf extern
# - name: Build plugin
# run: |
# sed -i '' 's/\"EngineVersion\": \"5.0.0\"/\"EngineVersion\": \"5.3.0\"/g' CesiumForUnreal.uplugin
# export UNREAL_ENGINE_DIR=$HOME/UE_5.3
# cd $UNREAL_ENGINE_DIR/Engine/Build/BatchFiles
# ./RunUAT.sh BuildPlugin -Plugin="$GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Mac
# - name: Publish plugin package artifact
# if: ${{ success() }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
# path: packages
# iOS53:
# runs-on: macos-13
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: us-east-1
# steps:
# - name: Get Unreal Engine
# run: |
# aws s3 cp s3://cesium-unreal-engine/UE_53_macOS.zip .
# unzip -q UE_53_macOS.zip -d $HOME
# rm UE_53_macOS.zip
# - name: Check out repository code
# uses: actions/checkout@v3
# with:
# submodules: recursive
# fetch-depth: 0 # so that `git describe` works.
# - name: Set environment variables
# run: |
# export CESIUM_UNREAL_VERSION=$(git describe)
# export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-53-ios-${CESIUM_UNREAL_VERSION}"
# # Make these available to subsequent steps
# echo "CESIUM_UNREAL_VERSION=${CESIUM_UNREAL_VERSION}" >> $GITHUB_ENV
# echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=${BUILD_CESIUM_UNREAL_PACKAGE_NAME}" >> $GITHUB_ENV
# - name: Install nasm
# uses: ilammy/[email protected]
# - name: Build cesium-native
# run: |
# mkdir -p extern/build-ios
# cd extern
# cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-fembed-bitcode" -DCMAKE_C_FLAGS="-fembed-bitcode"
# cmake --build build-ios -j 4 --target install --config Release -- -quiet # XCode output maxes out Travis log - Need to make it quiet
# cd ..
# rm -rf extern
# - name: Build plugin
# run: |
# sed -i '' 's/\"EngineVersion\": \"5.0.0\"/\"EngineVersion\": \"5.3.0\"/g' CesiumForUnreal.uplugin
# export UNREAL_ENGINE_DIR=$HOME/UE_5.3
# cd $UNREAL_ENGINE_DIR/Engine/Build/BatchFiles
# ./RunUAT.sh BuildPlugin -Plugin="$GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=iOS -NoHostPlatform
# - name: Publish plugin package artifact
# if: ${{ success() }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
# path: packages
Combine53:
runs-on: ubuntu-latest
needs: [Windows53, Android53] # , Linux53, MacOS53, iOS53
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0 # so that `git describe` works.
- name: Set environment variables
run: |
export CESIUM_UNREAL_VERSION=$(git describe)
export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-53-${CESIUM_UNREAL_VERSION}"
# Make these available to subsequent steps
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
# - name: Download iOS build
# uses: actions/download-artifact@v3
# with:
# name: CesiumForUnreal-53-ios-${{ env.CESIUM_UNREAL_VERSION}}
# path: combine
# - name: Download macOS build
# uses: actions/download-artifact@v3
# with:
# name: CesiumForUnreal-53-macos-${{ env.CESIUM_UNREAL_VERSION}}
# path: combine
- name: Download Android build
uses: actions/download-artifact@v3
with:
name: CesiumForUnreal-53-android-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
# - name: Download Linux build
# uses: actions/download-artifact@v3
# with:
# name: CesiumForUnreal-53-linux-${{ env.CESIUM_UNREAL_VERSION}}
# path: combine
- name: Download Windows build
uses: actions/download-artifact@v3
with:
name: CesiumForUnreal-53-windows-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Unreal Marketplace Workaround
run: |
# The UE Marketplace deletes our Intermediates directory and fails to produces new
# intermediates for the Linux platform. The Marketplace team has suggested we copy
# them to the LinuxIntermediate directory instead, as a workaround. Users still have
# to move these files to the correct place manually, though, in order for Linux builds
# to succeed.
mkdir -p combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
cp -r combine/CesiumForUnreal/Intermediate/Build/Linux/* combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
- name: Publish combined package artifact
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
path: combine
TestPackage53:
needs: [Combine53]
uses: ./.github/workflows/testPackageOnWindows.yml
with:
unreal-engine-association: "5.3"
unreal-runner-label: "unreal-53"
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64"
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles"
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.3/Engine/Plugins"
test-package-base-name: "CesiumForUnreal-53"
secrets: inherit

0 comments on commit 159d15c

Please sign in to comment.