Skip to content

Commit 5e84e4c

Browse files
committed
minimal ci
1 parent 81c3b6e commit 5e84e4c

File tree

9 files changed

+343
-141
lines changed

9 files changed

+343
-141
lines changed

.travis.yml

Lines changed: 158 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -3,132 +3,185 @@ sudo: false
33
node_js:
44
- '5.4.1'
55

6+
addons:
7+
# firefox: "38.0"
8+
apt:
9+
sources:
10+
# needed to install g++ that is used by npms's native modules
11+
- ubuntu-toolchain-r-test
12+
packages:
13+
- g++-4.8
14+
615
branches:
716
except:
817
- g3_v2_0
918

1019
cache:
1120
directories:
12-
- $HOME/.pub-cache
21+
- node_modules
22+
# - $HOME/.pub-cache
1323
- $HOME/.chrome/chromium
1424

15-
before_cache:
16-
# Undo the pollution of the typescript_next build before the cache is primed for future use
17-
- if [[ "$MODE" == "typescript_next" ]]; then npm install typescript; fi
25+
#before_cache:
26+
# # Undo the pollution of the typescript_next build before the cache is primed for future use
27+
# - if [[ "$MODE" == "typescript_next" ]]; then npm install typescript; fi
1828

1929
env:
2030
global:
21-
# Use newer verison of GCC to that is required to compile native npm modules for Node v4+ on Ubuntu Precise
22-
# more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements
23-
- CXX=g++-4.8
24-
- KARMA_DART_BROWSERS=DartiumWithWebPlatform
25-
# No sandbox mode is needed for Chromium in Travis, it crashes otherwise: https://sites.google.com/a/chromium.org/chromedriver/help/chrome-doesn-t-start
26-
- KARMA_JS_BROWSERS=ChromeNoSandbox
27-
- E2E_BROWSERS=ChromeOnTravis
28-
- LOGS_DIR=/tmp/angular-build/logs
29-
- SAUCE_USERNAME=angular-ci
30-
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
31-
- BROWSER_STACK_USERNAME=angularteam1
32-
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
33-
- ARCH=linux-x64
34-
- DART_DEV_VERSION=latest
35-
- DART_STABLE_VERSION=latest
36-
- DART_CHANNEL=stable
37-
- DART_VERSION=$DART_STABLE_VERSION
38-
# Token for tsd to increase github rate limit
39-
# See https://github.com/DefinitelyTyped/tsd#tsdrc
40-
# This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
41-
# because those are not visible for pull requests, and those should also be reliable.
42-
# This SSO token belongs to github account angular-github-ratelimit-token which has no access
43-
# (password is in Valentine)
44-
- TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
45-
# GITHUB_TOKEN_ANGULAR
46-
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
31+
# - KARMA_JS_BROWSERS=ChromeNoSandbox
32+
# - E2E_BROWSERS=ChromeOnTravis
33+
# - LOGS_DIR=/tmp/angular-build/logs
34+
# - ARCH=linux-x64
35+
4736
matrix:
4837
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
49-
- MODE=dart
50-
- MODE=dart DART_CHANNEL=dev
51-
- MODE=saucelabs_required
52-
- MODE=browserstack_required
53-
- MODE=saucelabs_optional
54-
- MODE=browserstack_optional
55-
- MODE=dart_ddc
56-
- MODE=js
57-
- MODE=router
58-
- MODE=build_only
59-
- MODE=typescript_next
60-
- MODE=lint
38+
- MODE=js
6139

62-
matrix:
63-
allow_failures:
64-
- env: "MODE=saucelabs_optional"
65-
- env: "MODE=browserstack_optional"
40+
#matrix:
41+
# allow_failures:
42+
# - env: "MODE=saucelabs_optional"
43+
# - env: "MODE=browserstack_optional"
6644

67-
addons:
68-
firefox: "38.0"
69-
apt:
70-
sources:
71-
- ubuntu-toolchain-r-test
72-
packages:
73-
- g++-4.8
74-
75-
before_install:
76-
- node tools/analytics/build-analytics start ci job
77-
- node tools/analytics/build-analytics start ci before_install
78-
- echo ${TSDRC} > .tsdrc
79-
- export CHROME_BIN=$HOME/.chrome/chromium/chrome-linux/chrome
80-
- export DISPLAY=:99.0
81-
- export GIT_SHA=$(git rev-parse HEAD)
82-
- ./scripts/ci/init_android.sh
83-
- sh -e /etc/init.d/xvfb start
84-
# Use a separate SauseLabs account for upstream/master builds in order for Sauce to create a badge representing the status of just upstream/master
85-
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && SAUCE_USERNAME="angular2-ci" && SAUCE_ACCESS_KEY="693ebc16208a-0b5b-1614-8d66-a2662f4e" || true'
86-
- node tools/analytics/build-analytics success ci before_install
8745

