Merge pull request #1157 from CesiumGS/fix-flat-normals #651
Workflow file for this run
This file contains 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
name: Cesium for Unreal | |
on: [push] | |
jobs: | |
QuickChecks: | |
name: "Quick Checks" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Check source formatting | |
run: | | |
npm install | |
npm run format -- --dry-run -Werror | |
Windows50: | |
uses: ./.github/workflows/buildWindows.yml | |
with: | |
unreal-engine-version: "5.0.0" | |
unreal-runner-label: "unreal-50" | |
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles" | |
upload-package-base-name: "CesiumForUnreal-50-windows" | |
secrets: inherit | |
TestWindows50: | |
needs: [Windows50] | |
uses: ./.github/workflows/testWindows.yml | |
with: | |
unreal-runner-label: "unreal-50" | |
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.0/Engine/Binaries/Win64" | |
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.0/Engine/Plugins" | |
test-package-base-name: "CesiumForUnreal-50-windows" | |
secrets: inherit | |
Android50: | |
runs-on: ["self-hosted","windows","x64","unreal-50"] | |
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-50-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/setup-nasm@v1.4.0 | |
- 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: | | |
cd "C:/Program Files/Epic Games/UE_5.0/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 | |
Linux50: | |
runs-on: ["self-hosted","windows","x64","unreal-50"] | |
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-50-linux-${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/setup-nasm@v1.4.0 | |
- name: Build cesium-native | |
run: | | |
$ENV:UNREAL_ENGINE_DIR="C:/Program Files/Epic Games/UE_5.0" | |
$ENV:LINUX_MULTIARCH_ROOT="C:/UnrealToolchains/v19_clang-11.0.1-centos7/" | |
$ENV:UNREAL_ENGINE_COMPILER_DIR="${ENV:LINUX_MULTIARCH_ROOT}x86_64-unknown-linux-gnu" | |
$ENV:UNREAL_ENGINE_LIBCXX_DIR="${ENV:UNREAL_ENGINE_DIR}/Engine/Source/ThirdParty/Unix/LibCxx" | |
cd extern | |
cmake -B build -S . -G Ninja -DCMAKE_TOOLCHAIN_FILE="unreal-linux-from-windows-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build --config Release --target install -j8 | |
- name: Build plugin | |
run: | | |
cd "C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles" | |
./RunUAT.bat BuildPlugin -Plugin="$ENV:GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$ENV:GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux -NoHostPlatform | |
- name: Publish plugin package artifact | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} | |
path: packages | |
macOS50: | |
runs-on: macos-11 | |
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/5.0.1/macOS/UE501.zip . | |
unzip -q UE501.zip -d $HOME | |
rm UE501.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-50-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/setup-nasm@v1.4.0 | |
- name: Build cesium-native | |
run: | | |
mkdir -p extern/build | |
cd extern/build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 | |
cmake --build . -j4 --target install | |
cd ../.. | |
rm -rf extern | |
- name: Build plugin | |
run: | | |
export UNREAL_ENGINE_DIR=$HOME/UE_5.0 | |
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 | |
iOS50: | |
runs-on: macos-11 | |
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/5.0.1/macOS/UE501.zip . | |
unzip -q UE501.zip -d $HOME | |
rm UE501.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-50-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/setup-nasm@v1.4.0 | |
- 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: | | |
export UNREAL_ENGINE_DIR=$HOME/UE_5.0 | |
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 | |
Combine50: | |
runs-on: ubuntu-latest | |
needs: [Windows50, Android50, Linux50, macOS50, iOS50] | |
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-50-${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-50-ios-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download macOS build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-50-macos-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Android build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-50-android-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Linux build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-50-linux-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Windows build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-50-windows-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Publish combined package artifact | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} | |
path: combine | |
TestPackage50: | |
needs: [Combine50] | |
uses: ./.github/workflows/testPackageOnWindows.yml | |
with: | |
unreal-engine-association: "5.0" | |
unreal-runner-label: "unreal-50" | |
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.0/Engine/Binaries/Win64" | |
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles" | |
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.0/Engine/Plugins" | |
test-package-base-name: "CesiumForUnreal-50" | |
secrets: inherit | |
Windows51: | |
uses: ./.github/workflows/buildWindows.yml | |
with: | |
unreal-engine-version: "5.1.0" | |
unreal-runner-label: "unreal-51" | |
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles" | |
upload-package-base-name: "CesiumForUnreal-51-windows" | |
secrets: inherit | |
TestWindows51: | |
needs: [Windows51] | |
uses: ./.github/workflows/testWindows.yml | |
with: | |
unreal-runner-label: "unreal-51" | |
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64" | |
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.1/Engine/Plugins" | |
test-package-base-name: "CesiumForUnreal-51-windows" | |
secrets: inherit | |
Android51: | |
runs-on: ["self-hosted","windows","x64","unreal-51"] | |
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-51-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/setup-nasm@v1.4.0 | |
- 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.1.0"') | Set-Content -Path CesiumForUnreal.uplugin | |
# UE 5.1 seems to have a bug where the Android precompiled files are in the wrong place. | |
# See https://forums.unrealengine.com/t/5-1-missing-precompiled-manifest-error-when-building-code-plugin-for-android/691983 | |
# So we fix it here. | |
mkdir -p "C:\Program Files\Epic Games\UE_5.1\Engine\Intermediate\Build\Android\arm64" | |
New-Item -ItemType Junction -Path "C:\Program Files\Epic Games\UE_5.1\Engine\Intermediate\Build\Android\arm64\UnrealGame" -Target "C:\Program Files\Epic Games\UE_5.1\Engine\Intermediate\Build\Android\UnrealGame" | |
cd "C:\Program Files\Epic Games\UE_5.1\Engine\Plugins" | |
Get-ChildItem -Recurse -Directory -Name | Where-Object {$_.EndsWith("Android\UnrealGame")} | ForEach-Object { | |
$oldPath = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PWD, $_)) | |
$newPath = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PWD, $_, "..", "arm64")) | |
mkdir -p "$newPath" | |
New-Item -ItemType Junction -Path "$newPath\UnrealGame" -Target "$oldPath" | |
} | |
# Do the actual plugin build | |
cd "C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles" | |
./RunUAT.bat BuildPlugin -Plugin="$ENV:GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$ENV:GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Android -NoHostPlatform | |
# But then the built plugin will have `Intermediate/Build/Android/arm64/UnrealGame` instead of `Intermediate/Build/Android/arm64/UnrealGame` | |
# which will cause problems when we try to package a game for Android. So fix that up. | |
mv $ENV:GITHUB_WORKSPACE/packages/CesiumForUnreal/Intermediate/Build/Android/arm64/UnrealGame $ENV:GITHUB_WORKSPACE/packages/CesiumForUnreal/Intermediate/Build/Android/UnrealGame | |
- name: Publish plugin package artifact | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} | |
path: packages | |
Linux51: | |
runs-on: ["self-hosted","windows","x64","unreal-51"] | |
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-51-linux-${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/setup-nasm@v1.4.0 | |
- name: Build cesium-native | |
run: | | |
$ENV:UNREAL_ENGINE_DIR="C:/Program Files/Epic Games/UE_5.1" | |
$ENV:LINUX_MULTIARCH_ROOT="C:/UnrealToolchains/v20_clang-13.0.1-centos7/" | |
$ENV:UNREAL_ENGINE_COMPILER_DIR="${ENV:LINUX_MULTIARCH_ROOT}x86_64-unknown-linux-gnu" | |
$ENV:UNREAL_ENGINE_LIBCXX_DIR="${ENV:UNREAL_ENGINE_DIR}/Engine/Source/ThirdParty/Unix/LibCxx" | |
cd extern | |
cmake -B build -S . -G Ninja -DCMAKE_TOOLCHAIN_FILE="unreal-linux-from-windows-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release | |
cmake --build build --config Release --target install -j8 | |
- name: Build plugin | |
run: | | |
((Get-Content -path CesiumForUnreal.uplugin -Raw) -replace '"EngineVersion": "5.0.0"','"EngineVersion": "5.1.0"') | Set-Content -Path CesiumForUnreal.uplugin | |
$ENV:LINUX_MULTIARCH_ROOT="C:/UnrealToolchains/v20_clang-13.0.1-centos7/" | |
cd "C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles" | |
./RunUAT.bat BuildPlugin -Plugin="$ENV:GITHUB_WORKSPACE/CesiumForUnreal.uplugin" -Package="$ENV:GITHUB_WORKSPACE/packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux -NoHostPlatform | |
- name: Publish plugin package artifact | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} | |
path: packages | |
macOS51: | |
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/5.1.0/macOS/UE_51_macOS.zip . | |
unzip -q UE_51_macOS.zip -d $HOME | |
rm UE_51_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-51-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/setup-nasm@v1.4.0 | |
- name: Build cesium-native | |
run: | | |
mkdir -p extern/build | |
cd extern/build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 | |
cmake --build . -j4 --target install | |
cd ../.. | |
rm -rf extern | |
- name: Build plugin | |
run: | | |
sed -i '' 's/\"EngineVersion\": \"5.0.0\"/\"EngineVersion\": \"5.1.0\"/g' CesiumForUnreal.uplugin | |
export UNREAL_ENGINE_DIR=$HOME/UE_5.1 | |
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 | |
iOS51: | |
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: Use Xcode 13 | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '^13.4.1' | |
- name: Get Unreal Engine | |
run: | | |
aws s3 cp s3://cesium-unreal-engine/5.1.0/macOS/UE_51_macOS.zip . | |
unzip -q UE_51_macOS.zip -d $HOME | |
rm UE_51_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-51-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/setup-nasm@v1.4.0 | |
- 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.1.0\"/g' CesiumForUnreal.uplugin | |
export UNREAL_ENGINE_DIR=$HOME/UE_5.1 | |
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 | |
Combine51: | |
runs-on: ubuntu-latest | |
needs: [Windows51, Linux51, Android51, macOS51, iOS51] | |
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-51-${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-51-ios-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download macOS build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-51-macos-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Android build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-51-android-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Linux build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-51-linux-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Windows build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-51-windows-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Publish combined package artifact | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} | |
path: combine | |
TestPackage51: | |
needs: [Combine51] | |
uses: ./.github/workflows/testPackageOnWindows.yml | |
with: | |
unreal-engine-association: "5.1" | |
unreal-runner-label: "unreal-51" | |
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64" | |
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles" | |
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.1/Engine/Plugins" | |
test-package-base-name: "CesiumForUnreal-51" | |
secrets: inherit | |
Windows52: | |
uses: ./.github/workflows/buildWindows.yml | |
with: | |
unreal-engine-version: "5.2.0" | |
unreal-runner-label: "unreal-52" | |
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Build/BatchFiles" | |
upload-package-base-name: "CesiumForUnreal-52-windows" | |
TestWindows52: | |
needs: [Windows52] | |
uses: ./.github/workflows/testWindows.yml | |
with: | |
unreal-runner-label: "unreal-52" | |
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64" | |
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Plugins" | |
test-package-base-name: "CesiumForUnreal-52-windows" | |
secrets: inherit | |
Android52: | |
runs-on: ["self-hosted","windows","x64","unreal-52"] | |
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-52-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/setup-nasm@v1.4.0 | |
- 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.2.0"') | Set-Content -Path CesiumForUnreal.uplugin | |
cd "C:/Program Files/Epic Games/UE_5.2/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 | |
Linux52: | |
runs-on: ["self-hosted","linux","x64","unreal-52"] | |
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-52-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/setup-nasm@v1.4.0 | |
- name: Build cesium-native | |
run: | | |
export UNREAL_ENGINE_DIR="/opt/ue52" | |
export LINUX_MULTIARCH_ROOT="/opt/ue52/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v21_clang-15.0.1-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.2.0\"/g' CesiumForUnreal.uplugin | |
export LINUX_MULTIARCH_ROOT="/opt/ue52/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v21_clang-15.0.1-centos7/" | |
cd /opt/ue52/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 | |
macOS52: | |
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_52_macOS.zip . | |
unzip -q UE_52_macOS.zip -d $HOME | |
rm UE_52_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-52-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/setup-nasm@v1.4.0 | |
- 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.2.0\"/g' CesiumForUnreal.uplugin | |
export UNREAL_ENGINE_DIR=$HOME/UE_5.2 | |
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 | |
iOS52: | |
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_52_macOS.zip . | |
unzip -q UE_52_macOS.zip -d $HOME | |
rm UE_52_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-52-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/setup-nasm@v1.4.0 | |
- 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.2.0\"/g' CesiumForUnreal.uplugin | |
export UNREAL_ENGINE_DIR=$HOME/UE_5.2 | |
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 | |
Combine52: | |
runs-on: ubuntu-latest | |
needs: [Windows52, Linux52, Android52, MacOS52, iOS52] | |
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-52-${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-52-ios-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download macOS build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-52-macos-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Android build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-52-android-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Linux build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-52-linux-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Download Windows build | |
uses: actions/download-artifact@v3 | |
with: | |
name: CesiumForUnreal-52-windows-${{ env.CESIUM_UNREAL_VERSION}} | |
path: combine | |
- name: Publish combined package artifact | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} | |
path: combine | |
TestPackage52: | |
needs: [Combine52] | |
uses: ./.github/workflows/testPackageOnWindows.yml | |
with: | |
unreal-engine-association: "5.2" | |
unreal-runner-label: "unreal-52" | |
unreal-binaries-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64" | |
unreal-batch-files-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Build/BatchFiles" | |
unreal-plugins-path: "C:/Program Files/Epic Games/UE_5.2/Engine/Plugins" | |
test-package-base-name: "CesiumForUnreal-52" | |
secrets: inherit |