-
Notifications
You must be signed in to change notification settings - Fork 725
/
Copy pathconfig.yml
320 lines (302 loc) · 9.3 KB
/
config.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
version: 2.1
orbs:
win: circleci/windows@5.0
executors:
ubuntu:
docker:
- image: buildpack-deps:focal
mac_arm64:
environment:
EMSDK_NOTTY: "1"
# Without this, any `brew install` command will result in self-update of
# brew itself which takes more than 4 minutes.
HOMEBREW_NO_AUTO_UPDATE: "1"
macos:
xcode: "13.4.1"
resource_class: macos.m1.medium.gen1
linux_arm64:
machine:
image: ubuntu-2004:2023.07.1
resource_class: arm.medium
commands:
setup-macos:
steps:
- checkout
- run:
name: Install CMake
command: brew install cmake
test-macos:
steps:
- run:
name: test.sh
command: test/test.sh
- run:
name: test.py
command: |
source emsdk_env.sh
test/test.py
jobs:
flake8:
executor: ubuntu
steps:
- checkout
- run:
name: install pip
command: |
apt-get update -q
apt-get install -q -y python3-pip
- run: python3 -m pip install --upgrade pip
- run: python3 -m pip install flake8==7.1.1
- run: python3 -m flake8 --show-source --statistics --extend-exclude=./scripts
test-linux:
executor: ubuntu
environment:
EMSDK_NOTTY: "1"
# This is needed because the old gcc-7 that is installed on debian/bionic
# generates warnings about unused variables when doing C++17
# destructuring:
# https://github.com/WebAssembly/binaryen/issues/4353
CXXFLAGS: "-Wno-unused-variable"
# I don't know why circleci VMs pretent to have 36 cores but its a lie.
EMSDK_NUM_CORES: "4"
steps:
- checkout
- run:
name: Install debian packages
command: apt-get update -q && apt-get install -q -y cmake build-essential openjdk-8-jre-headless ksh zsh
- run: test/test_node_path.sh
- run: test/test.sh
- run: test/test_source_env.sh
- run:
name: test.py
command: |
source emsdk_env.sh
test/test.py
test-linux-arm64:
executor: linux_arm64
steps:
- checkout
- run:
name: Install debian packages
command: sudo apt-get update -q && sudo apt-get install -q cmake build-essential openjdk-8-jre-headless
- run: test/test.sh
test-mac-arm64:
executor: mac_arm64
steps:
- setup-macos
- test-macos
test-windows:
executor:
name: win/server-2019
shell: bash.exe
environment:
# We need python installed before we can test anytyhing.
# There seems to be undocument copy of python installed here. Hopefully
# if this disappears there will be another way of getting a re-installed
# version.
PYTHON_BIN: "C:\\Python27amd64"
PYTHONUNBUFFERED: "1"
EMSDK_NOTTY: "1"
steps:
- checkout
- run:
name: Add python to bash path
command: echo "export PATH=\"$PATH:/c/python27amd64/\"" >> $BASH_ENV
- run:
name: Install latest
shell: cmd.exe
command: test\test.bat
- run:
name: test.py
command: |
source emsdk_env.sh
python test/test.py
- run:
name: flagless (process/shell) test
shell: powershell.exe
command: |
test/test_activation.ps1
- run:
name: --permanent test
shell: powershell.exe
command: |
$env:PERMANENT_FLAG="--permanent"
test/test_activation.ps1
- run:
name: --system test
shell: powershell.exe
command: |
$env:SYSTEM_FLAG="--system"
test/test_activation.ps1
- run:
name: Process/Shell PATH preservation test
shell: powershell.exe
command: |
test/test_path_preservation.ps1
- run:
name: User PATH preservation test
shell: powershell.exe
command: |
$env:PERMANENT_FLAG="--permanent"
test/test_path_preservation.ps1
- run:
name: System PATH preservation test
shell: powershell.exe
command: |
$env:SYSTEM_FLAG="--system"
test/test_path_preservation.ps1
build-docker-image-x64:
executor: ubuntu
steps:
- checkout
- run:
name: install docker
command: |
apt-get update -q
apt-get install -q -y ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -q
apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
- setup_remote_docker
# Build the `latest` version of EMSDK as docker image
- run:
name: build
command: make -C ./docker version=latest build
- run:
name: test
command: make -C ./docker version=latest test
publish-docker-image-x64:
executor: ubuntu
steps:
- checkout
- run:
name: install docker
command: |
apt-get update -q
apt-get install -q -y ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update -q
apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
- setup_remote_docker
- run:
name: build
command: make -C ./docker version=${CIRCLE_TAG} build
- run:
name: test
command: make -C ./docker version=${CIRCLE_TAG} test
- run:
name: push image
command: |
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
make -C ./docker version=${CIRCLE_TAG} alias=latest push
publish-docker-image-arm64:
executor: linux_arm64
steps:
- checkout
- run:
name: build
command: make -C ./docker version=${CIRCLE_TAG} build
- run:
name: test
command: make -C ./docker version=${CIRCLE_TAG} test
- run:
name: push image
command: |
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
make -C ./docker version=${CIRCLE_TAG} alias=${CIRCLE_TAG}-arm64 only_alias=true push
test-bazel-linux:
executor: ubuntu
steps:
- checkout
- run: apt-get install -q -y curl gnupg
- run: curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg
- run: mv bazel.gpg /etc/apt/trusted.gpg.d/
- run: echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
- run:
name: install pip
command: |
apt-get update -q
apt-get install -q -y python3-pip
- run: pip3 install absl-py
- run:
name: install bazel
command: |
apt-get install -q -y bazel-7.4.1
- run: test/test_bazel.sh
test-bazel-mac-arm64:
executor: mac_arm64
environment:
USE_BAZEL_VERSION: "7.4.1"
steps:
- checkout
- run:
name: install bazelisk
command: |
brew install bazelisk
- run: test/test_bazel_mac.sh
test-bazel-windows:
executor:
name: win/server-2019
shell: powershell.exe -ExecutionPolicy Bypass
environment:
PYTHONUNBUFFERED: "1"
EMSDK_NOTTY: "1"
USE_BAZEL_VERSION: "5.4.0"
steps:
- checkout
- run:
name: Download Bazelisk
shell: powershell.exe
command: |
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest -Uri https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-windows-amd64.exe -OutFile ( New-Item -Path "temp\bazel\bazel.exe" -Force )
- run:
name: Run Tests
shell: powershell.exe
command: |
$env:Path += ";C:\Python27amd64;$pwd\temp\bazel"
.\test\test_bazel.ps1
workflows:
flake8:
jobs:
- flake8
test-linux:
jobs:
- test-linux
test-linux-arm64:
jobs:
- test-linux-arm64
test-mac-arm64:
jobs:
- test-mac-arm64
test-windows:
jobs:
- test-windows
build-docker-image:
jobs:
- build-docker-image-x64
- publish-docker-image-x64:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
- publish-docker-image-arm64:
filters:
branches:
ignore: /.*/
tags:
only: /.*/
test-bazel-linux:
jobs:
- test-bazel-linux
test-bazel-mac-arm64:
jobs:
- test-bazel-mac-arm64
test-bazel-windows:
jobs:
- test-bazel-windows