Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 5b974c4

Browse files
vicbjbdeboer
authored andcommitted
chore(Travis): tweak build scripts
Closes #1025
1 parent a5d5c2b commit 5b974c4

File tree

4 files changed

+42
-40
lines changed

4 files changed

+42
-40
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
language: node_js
22
node_js:
33
- "0.11"
4-
addons:
5-
firefox: "28.0"
64
env:
75
matrix:
86
- JOB=unit-stable
97
CHANNEL=stable
108
TESTS=dart2js
9+
BROWSERS=ChromeNoSandbox,Firefox
1110
- JOB=unit-dev
1211
CHANNEL=dev
1312
TESTS=dart2js
13+
BROWSERS=ChromeNoSandbox,Firefox
1414
- JOB=unit-dev
1515
CHANNEL=dev
1616
TESTS=vm
17+
BROWSERS=Dartium
1718
- JOB=unit-stable
1819
CHANNEL=stable
1920
TESTS=vm
21+
BROWSERS=Dartium
2022
global:
23+
- FIREFOX_VERSION="29.0"
2124
- CHROME_BIN=/usr/bin/google-chrome
2225
- secure: "AKoqpZ699egF0i4uT/FQ5b4jIc0h+KVbhtVCql0uFxwFIl2HjOYgDayrUCAf6USfpW0LghZxJJhBamWOl/505eNSe9HvEd8JLg/to+1Fo9xi9llsu5ehmNH31/5pue4EvsrVuEap1qqL6/BNwI2cAryayU0p5tV0g8gL5h4IxG8="
2326

scripts/travis/build.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ else
9191
)
9292
fi
9393

94-
BROWSERS=Dartium,ChromeNoSandbox,FireFox
95-
if [[ $TESTS == "dart2js" ]]; then
96-
BROWSERS=ChromeNoSandbox,Firefox;
97-
elif [[ $TESTS == "vm" ]]; then
98-
BROWSERS=Dartium;
99-
fi
100-
10194
echo '-----------------------'
10295
echo '-- TEST: AngularDart --'
10396
echo '-----------------------'

scripts/travis/install.sh

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
#!/bin/bash
22

3-
set -exv
3+
set -e
44

55
sh -e /etc/init.d/xvfb start
6-
sudo apt-get update -qq
7-
sudo apt-get install -qq unzip chromium-browser
8-
sudo apt-get install libxss1
9-
10-
if [[ $TESTS != "vm" ]]; then
11-
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb;
12-
dpkg -I google-chrome*.deb;
13-
sudo dpkg -i google-chrome*.deb;
14-
sudo chmod u+s /opt;
6+
7+
DARTIUM_ZIP=http://storage.googleapis.com/dart-archive/channels/$CHANNEL/raw/latest/dartium/dartium-linux-x64-release.zip
8+
FF_TAR=http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2
9+
CHROME_DEB=https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
10+
11+
shopt -s nocasematch
12+
13+
if [[ $BROWSERS =~ "dartium" ]]; then
14+
echo "Installing Dartium from $DARTIUM_ZIP"
15+
curl $DARTIUM_ZIP > dartium.zip
16+
unzip dartium.zip > /dev/null
17+
rm -rf dartium
18+
rm dartium.zip
19+
mv dartium-* dartium
1520
fi
21+
22+
if [[ $BROWSERS =~ "chrome" ]]; then
23+
echo "Installing Chrome from $CHROME_DEB"
24+
wget $CHROME_DEB
25+
dpkg -I google-chrome*.deb
26+
sudo dpkg -i google-chrome*.deb
27+
sudo chmod u+s /opt
28+
fi
29+
30+
if [[ $BROWSERS =~ "firefox" ]]; then
31+
echo "Installing Firefox from $FF_TAR"
32+
sudo mkdir -p /usr/local/firefox-$FIREFOX_VERSION
33+
sudo chmod u+s /usr/local/firefox-$FIREFOX_VERSION
34+
wget -O /tmp/firefox.tar.bz2 $FF_TAR
35+
cd /usr/local/firefox-$FIREFOX_VERSION
36+
sudo tar xf /tmp/firefox.tar.bz2
37+
sudo ln -sf /usr/local/firefox-$FIREFOX_VERSION/firefox/firefox /usr/local/bin/firefox
38+
sudo ln -sf /usr/local/firefox-$FIREFOX_VERSION/firefox/firefox-bin /usr/local/bin/firefox-bin
39+
export FIREFOX_BIN=/usr/local/bin/firefox
40+
fi

scripts/travis/setup.sh

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,16 @@
22

33
set -e
44

5-
case $( uname -s ) in
6-
Linux)
7-
DART_SDK_ZIP=dartsdk-linux-x64-release.zip
8-
DARTIUM_ZIP=dartium-linux-x64-release.zip
9-
;;
10-
Darwin)
11-
DART_SDK_ZIP=dartsdk-macos-x64-release.zip
12-
DARTIUM_ZIP=dartium-macos-ia32-release.zip
13-
;;
14-
esac
155

16-
CHANNEL=`echo $JOB | cut -f 2 -d -`
176
echo Fetch Dart channel: $CHANNEL
187

8+
DART_SDK_ZIP=dartsdk-linux-x64-release.zip
9+
1910
echo http://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/sdk/$DART_SDK_ZIP
2011
curl http://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/sdk/$DART_SDK_ZIP > $DART_SDK_ZIP
2112
echo Fetched new dart version $(unzip -p $DART_SDK_ZIP dart-sdk/version)
2213
rm -rf dart-sdk
2314
unzip $DART_SDK_ZIP > /dev/null
24-
rm $DART_SDK_ZIP
25-
26-
if [[ $TESTS != "dart2js" ]]; then
27-
echo http://storage.googleapis.com/dart-archive/channels/$CHANNEL/raw/latest/dartium/$DARTIUM_ZIP
28-
curl http://storage.googleapis.com/dart-archive/channels/$CHANNEL/raw/latest/dartium/$DARTIUM_ZIP > $DARTIUM_ZIP
29-
unzip $DARTIUM_ZIP > /dev/null
30-
rm -rf dartium
31-
rm $DARTIUM_ZIP
32-
mv dartium-* dartium;
33-
fi
3415

3516
echo =============================================================================
3617
. ./scripts/env.sh

0 commit comments

Comments
 (0)