8846
install:
89-
- node tools/analytics/build-analytics start ci install
90-
# Install version of npm that we are locked against
91-
- npm install -g npm@3.5.3
92-
# Install version of Chromium that we are locked against
93-
- ./scripts/ci/install_chromium.sh
94-
# Install version of Dart based on the matrix build variables
95-
- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${DART_VERSION} ${ARCH}
96-
# Print the size of caches to ease debugging
97-
- du -sh ./node_modules || true
98-
# Install npm dependecies
99-
# check-node-modules will exit(1) if we don't need to install
100-
# we need to manually kick off the postinstall script if check-node-modules exit(0)s
101-
- node tools/npm/check-node-modules --purge && npm install || npm run postinstall
102-
- node tools/analytics/build-analytics success ci install
47+
- ./scripts/ci-lite/install.sh
10348

10449
before_script:
105-
- node tools/analytics/build-analytics start ci before_script
106-
- mkdir -p $LOGS_DIR
107-
- ./scripts/ci/presubmit-queue-setup.sh
108-
- node tools/analytics/build-analytics success ci before_script
50+
10951

11052
script:
111-
- node tools/analytics/build-analytics start ci script
112-
- ./scripts/ci/build_and_test.sh ${MODE}
113-
- node tools/analytics/build-analytics success ci script
53+
- ./scripts/ci-lite/build.sh
54+
- ./scripts/ci-lite/test.sh
11455

11556
after_script:
116-
- node tools/analytics/build-analytics start ci after_script
117-
- ./scripts/ci/print-logs.sh
118-
- ./scripts/ci/after-script.sh
119-
- ./scripts/publish/publish-build-artifacts.sh
120-
- node tools/analytics/build-analytics success ci after_script
121-
- tools/analytics/build-analytics $TRAVIS_TEST_RESULT ci job
12257

