forked from StarCross-Tech/v8-action
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.39 KB
/
v8.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
name: Build v8
on:
push:
branches:
- master
env:
PATCH_FLAG: false
COMMIT: 0
DEPOT_UPLOAD: false
SRC_UPLOAD: true
BINARY_UPLOAD: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
# init environment
- name: init env
run: |
sudo apt update
sudo apt -y install pkg-config git subversion curl wget build-essential python2 xz-utils zip p7zip-full
# get depot_tools
- name: depot_tools
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo export PATH=\"\$PATH:`pwd`/depot_tools/\" >> ~/.bash_profile
# fetch v8 source code
- name: fetch v8
run: |
source ~/.bash_profile
fetch v8
cd v8
# patch source code
- name: patch v8
if: env.PATCH_FLAG == 'true' && !cancelled()
run: |
cd v8
git reset --hard $COMMIT
cd ..
- name: build v8
run: |
source ~/.bash_profile
gclient sync -f
# compress this file
- name: zip depot_tools
if: env.DEPOT_UPLOAD == 'true' && !cancelled()
run: |
zip -q -r depot_tools.zip depot_tools
# 7zip v8 src
- name: 7zip v8_src
run: |
zip -q -r v8.zip v8
7z a v8.7z ./v8.zip -v2048m
# upload depot_tools.zip to cowtransfer
- name: upload depot_tools
if: env.DEPOT_UPLOAD == 'true' && !cancelled()
run: |
curl -fsSL git.io/file-transfer | sh
./transfer cow --block 2621440 -s -p 64 --no-progress depot_tools.zip 2>&1 | tee cowtransfer.log
echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)"
# upload v8.zip to cowtransfer
- name: upload v8_src
if: env.SRC_UPLOAD == 'true' && !cancelled()
run: |
curl -fsSL git.io/file-transfer | sh
./transfer cow --block 2621440 -s -p 64 --no-progress v8.7z.001 2>&1 | tee cowtransfer.log
echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)"
./transfer cow --block 2621440 -s -p 64 --no-progress v8.7z.002 2>&1 | tee cowtransfer.log
echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)"