-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Expand file tree
/
Copy pathconfig.yml
More file actions
1366 lines (1355 loc) · 47.2 KB
/
Copy pathconfig.yml
File metadata and controls
1366 lines (1355 loc) · 47.2 KB
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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: 2.1
orbs:
win: circleci/windows@5.0
macos: circleci/macos@2.4.1
executors:
linux-node:
docker:
- image: cimg/node:24.13.1
ubuntu-lts:
docker:
- image: emscripten/emscripten-ci:jammy.v2
environment:
LANG: "C.UTF-8"
EMCC_CORES: "4"
EMSDK_NOTTY: "1"
EMTEST_WASI_SYSROOT: "~/wasi-sdk/wasi-sysroot"
EMTEST_DETECT_TEMPFILE_LEAKS: "1"
mac-arm64:
environment:
EMSDK_NOTTY: "1"
macos:
xcode: "16.4.0"
resource_class: m4pro.medium
commands:
install-browser:
description: "Install browser"
parameters:
browser_name:
description: "Name of the the browser to install"
type: string
steps:
- run:
name: download browser (<< parameters.browser_name >>)
command: |
npx --yes @puppeteer/browsers install << parameters.browser_name >> --format={{path}} | tee browser_path.txt
BROWSER_PATH=`cat browser_path.txt`
echo "browser installed to: ${BROWSER_PATH}"
"${BROWSER_PATH}" --version
echo "export EMTEST_BROWSER=\"${BROWSER_PATH}\"" >> $BASH_ENV
emsdk-env:
description: "emsdk_env.sh"
steps:
- run:
name: emsdk_env.sh
command: |
EMSDK_BASH=1 ~/emsdk/emsdk construct_env >> $BASH_ENV
# In order make our external version of emscripten use the emsdk
# config we need to explicitly set EM_CONFIG here.
echo "export EM_CONFIG=~/emsdk/.emscripten" >> $BASH_ENV
bootstrap:
description: "bootstrap"
steps:
- run: "$EMSDK_PYTHON ./bootstrap.py"
pip-install:
description: "pip install"
parameters:
python:
description: "Python executable to use"
type: string
default: python3
steps:
- run:
name: pip install
command: << parameters.python >> -m pip install -r requirements-dev.txt
install-rust:
steps:
- run:
name: install rust and wasm-bindgen
# rust and wasm-bindgen are always installed together so there is no
# CI environment with one but not the other. The wasm-bindgen-cli
# version is pinned to match the library the test crate depends on;
# wasm-bindgen requires the CLI and the library to be the exact same
# version.
command: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH=${HOME}/.cargo/bin:${PATH}
rustup target add wasm32-unknown-emscripten
echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> $BASH_ENV
cargo install wasm-bindgen-cli --version 0.2.126 --locked
install-node-version:
description: "install a specific version of node"
parameters:
node_version:
description: "version of node to install"
type: string
canary:
description: "install a canary version of node"
type: boolean
default: false
steps:
- run:
name: setup node v<< parameters.node_version >>
command: |
cd $HOME
version=<< parameters.node_version >>
if [[ << parameters.canary >> == "true" ]]; then
wget https://nodejs.org/download/v8-canary/v${version}/node-v${version}-linux-x64.tar.xz
else
wget https://nodejs.org/dist/v${version}/node-v${version}-linux-x64.tar.xz
fi
tar xf node-v${version}-linux-x64.tar.xz
echo "NODE_JS_TEST = [os.path.expanduser('~/node-v${version}-linux-x64/bin/node')]" >> ~/emsdk/.emscripten
echo "JS_ENGINES = [NODE_JS_TEST]" >> ~/emsdk/.emscripten
echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> ~/emsdk/.emscripten
cat ~/emsdk/.emscripten
echo "export PATH=\"$HOME/node-v${version}-linux-x64/bin:\$PATH\"" >> $BASH_ENV
install-node-oldest:
description: "install node 18.3.0 (oldest)"
steps:
- install-node-version:
# Keep this in sync with `OLDEST_SUPPORTED_NODE` in `feature_matrix.py`
node_version: "18.3.0"
install-node-lts:
description: "install node 22.21.0 (current LTS)"
steps:
- install-node-version:
node_version: "22.21.0"
install-node-newest:
description: "install node 26.3.0 (newest)"
steps:
- install-node-version:
node_version: "26.3.0"
install-v8:
description: "install v8 using jsvu"
steps:
- run:
name: get v8
command: |
# We can't use a more recent version of node here because the linux
# image we are using doesn't have a recent enough glibc.
cd $HOME
wget https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz
tar -xf node-v15.14.0-linux-x64.tar.xz
export PATH="`pwd`/node-v15.14.0-linux-x64/bin:${PATH}"
npm install jsvu -g
jsvu --os=default --engines=v8
install-emsdk:
description: "Install emsdk"
steps:
- run:
name: install emsdk
command: |
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
tar -C ~ -xf ~/emsdk-main.tar.gz
mv ~/emsdk-main ~/emsdk
cd ~/emsdk
./emsdk install tot
./emsdk activate tot
# Write the version of clang into a file for use in the ccache key
./upstream/bin/clang --version > clang_version.txt
echo "clang version:"
cat ~/emsdk/clang_version.txt
# Remove the emsdk version of emscripten to save space in the
# persistent workspace and to avoid any confusion with the version
# we are trying to test.
rm -Rf emscripten
echo "import os" >> .emscripten
# We use an out-of-tree cache directory so it can be part of the
# persisted workspace (see below).
echo "CACHE = os.path.expanduser('~/cache')" >> .emscripten
# Refer to commit 0bc3640 if we need to pin V8 version.
echo "V8_ENGINE = [os.path.expanduser('~/.jsvu/bin/v8')]" >> .emscripten
echo "JS_ENGINES = [NODE_JS]" >> .emscripten
echo "if os.path.exists(V8_ENGINE[0]): JS_ENGINES.append(V8_ENGINE)" >> .emscripten
echo "WASM_ENGINES = []" >> .emscripten
test -f ~/vms/wasmtime && echo "WASMTIME = os.path.expanduser(os.path.join('~', 'vms', 'wasmtime')) ; WASM_ENGINES.append(WASMTIME)" >> .emscripten || true
test -f ~/vms/wasmer && echo "WASMER = os.path.expanduser(os.path.join('~', 'vms', 'wasmer')) ; WASM_ENGINES.append(WASMER)" >> .emscripten || true
test -d ~/wasi-sdk && cp -a ~/wasi-sdk/lib/ $(~/emsdk/upstream/bin/clang -print-resource-dir)
cd -
echo "final .emscripten:"
cat ~/emsdk/.emscripten
- emsdk-env
- bootstrap
build-libs:
description: "Build all libraries"
steps:
- run:
name: clear cache
command: |
./emcc --clear-cache
- pip-install
- run: apt-get install -q -y ninja-build ccache
- run:
name: Ccache stats and configuration
command: |
ccache -s
ccache --print-stats
ccache -p
- run:
name: embuilder build ALL
command: |
./embuilder build ALL
./test/runner test_hello_world
- run:
name: embuilder (LTO)
command: |
./embuilder build MINIMAL --lto
- run:
name: embuilder (WASM64)
command: |
./embuilder build MINIMAL --wasm64
- run:
name: embuilder (PIC)
command: |
./embuilder build MINIMAL_PIC --pic
- run:
name: embuilder (PIC+WASM64)
command: |
./embuilder build MINIMAL_PIC --pic --wasm64
- run:
name: embuilder (PIC+LTO)
command: |
./embuilder build MINIMAL --pic --lto
- run:
name: "Ccache stats and configuration"
command: |
ls -l ~/cache/sysroot/lib/wasm32-emscripten || echo "no build"
ls -l ~/cache/sysroot/include/emscripten/heap.h
cat ~/cache/sysroot/lib/wasm32-emscripten/crtbegin-mt.o.ccache-log
date
cat ~/cache/build/libclang_rt.builtins/absvdi2.o.ccache-log
ccache -s
ccache --print-stats
ccache -p
ccache --zero-stats
persist:
description: "Persist the emsdk, libraries, and engines"
steps:
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory
root: ~/
# Must be relative path from root
paths:
- emsdk/
- cache/
- vms/
- wasi-sdk/
- .jsvu/
- when:
# Only the main branch will store its cache results, and only the non-main branches
# will use cached results. This prevents untrusted PRs from polluting caches used
# by other branches.
condition:
equal: [ "main", << pipeline.git.branch >> ]
steps:
- save_cache:
name: "Save Ccache cache"
paths:
- ~/.ccache
key: clang-{{ checksum "~/emsdk/clang_version.txt" }}
prepare-for-tests:
description: "Setup emscripten tests"
steps:
- attach_workspace:
# Must be absolute path or relative path from working_directory
at: ~/
- checkout
- emsdk-env
- bootstrap
- pip-install
- when:
# We only set EMTEST_RETRY_FLAKY on pull requests. When we run
# normal CI jobs on branches like main we still want to be able to
# detect flakyness.
condition: ${CIRCLE_PULL_REQUEST}
steps:
- set-retry-flaky-tests
remove-linux-binaries:
description: "Remove linux binaries from workspace"
steps:
- run:
name: "Remove Linux binaries"
command: rm -rf ~/emsdk ~/vms ~/.jsvu ~/wasi-sdk
upload-test-results:
description: "Upload test results"
steps:
- store_test_results:
path: out/test-results.xml
run-tests:
description: "Runs emscripten tests"
parameters:
test_targets:
description: "Test suites to run"
type: string
title:
description: "Name of given test suite"
type: string
default: ""
extra-cflags:
description: "Extra EMCC_CFLAGS"
type: string
default: ""
steps:
- run:
name: run tests (<< parameters.title >>)
environment:
EMCC_CFLAGS: << parameters.extra-cflags >>
command: |
env
./test/runner << parameters.test_targets >>
$EMSDK_PYTHON ./test/check_clean.py
freeze-cache:
description: "Freeze emscripten cache"
steps:
- run:
name: Add EM_FROZEN_CACHE to bash env
command: echo "export EM_FROZEN_CACHE=1" >> $BASH_ENV
set-retry-flaky-tests:
description: "Set EMTEST_RETRY_FLAKY"
steps:
- run:
name: Add EMTEST_RETRY_FLAKY to bash env
command: echo "export EMTEST_RETRY_FLAKY=2" >> $BASH_ENV
run-tests-linux:
description: "Runs emscripten tests"
parameters:
test_targets:
description: "Test suites to run"
type: string
frozen_cache:
description: "Run with cache frozen"
type: boolean
default: true
title:
description: "Name of given test suite"
type: string
default: ""
steps:
- prepare-for-tests
- when:
condition: << parameters.frozen_cache >>
steps:
- freeze-cache
- run-tests:
test_targets: << parameters.test_targets >>
title: << parameters.title >>
- upload-test-results
run-tests-chrome:
description: "Runs browser tests under chrome"
parameters:
test_targets:
description: "Test suites to run"
type: string
title:
description: "Name of given test suite"
type: string
default: ""
steps:
- prepare-for-tests
- install-browser:
browser_name: chrome@canary
- run:
name: run tests (<< parameters.title >>)
environment:
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
EMTEST_HEADLESS: "1"
EMTEST_CORES: "2"
command: |
# There are tests in the browser test suite that using libraries
# that are not included by "./embuilder build ALL". For example the
# PIC version of libSDL which is used by test_sdl2_misc_main_module
export EM_FROZEN_CACHE=""
test/runner << parameters.test_targets >>
- upload-test-results
setup-macos:
steps:
- macos/install-rosetta
- run:
name: Install brew package dependencies
environment:
HOMEBREW_NO_AUTO_UPDATE: "1"
# Use --force-bottle to force homebrew use binary packages avoiding
# costly build times.
command: brew install --force-bottle cmake ninja pkg-config
- attach_workspace:
at: ~/
- checkout
- remove-linux-binaries
run-tests-firefox:
description: "Runs emscripten tests under firefox"
parameters:
test_targets:
description: "Test suites to run"
type: string
title:
description: "Name of given test suite"
type: string
default: ""
steps:
- install-browser:
browser_name: firefox@nightly
- run:
name: Add audio dependencies
command: |
# This should add and start PulseAudio's dummy mixer. It will warn
# that "This program is not intended to be run as root" but it can
# be ignored.
# (Use the presence of apt-get here to detect linux, where we don't
# want to run this elsewhere).
if which apt-get; then
pulseaudio --start
fi
- run:
name: run tests (<< parameters.title >>)
environment:
GALLIUM_DRIVER: softpipe # TODO: use the default llvmpipe when it supports more extensions
# TODO: Do GL testing when https://bugzil.la/1375585 (lack of WebGL
# support in headless mode) resolves
EMTEST_LACKS_GRAPHICS_HARDWARE: "1"
# TODO(https://github.com/emscripten-core/emscripten/issues/24205)
EMTEST_LACKS_SOUND_HARDWARE: "1"
EMTEST_LACKS_WEBGPU: "1"
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
EMTEST_HEADLESS: "1"
EMTEST_CORES: "2"
DISPLAY: ":0"
command: |
# There are tests in the browser test suite that using libraries
# that are not included by "./embuilder build ALL". For example the
# PIC version of libSDL which is used by test_sdl2_misc_main_module
export EM_FROZEN_CACHE=""
echo "-----"
echo "Running browser tests (EMTEST_BROWSER=$EMTEST_BROWSER)"
echo "-----"
test/runner << parameters.test_targets >>
# posix and emrun suites are disabled because firefox errors on
# "Firefox is already running, but is not responding."
# TODO: find out a way to shut down and restart firefox
- upload-test-results
test-sockets-chrome:
description: "Runs emscripten sockets tests under chrome"
steps:
- prepare-for-tests
- install-browser:
browser_name: chrome@canary
- run:
name: run sockets tests
environment:
EMTEST_LACKS_SOUND_HARDWARE: "1"
EMTEST_DETECT_TEMPFILE_LEAKS: "0"
EMTEST_HEADLESS: "1"
EMTEST_CORES: "2"
command: |
test/runner sockets
- upload-test-results
jobs:
build-docs:
executor: ubuntu-lts
steps:
- checkout
- pip-install
- run: tools/maint/update_settings_docs.py --check
- run: make -C site text
- run: tools/maint/check_emcc_help_text.py
- run: make -C site html
ruff:
executor: ubuntu-lts
steps:
- checkout
- pip-install
- run: ruff check
vulture:
executor: ubuntu-lts
steps:
- checkout
- pip-install
- run: vulture . --min-confidence 100
mypy:
executor: ubuntu-lts
steps:
- checkout
- pip-install
- run: mypy
eslint:
executor: linux-node
steps:
- checkout
- run: npm ci
- run: |
npm run lint
npm run check
test-sanity:
executor: ubuntu-lts
steps:
- run-tests-linux:
frozen_cache: false
test_targets: "sanity"
build-linux:
executor: ubuntu-lts
# xlarge has 4x the cores of the default medium, costs 4x as much, and runs
# in about 1/2 the time, so it is not cost-effective (overall it is 2x the
# cost for the same work), but given this blocks almost all the other jobs
# we want it to finish asap
resource_class: xlarge
environment:
EMCC_CORES: 16
EMCC_USE_NINJA: 1
EM_COMPILER_WRAPPER: "ccache"
steps:
- checkout
- run:
name: get wasmer
command: |
wget https://github.com/wasmerio/wasmer/releases/download/v3.1.1/wasmer-linux-amd64.tar.gz
tar -xf wasmer-linux-amd64.tar.gz
mkdir ~/vms
cp bin/wasmer ~/vms
- run:
name: get wasmtime
command: |
# use a pinned version due to https://github.com/bytecodealliance/wasmtime/issues/714
export VERSION=v0.33.0
wget https://github.com/bytecodealliance/wasmtime/releases/download/$VERSION/wasmtime-$VERSION-x86_64-linux.tar.xz
tar -xf wasmtime-$VERSION-x86_64-linux.tar.xz
cp wasmtime-$VERSION-x86_64-linux/wasmtime ~/vms
- run:
name: get wasi-sdk-sysroot
command: |
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/libclang_rt.builtins-wasm32-wasi-11.0.tar.gz
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-11/wasi-sysroot-11.0.tar.gz
mkdir ~/wasi-sdk
tar xvf libclang_rt.builtins-wasm32-wasi-11.0.tar.gz -C ~/wasi-sdk
tar xvf wasi-sysroot-11.0.tar.gz -C ~/wasi-sdk/
- install-v8
- install-emsdk
- when:
condition:
not:
equal: [ "main", << pipeline.git.branch >> ]
steps:
- restore_cache:
name: "Restore Ccache cache"
key: clang-{{ checksum "~/emsdk/clang_version.txt" }}
- run:
name: Configure ccache
command: |
mkdir -p ~/.ccache
cat .circleci/ccache.conf
cp .circleci/ccache.conf ~/.ccache
- build-libs
- run:
name: Clean build directory
command: rm -rf ~/cache/build
- persist
# Perhaps we don't need to run this suite with every commit. Consider moving this to FYI bot.
test-posixtest:
executor: ubuntu-lts
steps:
- run-tests-linux:
test_targets: "posixtest"
test-core0:
executor: ubuntu-lts
environment:
EMTEST_SKIP_NODE_25: "1"
steps:
- run-tests-linux:
test_targets: "core0"
test-core2:
executor: ubuntu-lts
environment:
EMTEST_BROWSER: "node"
EMTEST_SKIP_NODE_25: "1"
steps:
- run-tests-linux:
# also run a few asan tests. Run these with frozen_cache disabled
# since we don't pre-build all the asan libraries.
frozen_cache: false
title: "asan+lsan"
test_targets: "
asan.test_stat
asan.test_stack
asan.test_float_builtins
asan.test_embind*
asan.test_abort_on_exceptions
asan.test_ubsan_full_left_shift_fsanitize_integer
asan.test_pthread*
asan.test_dyncall_specific_minimal_runtime
asan.test_async_hello
asan.test_dlfcn_basic
asan.test_async_hello_jspi
asan.test_cubescript
asan.test_externref_emjs_dynlink
asan.test_asyncify_longjmp
asan.test_pthread_run_on_main_thread
asan.test_minimal_runtime_global_initializer
asan.test_fs_js_api_wasmfs
asan.test_modularize_instance_pthreads
asan.test_minimal_runtime_hello_world
asan.test_select_blocking
asan.test_ppoll_blocking
lsan.test_dylink_dso_needed
lsan.test_stdio_locking
lsan.test_dlfcn_basic
lsan.test_pthread_create
lsan.test_pthread_exit_main_stub
lsan.test_dylink_iostream
lsan.test_embind_lib_with_asyncify
ubsan.test_dlfcn_self
ubsan.test_externref_emjs_dynlink"
- freeze-cache
- run-tests:
# also run a single test of EMTEST_BROWSER=node.
# also run a corez test of dynamic linking + forced syslibs.
title: "core2+extras"
test_targets: "
core2
browser.test_pthread_join
corez.test_dylink_syslibs_all"
- upload-test-results
test-core3:
executor: ubuntu-lts
environment:
EMTEST_SKIP_NODE_25: "1"
steps:
- run-tests-linux:
frozen_cache: false
# also add a little select testing for wasm2js in -O3
# also add a little select wasmfs testing
title: "core3+extras"
test_targets: "
lto2.test_dylink_syslibs_all
lto2.test_float_builtins
lto2.test_avx_nontrapping
lto0.test_exceptions_allowed_uncaught
lto0.test_longjmp_standalone_standalone
lto0.test_embind_i64_val
lto0.test_wasm_worker_futex_wait
thinlto0.test_pthread_dlsym
core3
core2g.test_externref
corez.test_dylink_iostream
core2ss.test_pthread_dylink
core2ss.test_pthread_dylink_tls
core2ss.test_pthread_thread_local_storage
core2ss.test_wasm_worker_futex_wait
core2s.test_dylink_syslibs_missing_assertions
core2s.test_module_wasm_memory
cores.test_minimal_runtime_safe_heap
wasm2js0.test_autodebug_wasm
wasm2js3.test_memorygrowth_2
wasm2js2.test_pthread_proxying
wasmfs.test_hello_world
wasmfs.test_pipe_select
wasmfs.test_unistd_links*
wasmfs.test_atexit_standalone
wasmfs.test_emscripten_get_now
wasmfs.test_dyncall_specific_minimal_runtime
wasmfs.test_fcntl_misc
wasmfs.test_readdir_rawfs
wasmfs.test_utime
wasmfs.test_unistd_unlink
wasmfs.test_unistd_dup
wasmfs.test_unistd_access
wasmfs.test_unistd_close
wasmfs.test_unistd_truncate
wasmfs.test_readdir
wasmfs.test_readdir_unlink
wasmfs.test_unistd_pipe
wasmfs.test_unistd_io
wasmfs.test_unistd_curdir
wasmfs.test_poll
wasmfs.test_fs_64bit
wasmfs.test_fs_write
wasmfs.test_fs_writev
wasmfs.test_fs_writev_rawfs
wasmfs.test_fs_readv
wasmfs.test_fs_write
wasmfs.test_fs_readv_rawfs
wasmfs.test_fs_nodefs_nofollow
wasmfs.test_fs_nodefs_readdir
wasmfs.test_fs_nodefs_home
wasmfs.test_fs_nodefs_cloexec
wasmfs.test_fs_nodefs_cloexec_rawfs
wasmfs.test_fs_errorstack
wasmfs.test_fs_errorstack_rawfs
wasmfs.test_fs_emptyPath
wasmfs.test_webidl
wasmfs.test_dlfcn_self
wasmfs.test_dlfcn_unique_sig
wasmfs.test_dylink_basics
wasmfs.test_exit_status
wasmfs.test_minimal_runtime_memorygrowth
wasmfs.test_mmap_anon*
wasmfs.test_mount
wasmfs.test_getcwd_with_non_ascii_name
wasmfs.test_stat
wasmfs.test_fstatat
wasmfs.test_futimens
wasmfs.test_unistd_links
wasmfs.test_fcntl_open
wasmfs.test_fs_llseek
wasmfs.test_fs_llseek_rawfs
wasmfs.test_freetype
wasmfs.test_unistd_close_rawfs
wasmfs.test_exceptions_minimal_runtime
wasmfs.test_minimal_runtime_safe_heap
wasmfs.test_minimal_runtime_global_initializer
wasmfs.test_minimal_runtime_hello_world*
wasmfs.test_dlmalloc
minimal0.test_utf
minimal0.test_ubsan_full_stack_trace_gsource_map
minimal0.test_static_variable
minimal0.test_stack_overflow
omitexports0.test_asyncify_longjmp
omitexports0.test_emscripten_api
strict.test_no_declare_asm_module_exports
strict.test_dylink_global_inits_reversed
strict.test_wasm_worker_futex_wait_pthreads
"
test-modularize-instance:
executor: ubuntu-lts
environment:
EMTEST_SKIP_NODE_25: "1"
steps:
- run-tests-linux:
test_targets: "instance"
test-stress:
executor: ubuntu-lts
environment:
EMTEST_SKIP_NODE_25: "1"
steps:
- run-tests-linux:
test_targets: "stress"
test-esm-integration:
executor: ubuntu-lts
steps:
- prepare-for-tests
- install-node-newest
- run-tests:
title: "esm_integration"
test_targets: "esm_integration"
- upload-test-results
test-wasm2js1:
environment:
EMTEST_SKIP_NODE_25: "1"
executor: ubuntu-lts
steps:
- run-tests-linux:
test_targets: "wasm2js1"
test-wasm64-4gb:
environment:
LANG: "C.UTF-8"
executor: ubuntu-lts
steps:
- prepare-for-tests
- install-node-newest
# When running wasm64 tests we need to make sure we use the latest
# version of node when running the compiler output (e.g. in configure
# tests).
- run:
name: configure node (newest)
command: echo "NODE_JS = NODE_JS_TEST" >> ~/emsdk/.emscripten
- run-tests:
title: "wasm64_4gb"
test_targets: "wasm64_4gb"
- upload-test-results
test-wasm64-misc:
environment:
LANG: "C.UTF-8"
executor: ubuntu-lts
steps:
- prepare-for-tests
- install-node-newest
# When running wasm64 tests we need to make sure we use the latest
# version of node when running the compiler output (e.g. in configure
# tests).
- run:
name: configure node (newest)
command: echo "NODE_JS = NODE_JS_TEST" >> ~/emsdk/.emscripten
- run-tests:
title: "wasm64"
test_targets: "
other.*_wasm64*
core_2gb.test_*em_asm*
core_2gb.test_*embind*
core_2gb.test_fs_js_api_wasmfs
wasm64.test_safe_stack
wasm64.test_promise_await*
wasm64.test_pthread_join_and_asyncify
wasm64l.test_hello_world
wasm64l.test_bigswitch
wasm64l.test_module_wasm_memory
wasm64l.test_longjmp2_emscripten
wasm64l.test_embind_val_basics_legacy"
- upload-test-results
test-bun:
executor: ubuntu-lts
environment:
EMTEST_SKIP_NEW_CMAKE: "1"
EMTEST_SKIP_WASM64: "1"
steps:
- checkout
- pip-install
- install-emsdk
- run:
name: install bun
command: |
curl -fsSL https://bun.com/install | bash
echo "BUN = os.path.expanduser('~/.bun/bin/bun')" >> ~/emsdk/.emscripten
echo "JS_ENGINES = [BUN]" >> ~/emsdk/.emscripten
- run-tests:
test_targets: "--crossplatform-only"
test-deno:
executor: ubuntu-lts
environment:
EMTEST_SKIP_NEW_CMAKE: "1"
steps:
- checkout
- pip-install
- install-emsdk
- run:
name: install deno
command: |
curl -fsSL https://deno.land/install.sh | sh
echo "DENO = os.path.expanduser('~/.deno/bin/deno')" >> ~/emsdk/.emscripten
echo "JS_ENGINES = [DENO]" >> ~/emsdk/.emscripten
- run-tests:
test_targets: "--crossplatform-only"
test-jsc:
executor: ubuntu-lts
steps:
- checkout
- pip-install
- install-emsdk
- run:
name: install jsc
command: |
cd $HOME
wget https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.xz
tar -xf node-v18.12.0-linux-x64.tar.xz
export PATH="`pwd`/node-v18.12.0-linux-x64/bin:${PATH}"
npm install jsvu -g
jsvu --os=default --engines=javascriptcore
echo "JSC_ENGINE = [os.path.expanduser('~/.jsvu/bin/javascriptcore')]" >> ~/emsdk/.emscripten
echo "JS_ENGINES = [JSC_ENGINE]" >> ~/emsdk/.emscripten
- run-tests:
test_targets: "
core0.test_hello_argc
other.test_modularize_incoming
other.test_modularize_incoming_export_name"
test-spidermonkey:
executor: ubuntu-lts
steps:
- checkout
- pip-install
- install-emsdk
- run:
name: install spidermonkey
command: |
cd $HOME
wget https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64.tar.xz
tar -xf node-v18.12.0-linux-x64.tar.xz
export PATH="`pwd`/node-v18.12.0-linux-x64/bin:${PATH}"
npm install jsvu -g
jsvu --os=default --engines=spidermonkey
echo "SPIDERMONKEY_ENGINE = [os.path.expanduser('~/.jsvu/bin/spidermonkey')]" >> ~/emsdk/.emscripten
echo "JS_ENGINES = [SPIDERMONKEY_ENGINE]" >> ~/emsdk/.emscripten
- run-tests:
test_targets: "
other.test_prepost_jspi
other.test_stdint_limits_wasm64
core0.test_hello_argc
core2.test_demangle_stacks_symbol_map"
- upload-test-results
test-node-compat:
executor: ubuntu-lts
environment:
LANG: "C.UTF-8"
EMTEST_SKIP_V8: "1"
steps:
- checkout
- pip-install
- install-emsdk
# `install-node-version` only changes the NODE_JS_TEST (the version of
# node used to run test), not NODE_JS (the version of node used to run the
# compiler itself).
# In order to test that the compiler itself can run under the oldest
# supported version of node, we run all the tests in the runner under that
# version.
# Keep this in sync with MINIMUM_NODE_VERSION in tools/shared.py.
- install-node-version:
node_version: "18.3.0"
- run:
name: configure compiler to use 18.3.0
command: echo "NODE_JS = '$(which node)'" >> ~/emsdk/.emscripten
# Run some basic tests with the minimum version of node that we currently
# support in the generated code.
- install-node-oldest
- run-tests:
title: "node (oldest / 18.3.0)"
# We include most but not all of the nodefs and node rawfs tests here.
# test_fs_nodefs_rw, test_fs_nodefs_statvfs, and test_unistd_io_nodefs_bigint fail.
test_targets: "
other.test_embind_tsgen_remove_relaxed_simd
other.test_gen_struct_info
other.test_native_call_before_init
other.test_js_optimizer_verbose
other.test_file_packager_separate_metadata
other.test_full_js_library*
core2.test_hello_world
core2.test_fcntl_open_nodefs
core2.test_fcntl_open_rawfs
core2.test_fgetc_ungetc_nodefs
core2.test_fgetc_ungetc_rawfs
core2.test_fs_append_rawfs
core2.test_fs_emptyPath_rawfs
core2.test_fs_enotdir_nodefs
core2.test_fs_enotdir_rawfs
core2.test_fs_errorstack_rawfs
core2.test_fs_llseek_rawfs
core2.test_fs_mkdir_dotdot_nodefs
core2.test_fs_mkdir_dotdot_rawfs
core2.test_fs_mmap_nodefs
core2.test_fs_mmap_rawfs
core2.test_fs_nodefs_cloexec
core2.test_fs_nodefs_cloexec_rawfs
core2.test_fs_nodefs_dup
core2.test_fs_nodefs_dup_rawfs
core2.test_fs_nodefs_home
core2.test_fs_nodefs_nofollow
core2.test_fs_nodefs_readdir
core2.test_fs_noderawfs_nofollow
core2.test_fs_readdir_ino_matches_stat_ino_nodefs
core2.test_fs_readdir_ino_matches_stat_ino_rawfs
core2.test_fs_readv_rawfs
core2.test_fs_rename_on_existing_nodefs
core2.test_fs_rename_on_existing_rawfs
core2.test_fs_symlink_resolution_nodefs
core2.test_fs_symlink_resolution_rawfs
core2.test_fs_writeFile*
core2.test_fs_write_rawfs
core2.test_fs_writev_rawfs
core2.test_futimens_rawfs
core2.test_readdir_rawfs
core2.test_stat_chmod_rawfs
core2.test_unistd_access_nodefs
core2.test_unistd_access_rawfs
core2.test_unistd_close_rawfs
core2.test_unistd_dup_rawfs
core2.test_unistd_io_nodefs
core2.test_unistd_links_nodefs
core2.test_unistd_misc_nodefs
core2.test_unistd_pipe_rawfs
core2.test_unistd_symlink_on_nodefs
core2.test_unistd_truncate_nodefs
core2.test_unistd_truncate_rawfs
core2.test_unistd_unlink_nodefs
core2.test_unistd_unlink_rawfs
core2.test_unistd_write_broken_link_rawfs
"
# Run a few test with the most recent LTS version of node
- install-node-lts
- run-tests:
# Run tests that on older versions of node would require flags, but
# those flags should not be injected on newer versions.
title: "node (lts)"
test_targets: "-v
other.test_gen_struct_info
other.test_native_call_before_init
other.test_js_optimizer_verbose
other.test_min_node_version
other.test_node_emscripten_num_logical_cores
other.test_exceptions_stack_trace*
other.test_exceptions_rethrow_stack_trace*
core2.test_pthread_create
core2.test_i64_invoke_bigint
core2.test_sse2
core2.test_source_map
core2.test_exceptions_wasm_legacy
core2.test_pthread_unhandledrejection
"
# Run a few test with the most recent version of node
- install-node-newest
- run-tests:
# Run tests that on older versions of node would require flags, but
# those flags should not be injected on newer versions.
title: "node (newest)"
test_targets: "-v
other.test_deterministic
other.test_gen_struct_info
other.test_native_call_before_init
other.test_*growable_arraybuffers
other.test_add_js_function_bigint_memory64
other.test_js_optimizer_verbose
other.test_min_node_version
other.test_node_emscripten_num_logical_cores
other.test_js_base64_api
other.test_pthread_growth*
other.test_memory_growth
core2.test_hello_world
core2.test_pthread_create
core2.test_i64_invoke_bigint
core2.test_sse2
core2.test_source_map