123-
notifications:
124-
webhooks:
125-
urls:
126-
- https://webhooks.gitter.im/e/1ef62e23078036f9cee4
127-
# trigger Buildtime Trend Service to parse Travis CI log
128-
- https://buildtimetrend.herokuapp.com/travis
129-
- http://104.197.9.155:8484/hubot/travis/activity
130-
on_success: always # options: [always|never|change] default: always
131-
on_failure: always # options: [always|never|change] default: always
132-
on_start: never # default: never
133-
slack:
134-
secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0=
58+
59+
#branches:
60+
# except:
61+
# - g3_v2_0
62+
#
63+
#cache:
64+
# directories:
65+
# - $HOME/.pub-cache
66+
# - $HOME/.chrome/chromium
67+
#
68+
#before_cache:
69+
# # Undo the pollution of the typescript_next build before the cache is primed for future use
70+
# - if [[ "$MODE" == "typescript_next" ]]; then npm install typescript; fi
71+
#
72+
#env:
73+
# global:
74+
# # Use newer verison of GCC to that is required to compile native npm modules for Node v4+ on Ubuntu Precise
75+
# # more info: https://docs.travis-ci.com/user/languages/javascript-with-nodejs#Node.js-v4-(or-io.js-v3)-compiler-requirements
76+
# - CXX=g++-4.8
77+
# - KARMA_DART_BROWSERS=DartiumWithWebPlatform
78+
# # No sandbox mode is needed for Chromium in Travis, it crashes otherwise: https://sites.google.com/a/chromium.org/chromedriver/help/chrome-doesn-t-start
79+
# - KARMA_JS_BROWSERS=ChromeNoSandbox
80+
# - E2E_BROWSERS=ChromeOnTravis
81+
# - LOGS_DIR=/tmp/angular-build/logs
82+
# - SAUCE_USERNAME=angular-ci
83+
# - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
84+
# - BROWSER_STACK_USERNAME=angularteam1
85+
# - BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
86+
# - ARCH=linux-x64
87+
# - DART_DEV_VERSION=latest
88+
# - DART_STABLE_VERSION=latest
89+
# - DART_CHANNEL=stable
90+
# - DART_VERSION=$DART_STABLE_VERSION
91+
# # Token for tsd to increase github rate limit
92+
# # See https://github.com/DefinitelyTyped/tsd#tsdrc
93+
# # This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
94+
# # because those are not visible for pull requests, and those should also be reliable.
95+
# # This SSO token belongs to github account angular-github-ratelimit-token which has no access
96+
# # (password is in Valentine)
97+
# - TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
98+
# # GITHUB_TOKEN_ANGULAR
99+
# - secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
100+
# matrix:
101+
# # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
102+
# - MODE=dart
103+
# - MODE=dart DART_CHANNEL=dev
104+
# - MODE=saucelabs_required
105+
# - MODE=browserstack_required
106+
# - MODE=saucelabs_optional
107+
# - MODE=browserstack_optional
108+
# - MODE=dart_ddc
109+
# - MODE=js
110+
# - MODE=router
111+
# - MODE=build_only
112+
# - MODE=typescript_next
113+
# - MODE=lint
114+
#
115+
#matrix:
116+
# allow_failures:
117+
# - env: "MODE=saucelabs_optional"
118+
# - env: "MODE=browserstack_optional"
119+
#
120+
#addons:
121+
# firefox: "38.0"
122+
# apt:
123+
# sources:
124+
# - ubuntu-toolchain-r-test
125+
# packages:
126+
# - g++-4.8
127+
#
128+
#before_install:
129+
# - node tools/analytics/build-analytics start ci job
130+
# - node tools/analytics/build-analytics start ci before_install
131+
# - echo ${TSDRC} > .tsdrc
132+
# - export CHROME_BIN=$HOME/.chrome/chromium/chrome-linux/chrome
133+
# - export DISPLAY=:99.0
134+
# - export GIT_SHA=$(git rev-parse HEAD)
135+
# - ./scripts/ci/init_android.sh
136+
# - sh -e /etc/init.d/xvfb start
137+
# # Use a separate SauseLabs account for upstream/master builds in order for Sauce to create a badge representing the status of just upstream/master
138+
# - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && SAUCE_USERNAME="angular2-ci" && SAUCE_ACCESS_KEY="693ebc16208a-0b5b-1614-8d66-a2662f4e" || true'
139+
# - node tools/analytics/build-analytics success ci before_install
140+
#
141+
#install:
142+
# - node tools/analytics/build-analytics start ci install
143+
# # Install version of npm that we are locked against
144+
# - npm install -g npm@3.5.3
145+
# # Install version of Chromium that we are locked against
146+
# - ./scripts/ci/install_chromium.sh
147+
# # Install version of Dart based on the matrix build variables
148+
# - ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${DART_VERSION} ${ARCH}
149+
# # Print the size of caches to ease debugging
150+
# - du -sh ./node_modules || true
151+
# # Install npm dependecies
152+
# # check-node-modules will exit(1) if we don't need to install
153+
# # we need to manually kick off the postinstall script if check-node-modules exit(0)s
154+
# - node tools/npm/check-node-modules --purge && npm install || npm run postinstall
155+
# - node tools/analytics/build-analytics success ci install
156+
#
157+
#before_script:
158+
# - node tools/analytics/build-analytics start ci before_script
159+
# - mkdir -p $LOGS_DIR
160+
# - ./scripts/ci/presubmit-queue-setup.sh
161+
# - node tools/analytics/build-analytics success ci before_script
162+
#
163+
#script:
164+
# - node tools/analytics/build-analytics start ci script
165+
# - ./scripts/ci/build_and_test.sh ${MODE}
166+
# - node tools/analytics/build-analytics success ci script
167+
#
168+
#after_script:
169+
# - node tools/analytics/build-analytics start ci after_script
170+
# - ./scripts/ci/print-logs.sh
171+
# - ./scripts/ci/after-script.sh
172+
# - ./scripts/publish/publish-build-artifacts.sh
173+
# - node tools/analytics/build-analytics success ci after_script
174+
# - tools/analytics/build-analytics $TRAVIS_TEST_RESULT ci job
175+
#
176+
#notifications:
177+
# webhooks:
178+
# urls:
179+
# - https://webhooks.gitter.im/e/1ef62e23078036f9cee4
180+
# # trigger Buildtime Trend Service to parse Travis CI log
181+
# - https://buildtimetrend.herokuapp.com/travis
182+
# - http://104.197.9.155:8484/hubot/travis/activity
183+
# on_success: always # options: [always|never|change] default: always
184+
# on_failure: always # options: [always|never|change] default: always
185+
# on_start: never # default: never
186+
# slack:
187+
# secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0=

build.sh

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,41 @@ do
3030

3131
echo "====== TSC 1.8 d.ts compat for ${DESTDIR} ====="
3232
# safely strips 'readonly' specifier from d.ts files to make them compatible with tsc 1.8
33-
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\(^ *(static |private )*\)*readonly */\1/g'
33+
if [[ ${TRAVIS} ]]; then
34+
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\(^ *(static |private )*\)*readonly */\1/g'
35+
else
36+
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -e 's/\(^ *(static |private )*\)*readonly */\1/g'
37+
fi
3438

3539

3640
echo "====== (esm)COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json ====="
3741
$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json
3842

