chore(build): split Dart and JS builds
This commit is contained in:
parent
8f6c45f9e2
commit
6197ab0e48
11
.travis.yml
11
.travis.yml
|
@ -9,21 +9,20 @@ env:
|
||||||
- LOGS_DIR=/tmp/angular-build/logs
|
- LOGS_DIR=/tmp/angular-build/logs
|
||||||
- ARCH=linux-x64
|
- ARCH=linux-x64
|
||||||
matrix:
|
matrix:
|
||||||
- CHANNEL=stable
|
- MODE=js DART_CHANNEL=stable
|
||||||
- CHANNEL=dev
|
- MODE=dart DART_CHANNEL=stable
|
||||||
|
- MODE=dart DART_CHANNEL=dev
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- export DISPLAY=:99.0
|
- export DISPLAY=:99.0
|
||||||
- export GIT_SHA=$(git rev-parse HEAD)
|
- export GIT_SHA=$(git rev-parse HEAD)
|
||||||
- ./scripts/ci/init_android.sh
|
- ./scripts/ci/init_android.sh
|
||||||
- ./scripts/ci/install_dart.sh
|
- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${ARCH}
|
||||||
- sh -e /etc/init.d/xvfb start
|
- sh -e /etc/init.d/xvfb start
|
||||||
- if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi
|
- if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p $LOGS_DIR
|
- mkdir -p $LOGS_DIR
|
||||||
script:
|
script:
|
||||||
- ./scripts/ci/build.sh
|
- ./scripts/ci/build_and_test.sh ${MODE}
|
||||||
- ./scripts/ci/test_unit.sh
|
|
||||||
- ./scripts/ci/test_e2e.sh
|
|
||||||
after_script:
|
after_script:
|
||||||
- ./scripts/ci/print-logs.sh
|
- ./scripts/ci/print-logs.sh
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MODE=$1
|
||||||
|
|
||||||
|
echo =============================================================================
|
||||||
|
# go to project dir
|
||||||
|
SCRIPT_DIR=$(dirname $0)
|
||||||
|
cd $SCRIPT_DIR/../..
|
||||||
|
|
||||||
|
${SCRIPT_DIR}/build_$MODE.sh
|
||||||
|
${SCRIPT_DIR}/test_unit_$MODE.sh
|
||||||
|
${SCRIPT_DIR}/test_e2e_$MODE.sh
|
|
@ -7,6 +7,6 @@ SCRIPT_DIR=$(dirname $0)
|
||||||
source $SCRIPT_DIR/env_dart.sh
|
source $SCRIPT_DIR/env_dart.sh
|
||||||
cd $SCRIPT_DIR/../..
|
cd $SCRIPT_DIR/../..
|
||||||
|
|
||||||
./node_modules/.bin/gulp build
|
./node_modules/.bin/gulp build.js.cjs build.dart
|
||||||
|
|
||||||
pub install
|
pub install
|
|
@ -4,7 +4,8 @@ set -e
|
||||||
echo =============================================================================
|
echo =============================================================================
|
||||||
# go to project dir
|
# go to project dir
|
||||||
SCRIPT_DIR=$(dirname $0)
|
SCRIPT_DIR=$(dirname $0)
|
||||||
|
# this is needed because we're running JS tests in Dartium too
|
||||||
source $SCRIPT_DIR/env_dart.sh
|
source $SCRIPT_DIR/env_dart.sh
|
||||||
cd $SCRIPT_DIR/../..
|
cd $SCRIPT_DIR/../..
|
||||||
|
|
||||||
./node_modules/.bin/gulp ci --browsers=$KARMA_BROWSERS
|
./node_modules/.bin/gulp build.js
|
|
@ -1,13 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e -x
|
||||||
|
|
||||||
AVAILABLE_DART_VERSION=$(curl "https://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/VERSION" | python -c \
|
DART_CHANNEL=$1
|
||||||
|
ARCH=$2
|
||||||
|
|
||||||
|
AVAILABLE_DART_VERSION=$(curl "https://storage.googleapis.com/dart-archive/channels/${DART_CHANNEL}/release/latest/VERSION" | python -c \
|
||||||
'import sys, json; print(json.loads(sys.stdin.read())["version"])')
|
'import sys, json; print(json.loads(sys.stdin.read())["version"])')
|
||||||
|
|
||||||
echo Fetch Dart channel: $CHANNEL
|
echo Fetch Dart channel: ${DART_CHANNEL}
|
||||||
|
|
||||||
URL_PREFIX=https://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest
|
URL_PREFIX=https://storage.googleapis.com/dart-archive/channels/${DART_CHANNEL}/release/latest
|
||||||
DART_SDK_URL="$URL_PREFIX/sdk/dartsdk-$ARCH-release.zip"
|
DART_SDK_URL="$URL_PREFIX/sdk/dartsdk-$ARCH-release.zip"
|
||||||
DARTIUM_URL="$URL_PREFIX/dartium/dartium-$ARCH-release.zip"
|
DARTIUM_URL="$URL_PREFIX/dartium/dartium-$ARCH-release.zip"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ function killServer () {
|
||||||
kill $serverPid
|
kill $serverPid
|
||||||
}
|
}
|
||||||
|
|
||||||
./node_modules/.bin/gulp serve.js.prod serve.js.dart2js&
|
./node_modules/.bin/gulp serve.js.dart2js&
|
||||||
serverPid=$!
|
serverPid=$!
|
||||||
|
|
||||||
trap killServer EXIT
|
trap killServer EXIT
|
||||||
|
@ -21,5 +21,4 @@ trap killServer EXIT
|
||||||
# wait for server to come up!
|
# wait for server to come up!
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
./node_modules/.bin/protractor protractor-e2e-js.conf.js --browsers=$E2E_BROWSERS
|
|
||||||
./node_modules/.bin/protractor protractor-e2e-dart2js.conf.js --browsers=$E2E_BROWSERS
|
./node_modules/.bin/protractor protractor-e2e-dart2js.conf.js --browsers=$E2E_BROWSERS
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo =============================================================================
|
||||||
|
# go to project dir
|
||||||
|
SCRIPT_DIR=$(dirname $0)
|
||||||
|
source $SCRIPT_DIR/env_dart.sh
|
||||||
|
cd $SCRIPT_DIR/../..
|
||||||
|
|
||||||
|
./node_modules/.bin/webdriver-manager update
|
||||||
|
|
||||||
|
function killServer () {
|
||||||
|
kill $serverPid
|
||||||
|
}
|
||||||
|
|
||||||
|
./node_modules/.bin/gulp serve.js.prod&
|
||||||
|
serverPid=$!
|
||||||
|
|
||||||
|
trap killServer EXIT
|
||||||
|
|
||||||
|
# wait for server to come up!
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
./node_modules/.bin/protractor protractor-e2e-js.conf.js --browsers=$E2E_BROWSERS
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo =============================================================================
|
||||||
|
# go to project dir
|
||||||
|
SCRIPT_DIR=$(dirname $0)
|
||||||
|
source $SCRIPT_DIR/env_dart.sh
|
||||||
|
cd $SCRIPT_DIR/../..
|
||||||
|
|
||||||
|
./node_modules/.bin/gulp test.transpiler.unittest
|
||||||
|
./node_modules/.bin/gulp test.dart/ci --browsers=$KARMA_BROWSERS
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo =============================================================================
|
||||||
|
# go to project dir
|
||||||
|
SCRIPT_DIR=$(dirname $0)
|
||||||
|
source $SCRIPT_DIR/env_dart.sh
|
||||||
|
cd $SCRIPT_DIR/../..
|
||||||
|
|
||||||
|
./node_modules/.bin/gulp test.transpiler.unittest
|
||||||
|
./node_modules/.bin/gulp test.js/ci --browsers=$KARMA_BROWSERS
|
Loading…
Reference in New Issue