Skip to content

Commit

Permalink
Merge branch 'Tencent:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoChenFx authored Oct 17, 2024
2 parents 30bdcb1 + c0025f7 commit 6f26680
Show file tree
Hide file tree
Showing 46 changed files with 1,220 additions and 6,676 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/composites/unity-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
required:
cachekey:
required:
install_path:
required:
unity_modules:
required:
architecture:
required: false
UNITY_USERNAME:
required:
UNITY_PASSWORD:
Expand All @@ -20,29 +26,35 @@ runs:
- uses: actions/cache/restore@v3
id: cache-unity
with:
path: C:/UNITY
path: ${{ inputs.install_path }}
key: ${{ inputs.os }}-${{ inputs.cachekey }}-unity
- name: MKDIR
if: steps.cache-unity.outputs.cache-hit != 'true'
shell: bash
run: mkdir C:/UNITY
run: mkdir ${{ inputs.install_path }}
- name: Setup Unity
if: steps.cache-unity.outputs.cache-hit != 'true'
uses: kuler90/setup-unity@v1
uses: chexiongsheng/setup-unity@master
with:
unity-modules: windows-il2cpp
unity-modules: ${{ inputs.unity_modules }}
unity-version: ${{ inputs.version }}
install-path: C:/UNITY
install-path: ${{ inputs.install_path }}
architecture: ${{ inputs.architecture }}
- uses: actions/cache/save@v3
if: steps.cache-unity.outputs.cache-hit != 'true'
with:
path: C:/UNITY
path: ${{ inputs.install_path }}
key: ${{ inputs.os }}-${{ inputs.cachekey }}-unity

- name: Get Unity Path if cache-hit
if: steps.cache-unity.outputs.cache-hit == 'true'
uses: chexiongsheng/setup-unity@master
with:
unity-version: ${{ inputs.version }}
install-path: ${{ inputs.install_path }}
architecture: ${{ inputs.architecture }}
- name: Activate Unity
uses: kuler90/activate-unity@v1
uses: kuler90/activate-unity@v1.1.3
with:
unity-path: C:/UNITY/${{ inputs.version }}/Editor/Unity.exe
unity-username: ${{ inputs.UNITY_USERNAME }}
unity-password: ${{ inputs.UNITY_PASSWORD }}
unity-serial: ${{ inputs.UNITY_SERIAL }}
4 changes: 2 additions & 2 deletions .github/workflows/unity_build_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
build_proj_dir: native_src_il2cpp

ios:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
build_proj_dir: native_src_il2cpp

osx:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unity_build_plugins_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
backend: ${{ github.event.inputs.backend }}
config: ${{ github.event.inputs.config }}
ios:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand All @@ -48,7 +48,7 @@ jobs:
backend: ${{ github.event.inputs.backend }}
config: ${{ github.event.inputs.config }}
osx:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unity_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
backend: mult

ios:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
backend: mult

osx:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down
36 changes: 35 additions & 1 deletion .github/workflows/unity_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
os: 'win'
version: '2021.3.16f1'
cachekey: '2021'
install_path: C:/UNITY
unity_modules: windows-il2cpp
UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
Expand All @@ -47,9 +49,41 @@ jobs:
cat log1.txt | grep "Failed\|Passed"
echo "testresult in v2"
cat log2.txt | grep "Failed\|Passed"
# unittest-osx-unity:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: Setup Unity
# uses: ./.github/workflows/composites/unity-setup/
# with:
# os: 'osx'
# version: '2021.3.16f1'
# cachekey: '2021'
# install_path: /Applications/UNITY
# unity_modules: mac-il2cpp
# architecture: x86_64
# UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
# - name: UnitTest
# run: |
# cd unity
# npm i
# cd test/unity
# node ../../cli unity-test --unity /Applications/UNITY/2021.3.16f1/Unity.app/Contents/MacOS/Unity
# - name: TestResult
# if: always()
# shell: bash
# run: |
# cd unity/test/unity
# echo "testresult in v1"
# cat log1.txt | grep "Failed\|Passed"
# echo "testresult in v2"
# cat log2.txt | grep "Failed\|Passed"

