Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Android - Updates for UE 5.3 #1520

Android - Updates for UE 5.3

Android - Updates for UE 5.3 #1520

Workflow file for this run

name: Build plugin
on:
push:
workflow_dispatch:
permissions:
contents: write
packages: write
env:
PLUGIN_VERSION: "1.2.0-beta.11"
CPP_SDK_VERSION: "2.6.1"
CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download"
PLUGIN_SOURCE_DIR: "DolbyIO"
PLUGIN_BUILD_DIR: "Build/DolbyIO"
GH_TOKEN: ${{ github.token }}
RETENTION: 7
jobs:
build-windows:
if: false
strategy:
fail-fast: false
matrix:
version: ["4.27", "5.2"]
runs-on: ["self-hosted", "X64", "Windows"]
env:
BUILD_PLATFORM: 'windows'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/powershell
with:
url: ${{ env.CPP_SDK_URL }}
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "${{ env.BUILD_PLATFORM }}64.zip"
- name: Build plugin
env:
BUILD_ARGS: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)\\DolbyIO\\DolbyIO.uplugin\" -Package=\"$(pwd)\\Build\\DolbyIO\" -TargetPlatforms=Win64 -VS2019"
run: |
$UAT = "C:\\Program Files\\Epic Games\\UE_${{ matrix.version }}\\Engine\\Build\\BatchFiles\\RunUAT.bat"
& $UAT ${{ env.BUILD_ARGS }}
- name: Sign plugin
env:
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
uses: ./.github/actions/sign/win
with:
path: ${{ env.PLUGIN_BUILD_DIR }}
platform: ${{ env.BUILD_PLATFORM }}
- name: Zip plugin
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
Compress-Archive -Path . -DestinationPath DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}\\DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin πŸŽ‰
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${{ github.workspace }}\\.github\\actions\\upload_assets\\upload_release_asset.ps1 -File DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
build-macos:
if: false
strategy:
fail-fast: false
matrix:
version: ["4.27", "5.2"]
runs-on: ["self-hosted", "X64", "macOS"]
env:
BUILD_PLATFORM: 'macos'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/bash
with:
url: ${{ env.CPP_SDK_URL }}
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "${{ env.BUILD_PLATFORM }}64-universal.zip"
- name: Remove symlinks from C++ SDK libs
run: |
find "${{ github.workspace }}/${{ env.PLUGIN_SOURCE_DIR }}/sdk-release/lib" -type l -delete
- name: Build plugin
env:
BUILD_ARGS: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)/DolbyIO/DolbyIO.uplugin\" -Package=$(pwd)/Build/DolbyIO -TargetPlatforms=Mac -Architecture_Mac=x64+arm64"
run: |
/Users/Shared/Epic\ Games/UE_${{ matrix.version }}/Engine/Build/BatchFiles/RunUAT.sh ${{ env.BUILD_ARGS }}
- name: Sign plugin
env:
DOLBYIO_KEYCHAIN_PASSWORD: ${{ secrets.VOXEET_KEYCHAIN_PASSWORD }}
uses: ./.github/actions/sign/mac
with:
path: ${{ env.PLUGIN_BUILD_DIR }}
platform: ${{ env.BUILD_PLATFORM }}
- name: Zip plugin
working-directory: Build
run: |
zip -rq DolbyIO/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip DolbyIO/
- name: Notarize plugin
env:
DOLBYIO_KEYCHAIN_PASSWORD: ${{ secrets.VOXEET_KEYCHAIN_PASSWORD }}
uses: ./.github/actions/notarise/mac
with:
catalog_path: ${{ env.PLUGIN_BUILD_DIR }}
file: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin πŸŽ‰
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${GITHUB_WORKSPACE}/.github/actions/upload_assets/upload_release_asset.sh DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
build-linux:
if: false
strategy:
fail-fast: false
matrix:
version: ["4.27", "5.2"]
runs-on: ["self-hosted", "X64", "Windows"]
env:
BUILD_PLATFORM: 'linux'
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Download C++ SDK
uses: ./.github/actions/download_cppsdk/powershell
with:
url: ${{ env.CPP_SDK_URL }}
tag: ${{ env.CPP_SDK_VERSION }}
asset_suffix: "ubuntu-20.04-clang10-libc++10.zip"
- name: Resolve C++ SDK lib symlinks
env:
LIB_PATH: "${{ github.workspace }}\\${{ env.PLUGIN_SOURCE_DIR }}\\sdk-release-ubuntu-20.04-clang10-libc++10\\lib"
run: |
Move-Item -Force "${{ env.LIB_PATH }}\\libavcodec.so.59.33.100" "${{ env.LIB_PATH }}\\libavcodec.so.59"
Move-Item -Force "${{ env.LIB_PATH }}\\libavformat.so.59.25.100" "${{ env.LIB_PATH }}\\libavformat.so.59"
Move-Item -Force "${{ env.LIB_PATH }}\\libavutil.so.57.27.100" "${{ env.LIB_PATH }}\\libavutil.so.57"
- name: Build plugin
env:
BUILD_ARGS: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)\\DolbyIO\\DolbyIO.uplugin\" -Package=\"$(pwd)\\Build\\DolbyIO\" -TargetPlatforms=Linux -NoHostPlatform"
run: |
if(${{ matrix.version }} -eq "4.27"){
$env:LINUX_MULTIARCH_ROOT="C:\\UnrealToolchains\\v19_clang-11.0.1-centos7"
} else {
$env:LINUX_MULTIARCH_ROOT="C:\\UnrealToolchains\\v21_clang-15.0.1-centos7"
}
$UAT = "C:\\Program Files\\Epic Games\\UE_${{ matrix.version }}\\Engine\\Build\\BatchFiles\\RunUAT.bat"
& $UAT ${{ env.BUILD_ARGS }}
- name: Zip plugin
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
Compress-Archive -Path . -DestinationPath DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}\\DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin πŸŽ‰
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${{ github.workspace }}\\.github\\actions\\upload_assets\\upload_release_asset.ps1 -File DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip
build-android:
strategy:
fail-fast: false
matrix:
version: ["5.2"]
runs-on: ["self-hosted", "X64", "macOS"]
env:
BUILD_PLATFORM: 'android'
steps:
- name: Check out code
uses: actions/checkout@v3
# - name: Download C++ SDK
# uses: ./.github/actions/download_cppsdk/bash
# with:
# tag: ${{ env.CPP_SDK_VERSION }}
# asset_suffix: "${{ env.BUILD_PLATFORM }}64.zip"
# - name: Unpack AAR
# env:
# AAR_PATH_BASE: "${{ github.workspace }}/${{ env.PLUGIN_SOURCE_DIR }}/comms-sdk-android-cppsdk-"
# AAR_PATH: "${{ env.AAR_PATH_BASE }}${{ env.CPP_SDK_VERSION }}.aar"
# AAR_NO_PREFAB_PATH: "${{ env.AAR_PATH_BASE }}noprefab-${{ env.CPP_SDK_VERSION }}.aar"
# run: |
# ./scripts/android.sh ${{ env.AAR_PATH }} ${{ env.AAR_NO_PREFAB_PATH }}
- name: Build plugin
env:
BUILD_ARGS: "BuildPlugin -Rocket -StrictIncludes -Plugin=\"$(pwd)/DolbyIO/DolbyIO.uplugin\" -Package=$(pwd)/Build/DolbyIO -TargetPlatforms=Android -Architecture_Android=arm64 -NoHostPlatform"
ANDROID_HOME: "/Users/dolbyio/Library/Android/sdk"
ANDROID_SDK_HOME: "/Users/dolbyio/Library/Android/sdk"
JAVA_HOME: "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home"
NDKROOT: "/Users/dolbyio/Library/Android/sdk/ndk/25.1.8937393"
NDK_ROOT: "/Users/dolbyio/Library/Android/sdk/ndk/25.1.8937393"
run: |
export PATH="$PATH:/Users/dolbyio/Library/Android/sdk/platform-tools:/Users/dolbyio/Library/Android/sdk/build-tools/30.0.3:/Users/dolbyio/Library/Android/sdk/tools/bin"
/Users/Shared/Epic\ Games/UE_${{ matrix.version }}/Engine/Build/BatchFiles/RunUAT.sh ${{ env.BUILD_ARGS }}
- name: Zip plugin
working-directory: Build
run: |
zip -rq DolbyIO/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip DolbyIO/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}
path: "${{ env.PLUGIN_BUILD_DIR }}/DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip"
retention-days: ${{ env.RETENTION }}
- name: Release plugin πŸŽ‰
if: startsWith(github.ref, 'refs/tags/')
working-directory: ${{ env.PLUGIN_BUILD_DIR }}
run: |
${GITHUB_WORKSPACE}/.github/actions/upload_assets/upload_release_asset.sh DolbyIO_${{ env.PLUGIN_VERSION }}_UE${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip