[unreal]利用FObjectCacheNode的UserData减少一次原生c++里的map插入和删除 #404
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: unreal ci | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- unreal/Puerts/Source/** | |
- unreal/Puerts/ThirdParty/** | |
- .github/workflows/unreal_ci.yml | |
pull_request: | |
paths: | |
- unreal/Puerts/Source/** | |
- unreal/Puerts/ThirdParty/** | |
- .github/workflows/unreal_ci.yml | |
env: | |
Engine: "https://github.com/chexiongsheng/Mini427/releases/download/v1.0.1/Mini427_new_xcode.tgz" | |
V8_URL: "https://github.com/puerts/backend-v8/releases/download/V8_9.4.146.24__241009/v8_bin_9.4.146.24.tgz" | |
QJS_URL: "https://github.com/puerts/backend-quickjs/releases/download/QJS_240603/qjs_v8_bin.tgz" | |
NODE_URL: "https://github.com/puerts/backend-nodejs/releases/download/NodeJS_16.16.0_221228/nodejs_bin_16.16.0.tgz" | |
jobs: | |
urls: | |
runs-on: ubuntu-latest | |
outputs: | |
v8: ${{ steps.set-matrix.outputs.v8 }} | |
qjs: ${{ steps.set-matrix.outputs.qjs }} | |
node: ${{ steps.set-matrix.outputs.node }} | |
steps: | |
- id: set-matrix | |
run: | | |
echo "v8=${{env.V8_URL}}" >> $GITHUB_OUTPUT | |
echo "qjs=${{env.QJS_URL}}" >> $GITHUB_OUTPUT | |
echo "node=${{env.NODE_URL}}" >> $GITHUB_OUTPUT | |
window_ci: | |
needs: urls | |
name: Windows | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
cmdinfo: | |
- jslib_path: ${{ needs.urls.outputs.v8 }} | |
change_backend: '' | |
- jslib_path: ${{ needs.urls.outputs.qjs }} | |
change_backend: "sed -i 's/UseQuickjs = false/UseQuickjs = true/g' unreal/Puerts/Source/JsEnv/JsEnv.Build.cs" | |
- jslib_path: ${{ needs.urls.outputs.node }} | |
change_backend: "sed -i 's/UseNodejs = false/UseNodejs = true/g' unreal/Puerts/Source/JsEnv/JsEnv.Build.cs" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
- name: Prepare | |
shell: msys2 {0} | |
run: | | |
wget -O jslib.tgz -q ${{ matrix.cmdinfo['jslib_path'] }} | |
tar xvfz jslib.tgz -C unreal/Puerts/ThirdParty | |
${{ matrix.cmdinfo['change_backend'] }} | |
wget -O temp.tgz -q ${{env.Engine}} | |
tar xfz temp.tgz | |
mkdir output | |
- name: Build | |
run: | | |
Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin="unreal\Puerts\Puerts.uplugin" -Package="output" -Rocket -TargetPlatforms=Win64 -VS2019 | |
android_ci: | |
needs: urls | |
name: Android | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
cmdinfo: | |
- jslib_path: ${{ needs.urls.outputs.v8 }} | |
change_backend: '' | |
- jslib_path: ${{ needs.urls.outputs.qjs }} | |
change_backend: "sed -i 's/UseQuickjs = false/UseQuickjs = true/g' unreal/Puerts/Source/JsEnv/JsEnv.Build.cs" | |
- jslib_path: ${{ needs.urls.outputs.node }} | |
change_backend: "sed -i 's/UseNodejs = false/UseNodejs = true/g' unreal/Puerts/Source/JsEnv/JsEnv.Build.cs" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
- name: Prepare | |
shell: msys2 {0} | |
run: | | |
wget -O jslib.tgz -q ${{ matrix.cmdinfo['jslib_path'] }} | |
tar xvfz jslib.tgz -C unreal/Puerts/ThirdParty | |
${{ matrix.cmdinfo['change_backend'] }} | |
wget -O temp.tgz -q ${{env.Engine}} | |
tar xfz temp.tgz | |
mkdir output | |
- name: SetupAndroid | |
run: | | |
Engine\Extras\Android\SetupAndroid.bat | |
chcp 65001 #set code page to utf-8 | |
echo "NDKROOT=C:\Android\android-sdk\ndk\21.4.7075529" >> $env:GITHUB_ENV | |
- name: Build | |
run: | | |
Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin="unreal\Puerts\Puerts.uplugin" -Package="output" -Rocket -TargetPlatforms=Android -VS2019 | |
mac_ios_ci: | |
needs: urls | |
name: Mac and IOS | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
cmdinfo: | |
- jslib_path: ${{ needs.urls.outputs.v8 }} | |
change_backend: '' | |
- jslib_path: ${{ needs.urls.outputs.qjs }} | |
change_backend: "sed -i '' 's/UseQuickjs = false/UseQuickjs = true/g' unreal/Puerts/Source/JsEnv/JsEnv.Build.cs" | |
- jslib_path: ${{ needs.urls.outputs.node }} | |
change_backend: "sed -i '' 's/UseNodejs = false/UseNodejs = true/g' unreal/Puerts/Source/JsEnv/JsEnv.Build.cs" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare | |
shell: bash | |
run: | | |
wget -O jslib.tgz -q ${{ matrix.cmdinfo['jslib_path'] }} | |
tar xvfz jslib.tgz -C unreal/Puerts/ThirdParty | |
${{ matrix.cmdinfo['change_backend'] }} | |
wget -O temp.tgz -q ${{env.Engine}} | |
tar xfz temp.tgz | |
mkdir output | |
- name: Build | |
shell: bash | |
run: | | |
Engine/Build/BatchFiles/RunUAT.sh BuildPlugin -Plugin=unreal/Puerts/Puerts.uplugin -Package=output -Rocket -TargetPlatforms=Mac+IOS | |
#- name: Print Log | |
# shell: bash | |
# run: | | |
# cat "/Users/runner/Library/Logs/Unreal Engine/LocalBuildLogs/UBT-UE4Editor-Mac-Development.txt" |