unittest-win-dotnet:
runs-on: windows-2019

steps:
- uses: actions/setup-dotnet@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unreal_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

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_240709/v8_bin_9.4.146.24.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"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unreal_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
env:
UE424_V8: "https://github.com/puerts/backend-v8/releases/download/v8_for_ue424_or_below/v8_for_ue424_or_below.tgz"
V8_84: "https://github.com/puerts/backend-v8/releases/download/V8_8.4.371.19_230822/v8_bin_8.4.371.19.tgz"
V8_94: "https://github.com/puerts/backend-v8/releases/download/V8_9.4.146.24_240430/v8_bin_9.4.146.24.tgz"
V8_106: "https://github.com/puerts/backend-v8/releases/download/V8_10.6.194_240612/v8_bin_10.6.194.tgz"
V8_94: "https://github.com/puerts/backend-v8/releases/download/V8_9.4.146.24__241009/v8_bin_9.4.146.24.tgz"
V8_106: "https://github.com/puerts/backend-v8/releases/download/V8_10.6.194__241009/v8_bin_10.6.194.tgz"
quickjs: "https://github.com/puerts/backend-quickjs/releases/download/QJS_240604/qjs_v8_bin.tgz"
nodejs: "https://github.com/puerts/backend-nodejs/releases/download/NodeJS_16.16.0_221228/nodejs_bin_16.16.0.tgz"

Expand Down
2 changes: 1 addition & 1 deletion doc/unity/zhcn/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ PuerTS 现已上传 OpenUPM: https://openupm.com/packages/com.tencent.puerts.cor
> mac下如果遇到移入废纸篓问题,请使用sudo xattr -r -d com.apple.quarantine puerts.bundle。但用了后提交git容易出问题
#### 当然还有一种最傻瓜的办法:从官方Demo中拷贝出来用。
#### 当然还有一种最简单的办法:从官方Demo中拷贝出来用。
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ static Il2CppClass *g_typeofPersistentObjectInfo;
static Il2CppClass *g_typeofArrayBuffer;
static Il2CppClass *g_typeofTypedValue;

const Il2CppClass* GetReturnType(const MethodInfo* method) {
Il2CppClass* GetReturnType(const MethodInfo* method) {
if (kInvalidIl2CppMethodSlot != method->slot) {
Class::Init(method->klass);
}
return Class::FromIl2CppType(Method::GetReturnType(method), false);
}

const Il2CppClass* GetParameterType(const MethodInfo* method, int index) {
Il2CppClass* GetParameterType(const MethodInfo* method, int index) {
if (kInvalidIl2CppMethodSlot != method->slot) {
Class::Init(method->klass);
}
Expand Down Expand Up @@ -229,7 +229,8 @@ void SetGlobalType_TypedValue(Il2CppReflectionType *type)
g_typeofTypedValue = il2cpp_codegen_class_from_type(type->type);
}

static void MethodCallback(pesapi_callback_info info) {
static void MethodCallback(pesapi_callback_info info)
{
try
{
WrapData** wrapDatas = (WrapData**)pesapi_get_userdata(info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ typedef pesapi_value (*TryTranslateFunc)(pesapi_env env, Il2CppObject* obj);

typedef int (*GetTIDFunc)(Il2CppObject* obj);

typedef const Il2CppClass* (*GetReturnTypeFunc)(const MethodInfo* method);
typedef Il2CppClass* (*GetReturnTypeFunc)(const MethodInfo* method);

typedef const Il2CppClass* (*GetParameterTypeFunc)(const MethodInfo* method, int index);
typedef Il2CppClass* (*GetParameterTypeFunc)(const MethodInfo* method, int index);

typedef void (*SetPersistentObjectFunc)(pesapi_env env, pesapi_value pvalue, PersistentObjectInfo* objectInfo);

Expand Down Expand Up @@ -157,7 +157,7 @@ struct WrapData
bool IsExtensionMethod;
bool HasParamArray;
int OptionalNum;
void* TypeInfos[0];
TypeIdType* TypeInfos[0];
};

struct JsClassInfoHeader
Expand Down
Loading

0 comments on commit 6f26680

Please sign in to comment.