diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b369f4b91..289cfd226 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -820,58 +820,58 @@ jobs: 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/setup-nasm@v1.4.0 - # - 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 + 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/setup-nasm@v1.4.0 + - 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: @@ -976,7 +976,7 @@ jobs: # path: packages Combine53: runs-on: ubuntu-latest - needs: [Windows53, Android53] # , Linux53, MacOS53, iOS53 + needs: [Windows53, Android53, Linux53] # , MacOS53, iOS53 steps: - name: Check out repository code uses: actions/checkout@v3 @@ -1004,25 +1004,25 @@ jobs: 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 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: 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