-
Notifications
You must be signed in to change notification settings - Fork 4
231 lines (224 loc) · 8.57 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
name: build and publish v8 libs
on: [push]
env:
V8_VERSION: "12.4"
defaults:
run:
shell: bash
jobs:
build-linux:
# if: ${{ false }} # disable
name: linux
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
platform: [x64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup v8 build tools
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
gclient
fetch v8
- name: fetch beta branch
run: |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
cd $GITHUB_WORKSPACE/v8
git checkout branch-heads/$V8_VERSION
gclient sync
mkdir -p out.gn/${{ matrix.platform }}.release/
- name: Compress headers
run: |
tar -zcvf include.tar.gz v8/include
- name: Upload headers
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/include.tar.gz
name: include.tar.gz
- name: Compress source
run: |
tar -zcvf src.tar.gz v8/src
- name: Upload source
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/src.tar.gz
name: src.tar.gz
- name: build v8 static library
run: |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
cp args.linux.${{ matrix.platform }}.gn $GITHUB_WORKSPACE/v8/out.gn/${{ matrix.platform }}.release/args.gn
cd $GITHUB_WORKSPACE/v8
build/linux/sysroot_scripts/install-sysroot.py --arch=${{ matrix.platform }}
gn gen out.gn/${{ matrix.platform }}.release
ninja -j 4 v8_monolith -C out.gn/${{ matrix.platform }}.release/
- name: Compress static library
run: |
gzip -9 -c ${{ github.workspace }}/v8/out.gn/${{ matrix.platform }}.release/obj/libv8_monolith.a > libv8_monolith-linux-${{ matrix.platform }}.a.gz
- name: Upload static library
uses: actions/upload-artifact@v3
with:
path: libv8_monolith-linux-${{ matrix.platform }}.a.gz
name: libv8_monolith-linux-${{ matrix.platform }}.a.gz
- name: Compress generated source
run: |
tar -zcvf gen-linux-${{ matrix.platform }}.tar.gz v8/out.gn/${{ matrix.platform }}.release/gen
- name: Upload generated source
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/gen-linux-${{ matrix.platform }}.tar.gz
name: gen-linux-${{ matrix.platform }}.tar.gz
build-linux-arm:
# if: ${{ false }} # disable
name: linux-arm
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
platform: [x64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup v8 build tools
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
gclient
fetch v8
- name: fetch beta branch
run: |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
cd $GITHUB_WORKSPACE/v8
git checkout branch-heads/$V8_VERSION
gclient sync
mkdir -p out.gn/arm64.release/
- name: build v8 static library
run: |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
cp args.linux.arm64.gn $GITHUB_WORKSPACE/v8/out.gn/arm64.release/args.gn
cd $GITHUB_WORKSPACE/v8
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
gn gen out.gn/arm64.release
ninja -j 4 v8_monolith -C out.gn/arm64.release/
- name: Compress static library
run: |
gzip -9 -c ${{ github.workspace }}/v8/out.gn/arm64.release/obj/libv8_monolith.a > libv8_monolith-linux-arm64.a.gz
- name: Upload static library
uses: actions/upload-artifact@v3
with:
path: libv8_monolith-linux-arm64.a.gz
name: libv8_monolith-linux-arm64.a.gz
- name: Compress generated source
run: |
tar -zcvf gen-linux-arm64.tar.gz v8/out.gn/arm64.release/gen
- name: Upload generated source
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/gen-linux-arm64.tar.gz
name: gen-linux-arm64.tar.gz
build-mac:
# if: ${{ false }} # disable
name: mac
runs-on: macos-12
strategy:
fail-fast: false
matrix:
platform: [x64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: setup v8 build tools
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
gclient
fetch v8
- name: fetch beta branch
run: |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
cd $GITHUB_WORKSPACE/v8
git checkout branch-heads/$V8_VERSION
gclient sync
mkdir -p out.gn/${{ matrix.platform }}.release/
- name: build v8 static library
run: |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}"
cp args.mac.${{ matrix.platform }}.gn $GITHUB_WORKSPACE/v8/out.gn/${{ matrix.platform }}.release/args.gn
cd $GITHUB_WORKSPACE/v8
gn gen out.gn/${{ matrix.platform }}.release
ninja -j 4 v8_monolith -C out.gn/${{ matrix.platform }}.release/
- name: Compress static library
run: |
gzip -9 -c ${{ github.workspace }}/v8/out.gn/${{ matrix.platform }}.release/obj/libv8_monolith.a > libv8_monolith-mac-${{ matrix.platform }}.a.gz
- name: Upload static library
uses: actions/upload-artifact@v3
with:
path: libv8_monolith-mac-${{ matrix.platform }}.a.gz
name: libv8_monolith-mac-${{ matrix.platform }}.a.gz
- name: Compress generated source
run: |
tar -zcvf gen-mac-${{ matrix.platform }}.tar.gz v8/out.gn/${{ matrix.platform }}.release/gen
- name: Upload generated source
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/gen-mac-${{ matrix.platform }}.tar.gz
name: gen-mac-${{ matrix.platform }}.tar.gz
build-windows:
# if: ${{ false }} # disable
name: windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
platform: [x64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: Install MSVC/MCBuild (Windows)
uses: microsoft/[email protected]
- name: setup v8 build tools
shell: pwsh
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$pwd/depot_tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "DEPOT_TOOLS_WIN_TOOLCHAIN=0" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: fetch v8 source
run: |
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
gclient
fetch v8
cd v8
git checkout branch-heads/$V8_VERSION
gclient sync
- name: build v8 static library
shell: pwsh
run: |
Set-Location -Path v8
New-Item -ItemType directory -Path ./out.gn/${{ matrix.platform }}.release/
Copy-Item "../args.win.${{ matrix.platform }}.gn" -Destination "./out.gn/${{ matrix.platform }}.release/args.gn" -force
gn gen out.gn/${{ matrix.platform }}.release
ninja -j 4 v8_monolith -C out.gn/${{ matrix.platform }}.release/
- name: Compress static library
shell: pwsh
run: |
Compress-Archive -Path v8/out.gn/${{ matrix.platform }}.release/obj/v8_monolith.lib -Destination libv8_monolith-win-${{ matrix.platform }}.zip
- name: Upload static library
uses: actions/upload-artifact@v3
with:
path: libv8_monolith-win-${{ matrix.platform }}.zip
name: libv8_monolith-win-${{ matrix.platform }}.zip
- name: Compress generated source
shell: pwsh
run: |
Compress-Archive -Path v8/out.gn/${{ matrix.platform }}.release/gen -Destination gen-win-${{ matrix.platform }}.zip
- name: Upload generated source
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/gen-win-${{ matrix.platform }}.zip
name: gen-win-${{ matrix.platform }}.zip