Skip to content

Commit bee06b5

Browse files
mvuksanomhevery
authored andcommitted
chore(travis): initial travis setup
1 parent 91c35c0 commit bee06b5

File tree

5 files changed

+77
-0
lines changed

5 files changed

+77
-0
lines changed

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: node_js
2+
node_js:
3+
- 0.10
4+
5+
env:
6+
matrix:
7+
- JOB=unit-stable
8+
- JOB=unit-dev
9+
10+
before_script:
11+
- ./scripts/travis/setup.sh
12+
13+
script:
14+
- ./scripts/travis/build.sh
15+
16+
after_success:
17+
- ./scripts/travis/benchmark.sh

scripts/env.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
set -e
3+
4+
if [ -n "$DART_SDK" ]; then
5+
DARTSDK=$DART_SDK
6+
else
7+
echo "sdk=== $DARTSDK"
8+
DART=`which dart|cat` # pipe to cat to ignore the exit code
9+
DARTSDK=`which dart | sed -e 's/\/bin\/dart$/\//'`
10+
if [ -z "$DARTSDK" ]; then
11+
DARTSDK="`pwd`/dart-sdk"
12+
fi
13+
fi
14+
15+
export DART_SDK="$DARTSDK"
16+
export DART=${DART:-"$DARTSDK/bin/dart"}
17+
export PUB=${PUB:-"$DARTSDK/bin/pub"}
18+
export DARTANALYZER=${DARTANALYZER:-"$DARTSDK/bin/dartanalyzer"}
19+
export DARTDOC=${DARTDOC:-"$DARTSDK/bin/dartdoc"}
20+
21+
22+
export DART_FLAGS='--enable_type_checks --enable_asserts'
23+
export PATH=$PATH:$DARTSDK/bin

scripts/travis/benchmark.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -e
3+
. ./scripts/env.sh
4+
5+
./run-benchmarks.sh

scripts/travis/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -e
3+
. ./scripts/env.sh
4+
5+
./run-tests.sh

scripts/travis/setup.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
case $( uname -s ) in
6+
Linux)
7+
DART_SDK_ZIP=dartsdk-linux-x64-release.zip
8+
;;
9+
Darwin)
10+
DART_SDK_ZIP=dartsdk-macos-x64-release.zip
11+
;;
12+
esac
13+
14+
CHANNEL=`echo $JOB | cut -f 2 -d -`
15+
echo Fetch Dart channel: $CHANNEL
16+
17+
echo http://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/sdk/$DART_SDK_ZIP
18+
curl http://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/sdk/$DART_SDK_ZIP > $DART_SDK_ZIP
19+
echo Fetched new dart version $(unzip -p $DART_SDK_ZIP dart-sdk/version)
20+
rm -rf dart-sdk
21+
unzip $DART_SDK_ZIP > /dev/null
22+
rm $DART_SDK_ZIP
23+
24+
echo =============================================================================
25+
. ./scripts/env.sh
26+
$DART --version
27+
$PUB install

0 commit comments

Comments
 (0)