Skip to content

Commit 874306f

Browse files
author
zhangyushuang.77
committed
[harmony] build v8so for harmony
1 parent 1b1a2d7 commit 874306f

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: harmony sdk release
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
harmony-release:
9+
runs-on: lynx-custom-dind
10+
container:
11+
image: ghcr.io/lynx-family/ubuntu24.04-harmony:lastest
12+
options: --cap-add=NET_ADMIN
13+
credentials:
14+
username: lynx-family
15+
password: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- name: Set MTU
18+
run: |
19+
sudo apt install --no-install-recommends -y iproute2
20+
sudo ip link set dev eth0 mtu 1450 # remain 50 for k8s overlay
21+
echo "MTU set successfully"
22+
23+
- name: Checkout repo
24+
uses: actions/[email protected]
25+
26+
- name: Set up Python 3.9
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.9"
30+
31+
- name: prepare cipd
32+
run: |
33+
mkdir -p ${GITHUB_WORKSPACE}/v8
34+
cd ${GITHUB_WORKSPACE}/v8
35+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools
36+
export PATH=$PATH:${GITHUB_WORKSPACE}/v8/depot_tools
37+
echo "${GITHUB_WORKSPACE}/v8/depot_tools" >> $GITHUB_PATH
38+
39+
- name: download v8
40+
run: |
41+
cd ${GITHUB_WORKSPACE}/v8
42+
fetch v8
43+
echo "target_os = ['android']" >> .gclient
44+
cd v8
45+
git checkout 11.1.277
46+
gclient sync
47+
./build/install-build-deps.sh
48+
git apply $GITHUB_WORKSPACE/v8.patch
49+
echo "$GITHUB_WORKSPACE/v8/v8/third_party/depot_tools" >> $GITHUB_PATH
50+
51+
- name: build v8 arm64
52+
run: |
53+
cd ${GITHUB_WORKSPACE}/v8/v8
54+
gn gen out/arm64 --args='
55+
v8_use_libm_trig_functions = false
56+
v8_enable_i18n_support = false
57+
v8_use_external_startup_data = false
58+
v8_enable_snapshot_compression = false
59+
v8_enable_pointer_compression = false
60+
v8_enable_pointer_compression_8gb = false
61+
v8_use_zlib = false
62+
default_min_sdk_version = 21
63+
android_ndk_major_version = 21
64+
target_os = "harmony"
65+
target_cpu = "arm64"
66+
v8_enable_lite_mode=true
67+
is_component_build = true
68+
use_custom_libcxx = false
69+
libcxx_is_shared = false
70+
is_debug = false
71+
symbol_level = 0'
72+
ninja -C out/arm64 -j4 v8
73+
74+
- name: build v8 arm32
75+
run: |
76+
cd ${GITHUB_WORKSPACE}/v8/v8
77+
gn gen out/arm32 --args='
78+
v8_use_libm_trig_functions = false
79+
v8_enable_i18n_support = false
80+
v8_use_external_startup_data = false
81+
v8_enable_snapshot_compression = false
82+
v8_enable_pointer_compression = false
83+
v8_enable_pointer_compression_8gb = false
84+
v8_use_zlib = false
85+
default_min_sdk_version = 21
86+
android_ndk_major_version = 21
87+
target_os = "harmony"
88+
target_cpu = "arm"
89+
v8_enable_lite_mode=true
90+
is_component_build = true
91+
use_custom_libcxx = false
92+
libcxx_is_shared = false
93+
is_debug = false
94+
symbol_level = 0'
95+
ninja -C out/arm32 -j4 v8
96+
97+
- name: Get all v8 harmony libs
98+
run: |
99+
mkdir -p v8so/harmony/libs/arm64-v8a
100+
mkdir -p v8so/harmony/libs/armeabi-v7a
101+
cp ${GITHUB_WORKSPACE}/v8/v8/out/arm64/lib*.so v8so/harmony/libs/arm64-v8a/
102+
cp ${GITHUB_WORKSPACE}/v8/v8/out/arm32/lib*.so v8so/harmony/libs/armeabi-v7a/
103+
zip -v v8so_harmony.zip -r v8so
104+
105+
- name: push to release
106+
uses: ncipollo/release-action@v1
107+
with:
108+
tag: ${{ github.event.inputs.tag }}
109+
token: ${{ secrets.GITHUB_TOKEN }}
110+
artifacts: "v8so_harmony.zip"

0 commit comments

Comments
 (0)