Skip to content

Commit 4532e91

Browse files
authored
add infra to support multiple v8 versions (#108)
* fix compile issue for v8 version 7.4~13.0
1 parent 12096d4 commit 4532e91

18 files changed

+385
-188
lines changed

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
matrix:
2121
backends: [ V8, JavaScriptCore, QuickJs, Lua ]
2222
steps:
23-
- uses: actions/checkout@v2
24-
- uses: actions/cache@v2
23+
- uses: actions/checkout@v4.1.7
24+
- uses: actions/cache@v4.0.2
2525
with:
2626
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
2727
path: |

.github/workflows/sync_to_tencent_code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
timeout-minutes: 30
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4.1.7
1313
with:
1414
fetch-depth: 0
1515
- name: mirror-repository

.github/workflows/unit_tests.yml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
# mac runner seems to be slow and rear
2525
# - Release
2626
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions/cache@v2
27+
- uses: actions/checkout@v4.1.7
28+
- uses: actions/cache@v4.0.2
2929
with:
3030
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
3131
path: |
@@ -61,15 +61,15 @@ jobs:
6161
- Debug
6262
- Release
6363
steps:
64-
- uses: actions/checkout@v2
65-
- uses: actions/cache@v2
64+
- uses: actions/checkout@v4.1.7
65+
- uses: actions/cache@v4.0.2
6666
with:
6767
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
6868
path: |
6969
build/ScriptXTestLibs
7070
build/googletest-src
7171
- name: Add MSBuild to PATH
72-
uses: microsoft/setup-msbuild@v1.0.2
72+
uses: microsoft/setup-msbuild@v2
7373
- name: Configure cmake X64
7474
if: matrix.backends != 'JavaScriptCore'
7575
shell: powershell
@@ -112,8 +112,8 @@ jobs:
112112
- Debug
113113
- Release
114114
steps:
115-
- uses: actions/checkout@v2
116-
- uses: actions/cache@v2
115+
- uses: actions/checkout@v4.1.7
116+
- uses: actions/cache@v4.0.2
117117
with:
118118
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
119119
path: |
@@ -138,6 +138,29 @@ jobs:
138138
cd build
139139
./UnitTests
140140
141+
ubuntu-v8-versions-build:
142+
timeout-minutes: 60
143+
runs-on: ubuntu-20.04
144+
strategy:
145+
fail-fast: false
146+
matrix:
147+
# format index{0 .. index-1}/concurrency
148+
job_split: [ 0/8, 1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8 ]
149+
steps:
150+
- uses: actions/checkout@v4.1.7
151+
- uses: actions/cache@v4.0.2
152+
with:
153+
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
154+
path: |
155+
build/ScriptXTestLibs
156+
- name: Test build v8 on supported versions
157+
env:
158+
SCRIPTX_TEST_FORCE_UPDATE_DEPS: ON
159+
SCRIPTX_TEST_V8_JOB_SPLIT_CONFIG: ${{ matrix.job_split }}
160+
run: |
161+
mkdir -p build && cd build
162+
../test/cmake/test_v8_compiles.sh continue
163+
141164
android-clang-build:
142165
# disable for now
143166
# 1. we don't have android libraries
@@ -153,8 +176,8 @@ jobs:
153176
- Debug
154177
- Release
155178
steps:
156-
- uses: actions/checkout@v2
157-
- uses: actions/cache@v2
179+
- uses: actions/checkout@v4.1.7
180+
- uses: actions/cache@v4.0.2
158181
with:
159182
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
160183
path: |
@@ -185,9 +208,9 @@ jobs:
185208
matrix:
186209
node-version: [ 14.x, 15.x, 16.x, 18.x ] # 19.x
187210
steps:
188-
- uses: actions/checkout@v2
211+
- uses: actions/checkout@v4.1.7
189212
- name: Use Node.js ${{ matrix.node-version }}
190-
uses: actions/setup-node@v3
213+
uses: actions/setup-node@v4.0.4
191214
with:
192215
node-version: ${{ matrix.node-version }}
193216
- name: Prepare npm
@@ -209,20 +232,20 @@ jobs:
209232
matrix:
210233
emscripten-version: [ '3.0.0', '3.1.33' ]
211234
steps:
212-
- uses: actions/checkout@v2
213-
- uses: actions/cache@v2
235+
- uses: actions/checkout@v4.1.7
236+
- uses: actions/cache@v4.0.2
214237
with:
215238
key: ScriptX-UnitTests-Depedencies-${{ hashFiles('test/cmake/**') }}
216239
path: |
217240
build/ScriptXTestLibs
218241
build/googletest-src
219242
- name: Setup Emscripten
220-
uses: mymindstorm/setup-emsdk@v11
243+
uses: mymindstorm/setup-emsdk@v14
221244
with:
222245
version: ${{ matrix.emscripten-version }}
223246
actions-cache-folder: emsdk-cache-${{ matrix.emscripten-version }}
224247
- name: Setup Node.js
225-
uses: actions/setup-node@v1
248+
uses: actions/setup-node@v4.0.4
226249
with:
227250
node-version: '19.3.0' # insteadof '>= 14', use fixed version
228251
- name: Configure Webassembly backend

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 3.6.0 (2024-09):
2+
1. `[V8]` add test infrastructure to test on multiple v8 versions
3+
2. `[V8]` add support to v8 versions through 7.4~13.0
4+
15
Version 3.5.0 (2023-05):
26
1. `[QuickJs]` add support for QuickJs 2024-01-13
37

@@ -83,4 +87,4 @@ A Template backend which has no implementation.
8387

8488
---
8589
Version 0.0 (2019-10):
86-
Project started.
90+
Project started.

README-zh.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ScriptX的术语中,"前端"指对外的C++ API,"后端"则指不同的底
2020

2121
| 后端 | 语言 | 版本 | 状态 |
2222
| :----: | :----: | :----: | :----: |
23-
| V8 | JavaScript | 7.4+ | done |
23+
| V8 | JavaScript | 7.4+<br>([tested versions][tested_v8_versions]) | done |
2424
| JavaScriptCore | JavaScript | 7604.1.38.0.7+<br>(iOS 10+/macOS10.12+) | done |
2525
| Node.js | JavaScript | 14.x+ | done |
2626
| QuickJs | JavaScript | 2024-01-13 | done |
@@ -30,6 +30,7 @@ ScriptX的术语中,"前端"指对外的C++ API,"后端"则指不同的底
3030
| YARV | Ruby | | todo |
3131
| Mono | C# | | todo |
3232

33+
[tested_v8_versions]: https://github.com/LanderlYoung/ScriptXTestLibs/blob/main/v8/supported_versions.txt
3334

3435
# 简介
3536

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In ScriptX terminology, "front-end" refers to the external C++ API, and "back-en
1919

2020
| backend | language | version | states |
2121
| :----: | :----: | :----: | :----: |
22-
| V8 | JavaScript | 7.4+ | done |
22+
| V8 | JavaScript | 7.4+<br>([tested versions][tested_v8_versions]) | done |
2323
| JavaScriptCore | JavaScript | 7604.1.38.0.7+<br>(iOS 10+/macOS10.12+) | done |
2424
| Node.js | JavaScript | 14.x+ | done |
2525
| QuickJs | JavaScript | 2024-01-13 | done |
@@ -29,6 +29,8 @@ In ScriptX terminology, "front-end" refers to the external C++ API, and "back-en
2929
| YARV | Ruby | | todo |
3030
| Mono | C# | | todo |
3131

32+
[tested_v8_versions]: https://github.com/LanderlYoung/ScriptXTestLibs/blob/main/v8/supported_versions.txt
33+
3234
# Introduction
3335

3436
The interface of ScriptX uses modern C++ features. And to be 100% in line with the C++ standard, completely cross-platform.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.5.0
1+
3.6.0

0 commit comments

Comments
 (0)