-
Notifications
You must be signed in to change notification settings - Fork 36
/
.travis.yml
128 lines (117 loc) · 4.13 KB
/
.travis.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
---
language: node_js
node_js:
- 12
- 14
- 16
dist: xenial
services:
- xvfb
before_install:
- export DISPLAY=:99.0
- export PATH=$PATH:"$HOME/.esvu/bin"
# - sh -e /etc/init.d/xvfb start
env:
# Shells
# - ESHOST_TARGET=ch
- ESHOST_TARGET=engine262
- ESHOST_TARGET=jsshell
- ESHOST_TARGET=node
- ESHOST_TARGET=qjs
- ESHOST_TARGET=xs
# # Browsers
- ESHOST_TARGET=firefox
- ESHOST_TARGET=chrome
# - ESHOST_TARGET=remote ESHOST_REMOTE_BROWSERNAME=firefox
install: |
# Shells
export ESHOST_SKIP_CH=1
export ESHOST_SKIP_D8=1
export ESHOST_SKIP_ENGINE262=1
export ESHOST_SKIP_GRAALJS=1
export ESHOST_SKIP_HERMES=1
export ESHOST_SKIP_JSC=1
export ESHOST_SKIP_JSSHELL=1
export ESHOST_SKIP_QJS=1
export ESHOST_SKIP_NODE=1
export ESHOST_SKIP_XS=1
# Browsers
export ESHOST_SKIP_CHROME=1
export ESHOST_SKIP_FIREFOX=1
export ESHOST_SKIP_REMOTE=1
function install_firefox {
export TMP=$(mktemp);
wget https://archive.mozilla.org/pub/firefox/nightly/2021/05/2021-05-11-09-33-39-mozilla-central/firefox-90.0a1.en-US.linux-x86_64.tar.bz2 -O $TMP;
tar -xvf $TMP;
wget https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz -O $TMP;
tar --directory firefox -xvf $TMP;
rm $TMP;
unset TMP;
}
if [[ "$ESHOST_TARGET" == "node" ]]; then
unset ESHOST_SKIP_NODE;
elif [[ "$ESHOST_TARGET" == "engine262" ]]; then
unset ESHOST_SKIP_ENGINE262;
elif [[ "$ESHOST_TARGET" == "qjs" ]]; then
unset ESHOST_SKIP_QJS;
elif [[ "$ESHOST_TARGET" == "graaljs" ]]; then
unset ESHOST_SKIP_GRAALJS;
elif [[ "$ESHOST_TARGET" == "jsshell" ]]; then
unset ESHOST_SKIP_JSSHELL;
elif [[ "$ESHOST_TARGET" == "hermes" ]]; then
unset ESHOST_SKIP_HERMES;
elif [[ "$ESHOST_TARGET" == "xs" ]]; then
unset ESHOST_SKIP_XS;
elif [[ "$ESHOST_TARGET" == "firefox" ]]; then
install_firefox;
export PATH=$(pwd)/firefox:$PATH;
unset ESHOST_SKIP_FIREFOX;
elif [[ "$ESHOST_TARGET" == "ch" ]]; then
wget https://s3.amazonaws.com/eshost-builds/ChakraCore-Debug_linux_1_7_0.tar.gz;
tar -xvf ChakraCore-Debug_linux_1_7_0.tar.gz;
export PATH=$PATH:$(pwd)/out/Debug;
unset ESHOST_SKIP_CH;
elif [[ "$ESHOST_TARGET" == "chrome" ]]; then
channel=unstable
deb_archive=google-chrome-${channel}_current_amd64.deb
wget https://dl.google.com/linux/direct/$deb_archive
# If the environment provides an installation of Google Chrome, the
# existing binary may take precedence over the one introduced in this
# script. Remove any previously-existing "alternatives" prior to
# installation in order to ensure that the new binary is installed as
# intended.
if sudo update-alternatives --list google-chrome; then
sudo update-alternatives --remove-all google-chrome
fi
# Installation will fail in cases where the package has unmet dependencies.
# When this occurs, attempt to use the system package manager to fetch the
# required packages and retry.
if ! sudo dpkg --install $deb_archive; then
sudo apt-get install --fix-broken
sudo dpkg --install $deb_archive
fi
mkdir chrome
ln -s $(which google-chrome) chrome/chrome
wget https://chromedriver.storage.googleapis.com/91.0.4472.19/chromedriver_linux64.zip
unzip -d chrome chromedriver_linux64.zip
PATH=$PATH:$(pwd)/chrome
unset ESHOST_SKIP_CHROME;
elif [[ "$ESHOST_TARGET" == "remote" ]]; then
install_firefox;
wget http://selenium-release.storage.googleapis.com/4.0/selenium-server-standalone-4.0.0-alpha-2.jar
PATH=$PATH:$(pwd)/firefox java -jar selenium-server-standalone-4.0.0-alpha-2.jar &> selenium-server.log &
unset ESHOST_SKIP_REMOTE;
else
exit 1;
fi
npm install --ignore-scripts;
npm install esvu -g;
esvu --engines=all;
# esvu --engines=engine262,quickjs,spidermonkey,v8,xs;
script:
- npm run lint
- npm run test
after_script: |
if [[ "$ESHOST_TARGET" == "remote" ]]; then
cat selenium-server.log
fi