Custom triplet for windows to use UE compatible MSVC #29
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: Plugin CD | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
env: | |
VCPKG_COMMIT_HASH: "a82dd0cef6e9d81e764b3bccdf12bbb90c6f34ee" | |
jobs: | |
build-win64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install forced MSVC | |
run: | | |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" | |
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" | |
$componentsToAdd= @( | |
"Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64" | |
) | |
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_} | |
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') | |
# should be run twice | |
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
- name: Install via vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg build/vcpkg | |
git -C build/vcpkg checkout ${{ env.VCPKG_COMMIT_HASH }} | |
./build/vcpkg/bootstrap-vcpkg.bat | |
./build/vcpkg/vcpkg install configcat[core,sha] --triplet x64-windows-unreal --overlay-triplets "$env:GITHUB_WORKSPACE/Extras/triplets" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Win64 | |
path: | | |
./build/vcpkg/installed/*/lib/configcat.lib | |
./build/vcpkg/installed/*/lib/hash-library.lib | |
build-android: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install via vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg build/vcpkg | |
git -C build/vcpkg checkout ${{ env.VCPKG_COMMIT_HASH }} | |
./build/vcpkg/bootstrap-vcpkg.bat | |
./build/vcpkg/vcpkg install configcat[core,sha] --triplet arm64-android | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Android | |
path: | | |
./build/vcpkg/installed/*/lib/libconfigcat.a | |
./build/vcpkg/installed/*/lib/libhash-library.a | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install via vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg build/vcpkg | |
git -C build/vcpkg checkout ${{ env.VCPKG_COMMIT_HASH }} | |
./build/vcpkg/bootstrap-vcpkg.sh | |
./build/vcpkg/vcpkg install configcat[core,sha] --triplet universal-osx-unreal --overlay-triplets "$GITHUB_WORKSPACE/Extras/triplets" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: MacOS | |
path: | | |
./build/vcpkg/installed/*/lib/libconfigcat.a | |
./build/vcpkg/installed/*/lib/libhash-library.a | |
build-ios: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install via vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg build/vcpkg | |
git -C build/vcpkg checkout ${{ env.VCPKG_COMMIT_HASH }} | |
./build/vcpkg/bootstrap-vcpkg.sh | |
./build/vcpkg/vcpkg install configcat[core,sha] --triplet arm64-ios-unreal --overlay-triplets "$GITHUB_WORKSPACE/Extras/triplets" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iOS | |
path: | | |
./build/vcpkg/installed/*/lib/libconfigcat.a | |
./build/vcpkg/installed/*/lib/libhash-library.a | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install via vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg build/vcpkg | |
git -C build/vcpkg checkout ${{ env.VCPKG_COMMIT_HASH }} | |
./build/vcpkg/bootstrap-vcpkg.sh | |
# Extra steps for Unreal Engine integration | |
export CC=clang | |
export CXX=clang++ | |
./build/vcpkg/vcpkg install configcat[core,sha] --triplet x64-linux-unreal --overlay-triplets "$GITHUB_WORKSPACE/Extras/triplets" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Linux | |
path: | | |
./build/vcpkg/installed/*/lib/libconfigcat.a | |
./build/vcpkg/installed/*/lib/libhash-library.a | |
publish-engine-plugin: | |
runs-on: ubuntu-latest | |
needs: [build-win64, build-android, build-macos, build-ios, build-linux] | |
name: 📦 Package Plugin | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: Win64 | |
path: Source/ThirdParty/ConfigCatCppSDK/Binaries/Win64 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: Android | |
path: Source/ThirdParty/ConfigCatCppSDK/Binaries/Android | |
- uses: actions/download-artifact@v3 | |
with: | |
name: MacOS | |
path: Source/ThirdParty/ConfigCatCppSDK/Binaries/MacOS | |
- uses: actions/download-artifact@v3 | |
with: | |
name: iOS | |
path: Source/ThirdParty/ConfigCatCppSDK/Binaries/iOS | |
- uses: actions/download-artifact@v3 | |
with: | |
name: Linux | |
path: Source/ThirdParty/ConfigCatCppSDK/Binaries/Linux | |
- name: Archive files | |
run: | | |
zip -r ConfigCat.zip . -x LICENSE ".github/*" ".git/*" @ | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ConfigCat.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generateReleaseNotes: true | |
tag: ${{ github.ref }} | |
name: "${{ github.ref_name }}" |