-
Notifications
You must be signed in to change notification settings - Fork 0
230 lines (203 loc) · 7.54 KB
/
ci.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
name: Build
on: [push]
jobs:
build:
name: Build
permissions: write-all
strategy:
matrix:
target:
#- id: 'linux-amd64'
# os: 'ubuntu-24.04'
# native: true
#- id: 'linux-arm64'
# os: 'ubuntu-24.04-arm'
# native: true
#- id: 'linux-musl'
# os: 'ubuntu-24.04'
# native: true
# container: alpine:3.19
#- id: 'darwin-amd64'
# os: 'macos-13'
# native: true
#- id: 'darwin-aarch64'
# os: 'macos-14'
# native: true
#- id: 'ios'
# os: 'macos-14'
# native: false # Not used in the `Build` job, but here for reference
#- id: 'android'
# os: 'ubuntu-24.04'
# native: false # Not used in the `Build` job, but here for reference
- id: 'windows-amd64'
os: 'windows-2022'
native: true
# When unpacking an archive on Windows, the symlinks can't be
# created unless the target path already exists. This causes
# problems when the linked file is ordered after the link
# inside the archive. Dereferencing the files when packing them
# adds an additional copy per link, but it reliably works and
# the additional size is not too large on Windows.
tar_extra_args: '--dereference'
tag: ['11.7']
fail-fast: true
runs-on: ${{ matrix.target.os }}
container: ${{ matrix.target.container }}
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Install dependencies on Ubuntu
if: startsWith(matrix.target.id, 'linux-amd64')
shell: bash
run: |
sudo apt-get install ninja-build clang libglib2.0-dev -y
- name: Install dependencies on Ubuntu (arm64)
if: startsWith(matrix.target.id, 'linux-arm64')
shell: bash
run: |
sudo apt-get install ninja-build clang libglib2.0-dev -y
- name: Install dependencies on Alpine
if: startsWith(matrix.target.id, 'linux-musl')
run: |
apk add ninja bash git cmake clang-dev llvm-dev wget python3 alpine-sdk curl git tar xz py3-virtualenv py3-google-auth-httplib2 py3-httplib2 py3-distutils-extra py3-setuptools py3-pip gn
python3 -m pip config set global.break-system-packages true
python3 -m pip uninstall six --yes
python3 -m pip install --upgrade --user six
- name: Install dependencies on macOS
if: startsWith(matrix.target.id, 'darwin-')
shell: bash
run: |
brew install ninja llvm@18
- name: Set default Xcode on macOS (aarch64)
if: startsWith(matrix.target.id, 'darwin-aarch64')
shell: bash
run: |
sudo xcode-select -s /Applications/Xcode_16.2.app
- name: Install dependencies on Windows
if: startsWith(matrix.target.id, 'windows-')
shell: bash
run: |
choco install ninja
- name: Setup MSVC (Windows)
uses: ilammy/msvc-dev-cmd@v1
if: matrix.target.id == 'windows-amd64'
- name: Build (native target)
if: matrix.target.id != 'windows-amd64' && matrix.target.id != 'linux-musl' && matrix.target.native == true
shell: bash
run: |
./build.sh
- name: Build (android)
if: matrix.target.os == 'ubuntu-24.04' && matrix.target.id == 'android'
shell: bash
run: |
./build.sh "arm" "android"
- name: Build (iOS)
if: matrix.target.os == 'macos-14' && matrix.target.id == 'ios'
shell: bash
run: |
./build.sh "arm64" "ios"
- name: Build musl
if: matrix.target.id == 'linux-musl'
shell: bash
run: |
CXX=clang++-18 ./build.sh
env:
VPYTHON_BYPASS: "manually managed python not supported by chrome operations"
- name: Build (Windows)
if: matrix.target.id == 'windows-amd64'
run: |
./build.ps1
- name: Zip
if: matrix.target.id != 'windows-amd64'
shell: bash
run: |
mkdir -p dist
tar --directory v8/out/release --create --xz --verbose ${{ matrix.target.tar_extra_args }} --file dist/wee8.tar.xz obj/libwee8.a
ls -lh dist/wee8.tar.xz
- name: Zip (Windows)
if: matrix.target.id == 'windows-amd64'
shell: bash
run: |
mkdir -p dist
tar --directory v8/out/release --create --xz --verbose ${{ matrix.target.tar_extra_args }} --file dist/wee8.tar.xz obj/wee8.lib
ls -lh dist/wee8.tar.xz
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target.id }}-${{ matrix.tag }}
path: dist
if-no-files-found: error
retention-days: 1
release:
name: Release
runs-on: ubuntu-latest
permissions: write-all
needs: [build]
strategy:
matrix:
tag: ['11.7']
steps:
- name: Download the Artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Inspect
shell: bash
run: |
ls -laGiR ./*
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ matrix.tag }}
name: Release ${{ matrix.tag }}
allowUpdates: true
draft: false
prerelease: false
- name: Upload Release Asset Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/linux-amd64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-linux-amd64.tar.xz
asset_content_type: application/gzip
- name: Upload Release Asset Linux musl
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/linux-musl-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-linux-musl.tar.xz
asset_content_type: application/gzip
- name: Upload Release Asset Darwin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/darwin-amd64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-darwin-amd64.tar.xz
asset_content_type: application/gzip
- name: Upload Release Asset Darwin (aarch64)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/darwin-aarch64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-darwin-aarch64.tar.xz
asset_content_type: application/gzip
- name: Upload Release Asset Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/windows-amd64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-windows-amd64.tar.xz
asset_content_type: application/gzip