feat: travis-ci integration
This commit is contained in:
20
scripts/travis/build.sh
Executable file
20
scripts/travis/build.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
cd $SCRIPT_DIR/../..
|
||||
source ./scripts/env.sh
|
||||
|
||||
./node_modules/.bin/gulp build
|
||||
|
||||
pub install
|
||||
|
||||
./node_modules/karma/bin/karma start karma-js.conf \
|
||||
--reporters=dots \
|
||||
--browsers=$BROWSERS --single-run
|
||||
./node_modules/karma/bin/karma start karma-dart.conf \
|
||||
--reporters=dots \
|
||||
--browsers=$BROWSERS --single-run
|
35
scripts/travis/install.sh
Executable file
35
scripts/travis/install.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
AVAILABLE_DART_VERSION=$(curl "https://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/VERSION" | python -c \
|
||||
'import sys, json; print(json.loads(sys.stdin.read())["version"])')
|
||||
|
||||
echo Fetch Dart channel: $CHANNEL
|
||||
|
||||
SVN_REVISION=latest
|
||||
# TODO(chirayu): Remove this once issue 20896 is fixed.
|
||||
# Dart 1.7.0-dev.1.0 and 1.7.0-dev.2.0 are both broken so use version
|
||||
# 1.7.0-dev.0.1 instead.
|
||||
if [[ "$AVAILABLE_DART_VERSION" == "1.7.0-dev.2.0" ]]; then
|
||||
SVN_REVISION=39661 # Use version 1.7.0-dev.0.1
|
||||
fi
|
||||
|
||||
URL_PREFIX=https://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/$SVN_REVISION
|
||||
DART_SDK_URL=$URL_PREFIX/sdk/dartsdk-linux-x64-release.zip
|
||||
DARTIUM_URL=$URL_PREFIX/dartium/dartium-linux-x64-release.zip
|
||||
|
||||
download_and_unzip() {
|
||||
ZIPFILE=${1/*\//}
|
||||
curl -O -L $1 && unzip -q $ZIPFILE && rm $ZIPFILE
|
||||
}
|
||||
|
||||
# TODO: do these downloads in parallel
|
||||
download_and_unzip $DART_SDK_URL
|
||||
download_and_unzip $DARTIUM_URL
|
||||
|
||||
echo Fetched new dart version $(<dart-sdk/version)
|
||||
|
||||
if [[ -n $DARTIUM_URL ]]; then
|
||||
mv dartium-* chromium
|
||||
fi
|
11
scripts/travis/print-logs.sh
Executable file
11
scripts/travis/print-logs.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOG_FILES=$LOGS_DIR/*
|
||||
|
||||
for FILE in $LOG_FILES; do
|
||||
echo -e "\n\n\n"
|
||||
echo "================================================================================"
|
||||
echo " $FILE"
|
||||
echo "================================================================================"
|
||||
cat $FILE
|
||||
done
|
Reference in New Issue
Block a user