This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Use -VS2019 when packaging only for UE4 #1556
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: 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: | |
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" | |
run: | | |
if(${{ matrix.version }} -eq "4.27"){ | |
$env:BUILD_ARGS="$env:BUILD_ARGS -VS2019" | |
} | |
$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 |