3943

40-
if (true); then
41-
echo "====== BUNDLING: ${SRCDIR} ====="
42-
(
43-
cd ${SRCDIR}
44-
echo "..." # here just to have grep match something and not exit with 1
45-
../../../node_modules/.bin/rollup -c rollup.config.js
46-
) 2>&1 | grep -v "as external dependency"
44+
echo "====== BUNDLING: ${SRCDIR} ====="
45+
(
46+
cd ${SRCDIR}
47+
echo "..." # here just to have grep match something and not exit with 1
48+
../../../node_modules/.bin/rollup -c rollup.config.js
49+
) 2>&1 | grep -v "as external dependency"
4750

48-
# workaround for https://github.com/rollup/rollup/issues/626
51+
# workaround for https://github.com/rollup/rollup/issues/626
52+
if [[ ${TRAVIS} ]]; then
53+
sed -i "s/ class exports\./ class /g" ${DESTDIR}/esm/${PACKAGE}.umd.js
54+
else
4955
sed -i '' "s/ class exports\./ class /g" ${DESTDIR}/esm/${PACKAGE}.umd.js
50-
51-
$(npm bin)/tsc \
52-
--out ${UMDES5PATH} \
53-
--target es5 \
54-
--allowJs \
55-
${UMDES6PATH} \
56-
modules/\@angular/manual_typings/globals.d.ts \
57-
modules/\@angular/typings/es6-collections/es6-collections.d.ts \
58-
modules/\@angular/typings/es6-promise/es6-promise.d.ts
59-
rm ${UMDES6PATH}
6056
fi
57+
58+
$(npm bin)/tsc \
59+
--out ${UMDES5PATH} \
60+
--target es5 \
61+
--allowJs \
62+
${UMDES6PATH} \
63+
modules/\@angular/manual_typings/globals.d.ts \
64+
modules/\@angular/typings/es6-collections/es6-collections.d.ts \
65+
modules/\@angular/typings/es6-promise/es6-promise.d.ts
66+
rm ${UMDES6PATH}
67+
6168
done
6269

6370
TSCONFIG=./modules/@angular/tsconfig.json

package.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
{
22
"name": "angular-srcs",
33
"version": "2.0.0-beta.17",
4+
"private": true,
45
"branchPattern": "2.0.*",
56
"description": "Angular 2 - a web framework for modern web apps",
67
"homepage": "https://github.com/angular/angular",
78
"bugs": "https://github.com/angular/angular/issues",
8-
"contributors": [
9-
"Alex Eagle <alexeagle@google.com>",
10-
"Chirayu Krishnappa <chirayu@google.com>",
11-
"Jeff Cross <crossj@google.com>",
12-
"Matias Niemela <matsko@google.com>",
13-
"Misko Hevery <misko@google.com>",
14-
"Rado Kirov <radokirov@google.com>",
15-
"Tobias Bosch <tbosch@google.com>",
16-
"Victor Savkin <vsavkin@google.com>",
17-
"Yegor Jbanov <yjbanov@google.com>",
18-
"Jeremy Elbourn <jelbourn@google.com>"
19-
],
209
"license": "MIT",
2110
"engines": {
2211
"node": ">= 5.4.1 < 6"
@@ -26,10 +15,8 @@
2615
"url": "https://github.com/angular/angular.git"
2716
},
2817
"scripts": {
29-
"preinstall": "node tools/analytics/build-analytics start install npm3-install && node tools/analytics/build-analytics start install npm-preinstall && node tools/npm/check-node-modules && node tools/analytics/build-analytics success install npm-preinstall && node tools/analytics/build-analytics start install npm-install-net",
30-
"postinstall": "node tools/analytics/build-analytics success install npm-install-net && node tools/analytics/build-analytics start install npm-postinstall && node tools/npm/copy-npm-shrinkwrap && node tools/chromedriverpatch.js && webdriver-manager update && bower install && gulp pubget.dart && tsd reinstall --overwrite --clean --config modules/angular2/tsd.json && tsd reinstall --overwrite --clean --config tools/tsd.json && tsd reinstall --overwrite --config modules/angular1_router/tsd.json && node tools/analytics/build-analytics success install npm-postinstall && node tools/analytics/build-analytics success install npm3-install",
31-
"build": "node --max-old-space-size=2048 ./node_modules/.bin/gulp build.js",
32-
"test": "gulp test.all.js && gulp test.all.dart"
18+
"preinstall": "node tools/npm/check-node-modules",
19+
"postinstall": "node tools/npm/copy-npm-shrinkwrap"
3320
},
3421
"dependencies": {
3522
"es6-shim": "^0.35.0",

0 commit comments

Comments
 (0)