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

Commit 83f0f94

Browse files
committed
chore(travis): fix failures for g3stable/g3v1x. bail early.
- bail early when we can. - g3v1x requires a newer version of Dart than 1.5.8. Quickly mark the job as successful if we're testing something that's descended from the g3v1x branch and we're attempting to use the SDK at this version. - the g3stable jobs do not make sense if one is testing a branch descended from g3v1x. Bail early with success for those jobs.
1 parent 6df87ae commit 83f0f94

File tree

2 files changed

+47
-15
lines changed

2 files changed

+47
-15
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ branches:
6060
before_install:
6161
- export DISPLAY=:99.0
6262
- ./scripts/travis/install.sh
63+
- if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi
6364
before_script:
6465
- mkdir -p $LOGS_DIR
6566
- ./scripts/travis/setup.sh

scripts/travis/install.sh

+46-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,47 @@
22

33
set -e -o pipefail
44

5-
sh -e /etc/init.d/xvfb start
5+
# Fail fasts.
6+
7+
git merge-base --is-ancestor 44577768e6bd4ac649703f6172c2490bce4f9132 HEAD && \
8+
G3V1X_LINEAGE=1 || G3V1X_LINEAGE=0
9+
10+
if [[ "$USE_G3" == "YES" && "$G3V1X_LINEAGE" == "1" ]]; then
11+
exec > >(tee SKIP_TRAVIS_TESTS)
12+
echo '==================================================================='
13+
echo '== SKIPPING script: The current SHA is already a descendent of =='
14+
echo '== g3v1x making USE_G3 redundant. =='
15+
echo '==================================================================='
16+
exit 0
17+
fi
18+
19+
AVAILABLE_DART_VERSION=$(curl "https://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/VERSION" | python -c \
20+
'import sys, json; print(json.loads(sys.stdin.read())["version"])')
21+
22+
# g3v1x and Dart 1.5.8
23+
# --------------------
24+
# Skip tests for branches based on the g3v1x channel with Dart 1.5.8.
25+
# g3v1x uses dependency overrides that cannot be satisfied by the pub tool
26+
# shipper in Dart version 1.5.8.
27+
#
28+
# Ref: https://travis-ci.org/angular/angular.dart/jobs/33106780
29+
#
30+
# Dart VM version: 1.5.8 (Tue Jul 29 07:05:41 2014) on "linux_x64"
31+
# Resolving dependencies...
32+
# Incompatible version constraints on barback:
33+
# - angular 0.13.0 depends on version 0.14.1+3
34+
# - pub itself depends on version >=0.13.0 <0.14.1
35+
if [[ "$USE_G3" == "YES" && "$AVAILABLE_DART_VERSION" == "1.5.8" ]]; then
36+
exec > >(tee SKIP_TRAVIS_TESTS)
37+
echo '==================================================================='
38+
echo '== SKIPPING script: The g3stable job is rebased on the g3v1x =='
39+
echo '== branch. The g3v1x branch cannot be tested with Dart =='
40+
echo '== version 1.5.8. The dependency overrides require a newer =='
41+
echo '== version of Dart. =='
42+
echo '== Ref: https://travis-ci.org/angular/angular.dart/jobs/33106780 =='
43+
echo '==================================================================='
44+
exit 0
45+
fi
646

747
DARTIUM_ZIP=http://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/latest/dartium/dartium-linux-x64-release.zip
848

@@ -23,24 +63,15 @@ DART_SDK_ZIP=dartsdk-linux-x64-release.zip
2363

2464
# TODO(chirayu): Remove this once issue 1350 is fixed.
2565
SVN_REVISION=latest
26-
if [[ "$CHANNEL" == "dev" ]]; then
27-
issue_1350_state=$(curl 'https://api.github.com/repos/angular/angular.dart/issues/1020' | python -c \
28-
'import sys, json; print(json.loads(sys.stdin.read())["state"])')
29-
if [[ "$issue_1350_state" == "open" ]]; then
30-
# Is there a newer dev SDK?
31-
latest_version=$(curl 'https://storage.googleapis.com/dart-archive/channels/dev/release/latest/VERSION' | python -c \
32-
'import sys, json; print(json.loads(sys.stdin.read())["version"])')
33-
if [[ "$latest_version" == "1.6.0-dev.8.0" ]]; then
34-
# Use prior working version (1.6.0-dev.7.0)
35-
SVN_REVISION=38831
36-
fi
37-
fi
66+
if [[ "$AVAILABLE_DART_VERSION" == "1.6.0-dev.8.0" ]]; then
67+
SVN_REVISION=38831 # Use prior working version (1.6.0-dev.7.0)
3868
fi
3969

4070
URL=https://storage.googleapis.com/dart-archive/channels/$CHANNEL/release/$SVN_REVISION/sdk/$DART_SDK_ZIP
4171
echo $URL
4272
curl -L -O $URL
4373

4474
echo Fetched new dart version $(unzip -p $DART_SDK_ZIP dart-sdk/version)
45-
rm -rf dart-sdk
46-
unzip $DART_SDK_ZIP > /dev/null
75+
unzip -q $DART_SDK_ZIP
76+
77+
sh -e /etc/init.d/xvfb start

0 commit comments

Comments
 (0)