Skip to content

Commit

Permalink
[unity]添加linux的ut(nodejs backend暂不支持)
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Apr 11, 2024
1 parent e575a37 commit 0d3689a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/unity_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,44 @@ jobs:
run: |
cd unity/test/dotnet
node ../../cli dotnet-test nodejs_16
- name: UnitTest-quickjs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test quickjs
- name: UnitTest-mult-v8
run: |
cd unity/test/dotnet
node ../../cli dotnet-test mult
- name: UnitTest-mult-v8-qjs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test mult -sq
unittest-linux-dotnet:
runs-on: ubuntu-20.04

steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x.x'
- uses: actions/checkout@v3
- name: Install LibC++
run: |
sudo apt-get update
sudo apt-get install clang
sudo apt-get install build-essential
sudo apt-get install libc++-dev
sudo apt-get install libc++abi-dev
- name: UnitTest-v8
run: |
cd unity
npm i
cd test/dotnet
node ../../cli dotnet-test v8_9.4
#- name: UnitTest-nodejs
# run: |
# cd unity/test/dotnet
# node ../../cli dotnet-test nodejs_16
- name: UnitTest-quickjs
run: |
cd unity/test/dotnet
Expand Down
2 changes: 1 addition & 1 deletion unity/cli/test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function runTest(cwd: string, copyConfig: any, runInReflection: boolean, f
export async function dotnetTest(cwd: string, backend: string, filter: string = '') {
// 编译binary
const copyConfig = await runPuertsMake(join(cwd, '../../native_src'), {
platform: process.platform == 'win32' ? 'win' : 'osx',
platform: process.platform == 'win32' ? 'win' : (process.platform == 'linux' ? 'linux' : 'osx'),
config: "Debug",
backend: backend || 'v8_9.4',
arch: process.arch as any
Expand Down
4 changes: 2 additions & 2 deletions unity/native_src/cmake/backends.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"quickjs": {
"url": "https://github.com/puerts/backend-quickjs/releases/download/QJS_240410/qjs_v8_bin.tgz",
"url": "https://github.com/puerts/backend-quickjs/releases/download/QJS_240411/qjs_v8_bin.tgz",
"config": {
"definition": [
"V8_94_OR_NEWER",
Expand Down Expand Up @@ -298,7 +298,7 @@
}
},
"mult": {
"url": "https://github.com/puerts/backend-mult/releases/download/MULT_240410/mult_backends.tgz",
"url": "https://github.com/puerts/backend-mult/releases/download/MULT_240411/mult_backends.tgz",
"config": {
"definition": [
"V8_94_OR_NEWER"
Expand Down

0 comments on commit 0d3689a

Please sign in to comment.