-
Notifications
You must be signed in to change notification settings - Fork 43
194 lines (187 loc) · 5.97 KB
/
release.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
name: Release
on:
push:
tags:
- "v*.*.*"
env:
RUNNER: tools/run-tests.py
BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
jobs:
build-mac64:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
brew update
brew install ninja icu4c@75
- name: Build x64
run: |
# check cpu
sysctl -a | grep machdep.cpu
# add icu path to pkg_config_path
brew --prefix icu4c@75
export PKG_CONFIG_PATH="/usr/local/opt/icu4c@75/lib/pkgconfig:$PKG_CONFIG_PATH"
cmake -H. -Bout/ $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es
mv out/escargot out/escargot-mac64
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mac64-result
path: out/escargot-mac64
build-mac64arm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
brew update
brew install ninja icu4c@75
- name: Build arm64
run: |
# check cpu
sysctl -a | grep machdep.cpu
# add icu path to pkg_config_path
brew --prefix icu4c@75
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c@75/lib/pkgconfig:$PKG_CONFIG_PATH"
cmake -H. -Bout/ $BUILD_OPTIONS
ninja -Cout/
- name: Check
run: |
file out/escargot
strip out/escargot
$RUNNER --engine="$GITHUB_WORKSPACE/out/escargot" new-es
mv out/escargot out/escargot-mac64arm
- name: Upload
uses: actions/upload-artifact@v4
with:
name: mac64arm-result
path: out/escargot-mac64arm
build-windows:
runs-on: windows-2022
strategy:
matrix:
arch: [x86, x64]
steps:
- name: Set git cllf config
run: |
git config --global core.autocrlf input
git config --global core.eol lf
- uses: actions/checkout@v4
with:
submodules: true
- uses: szenius/[email protected]
with:
timezoneWindows: "Pacific Standard Time"
- uses: lukka/get-cmake@latest
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 20348
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install msvc redist package
run: |
(new-object System.Net.WebClient).DownloadFile('https://github.com/abbodi1406/vcredist/releases/download/v0.73.0/VisualCppRedist_AIO_x86_x64.exe','VisualCppRedist_AIO_x86_x64.exe')
.\VisualCppRedist_AIO_x86_x64.exe /y
- uses: ilammy/[email protected]
with:
arch: ${{ matrix.arch }}
sdk: "10.0.20348.0"
- name: Build ${{ matrix.arch }}
run: |
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -DESCARGOT_ARCH=${{ matrix.arch }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
CMake --build out/ --config Release
- name: Check
run: |
python tools\run-tests.py --engine=%cd%\out\escargot.exe new-es
rename out\escargot.exe escargot-win-${{ matrix.arch }}.exe
shell: cmd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: win-${{ matrix.arch }}-result
path: out\escargot-win-${{ matrix.arch }}.exe
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
# for i386 ICU
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y ninja-build libicu-dev gcc-multilib g++-multilib
sudo apt-get install -y libicu-dev:i386 # install i386 ICU
- name: Build x86/x64
run: |
cmake -H. -Bout/x86 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=x86 -DESCARGOT_TEMPORAL=ON $BUILD_OPTIONS
cmake -H. -Bout/x64 -DESCARGOT_TEMPORAL=ON $BUILD_OPTIONS
ninja -Cout/x86
ninja -Cout/x64
- name: Check
run: |
file out/x86/escargot
file out/x64/escargot
strip out/x86/escargot
strip out/x64/escargot
# set locale
sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
locale
# run test
$RUNNER --engine="$GITHUB_WORKSPACE/out/x86/escargot" new-es
$RUNNER --engine="$GITHUB_WORKSPACE/out/x64/escargot" new-es
mv out/x86/escargot out/escargot-linux-x86
mv out/x64/escargot out/escargot-linux-x64
- name: Upload
uses: actions/upload-artifact@v4
with:
name: linux-result
path: out/escargot-linux-*
update-release:
needs: [build-mac64, build-mac64arm, build-windows, build-linux]
runs-on: ubuntu-latest
steps:
- name: Download mac64 result
uses: actions/download-artifact@v4
with:
name: mac64-result
path: artifacts
- name: Download mac64arm result
uses: actions/download-artifact@v4
with:
name: mac64arm-result
path: artifacts
- name: Download win32 result
uses: actions/download-artifact@v4
with:
name: win-x86-result
path: artifacts
- name: Download win64 result
uses: actions/download-artifact@v4
with:
name: win-x64-result
path: artifacts
- name: Download linux result
uses: actions/download-artifact@v4
with:
name: linux-result
path: artifacts
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/escargot-*