Commit Graph

287 Commits

Author SHA1 Message Date
Matthew Amato 61a9644a68 Fix s3 deploy when branches have same prefix as other branch.
Turns out our deploy step had a nasty bug where branches would collide if
they started with the name of another branch, for example `3d-tiles` would
try and delete the deployment files for `3d-tiles-transform`.  This is
because AWS prefixes need to end with a trailing `/` in order to list
only child files.  So `3d-tiles` would return all files from all branches
that start with `3d-tiles`, whereas `3d-tiles/` only gets files from
`3d-tiles` as desired.
2016-08-08 19:24:16 -04:00
JoshuaStorm 5b7dcd50e4 Return promise. Remove filesChecked log 2016-08-05 16:42:50 -04:00
Matthew Amato b5d3f0443d Do not attempt to deploy fork pull requests to s3.
For a pull request, the `TRAVIS_BRANCH` variable is always `master` this
causes deployment to deploy to the master branch instead of the branch
name (which is unavailable for pull requests). Even if the branch name
were available, forks that open pull requests could have name conflicts
with branches in the primary repository, so we wouldn't be able to deploy
them anyway.

Fixes #3937
2016-05-25 10:18:57 -04:00
Matthew Amato 312a36f07e Deploy zip and npm packages
This change allows travis to deploy the generate zip files and
npm packages in addition to the build output.  Each package
gets a unique name based on branch name and build number.
Also updated deployment step not to delete these packages so that
they can be depended on until the branch is merged.
2016-03-28 10:05:10 -04:00
ggetz 407282a822 Set status of deployment 2016-03-25 13:58:37 -04:00
Matthew Amato 4644196ee7 Merge pull request #3769 from ggetz/travis-deploy
Travis Deployment
2016-03-25 12:22:44 -04:00
ggetz f4e903224c promisified getCredentials 2016-03-25 12:07:53 -04:00
ggetz 24f58185e7 Nice error if no credentials 2016-03-25 11:38:38 -04:00
ggetz bebd0f6da4 Keep task from hanging after complete 2016-03-23 14:24:50 -04:00
Matthew Amato 7580535e1c Remove async module
While reviewing #3715, I realized we didn't need it.

Also ignored `karma.conf.js` as part of `sortRequires`, since it's not AMD.
2016-03-23 13:16:49 -04:00
Matthew Amato 06bc0ab3b7 Merge pull request #3715 from ggetz/upload-cesium
Port CesiumUpload Tool to Node
2016-03-23 13:14:28 -04:00
ggetz eed91ceea2 Fixed catch blocks 2016-03-23 12:06:32 -04:00
ggetz c437910b01 Error catching 2016-03-23 11:24:50 -04:00
ggetz bec4f4bd7e task cleanup 2016-03-22 17:47:26 -04:00
ggetz 829f562a67 rename gulp task and remove hardcoded options 2016-03-22 17:03:55 -04:00
ggetz 05a39530d0 Uploaded less, optional cache argument 2016-03-22 16:31:34 -04:00
ggetz c376160814 Added confirm flag 2016-03-22 12:16:25 -04:00
ggetz 558b5da491 Promisified s3 functions 2016-03-22 11:55:30 -04:00
ggetz 4a117fda09 Added checks for special mime types 2016-03-22 11:09:33 -04:00
ggetz 6f066ff6c2 Added prompt 2016-03-22 10:44:36 -04:00
ggetz 9486c8b6a7 Refactored deploy task
Replaced aws-sdk with a promise version, aws-sdk-promise
Removed callbacks
Promisified fs.readFile and zlib.gzip
Declare functions outside of tasks
2016-03-21 16:29:43 -04:00
Matthew Amato 7d93e615f9 Fix running tests from command line
Also updated npm modules (most of which were testing related).

Fixes #3732
2016-03-21 14:23:24 -04:00
ggetz 35ec499287 forgot semicolon 2016-03-17 10:51:42 -04:00
ggetz 72ec3f9a3d removed graceful-fs 2016-03-17 10:44:30 -04:00
ggetz 761e491be1 Upload cesium to s3 2016-03-16 17:44:54 -04:00
Matthew Amato bd8e786947 Tweak documentation. 2016-03-07 09:32:20 -05:00
Matthew Amato 5cdc2cd3fd Speed up build process
1. Running travis under node 4.3.x gives a decent improvement over 0.12.
2. Move `cloc` to the end of the build since it's the least important.
3. Take advantage of multiple cores for combine/minification

Number 3 reduced `makeZipFile` times on my machine from 5:40 to 2:30,
performance increases has transferred to travis as well.  Because
travis reports 32 cores and trying to use them all results in
travis killing the build, I put in a hardcoded limit of 8 for now.

My approach is a little hacky (I exec a seprate gulp task passing a base64
encoded string on the command line), but I couldn't determine a better
way to handle it with gulp because there's no programmatic way to spawn
a task (I think this is being fixed in gulp 4, so we'll revisit when that
comes out).
2016-03-03 18:00:26 -05:00
Matthew Amato 147a0a63b1 Remove buildApps dependencies.
buildApps technically depends on minifyRelease, but having it as a
dependancy means you can't run it on it's own without rebuilding the whole
thing (since we don't have incremental builds).  combine should not have
ever been there to begin with.
2016-03-03 09:40:26 -05:00
Matthew Amato c322ecc065 Travis and build improvements
1. Run non-webgl tests as part of travis using Electron.  They run in both
module and release form.

2. Run cloc as part of the build process

3. jsHint no longer fails the gulp task when you run `npm run jsHint`,
since that behavior was really annoying.  It still fails under travis or
when passed the `--failTaskOnError` option.

4. Improve log output by using travis folding commands. Each part of the
build is now collapsed into its own section.

5. Added `--suppressPassed` option to avoid showing passed tests in output.
Our travis log got too big and travis refused to show it (even with the
folding) unless you looked at raw test.
2016-03-02 10:45:49 -05:00
Matthew Amato a9abcf2479 Update testing guide.
Also add `--browsers` flag for running against specific browsers.
2016-03-01 15:00:09 -05:00
Matthew Amato 722f4f92f3 Update NPM modules and remove karma workaround. 2016-02-17 11:07:42 -05:00
ggetz f19c2fd2c0 Merge remote-tracking branch 'cesium/master' into cesium-ci 2016-02-10 12:08:19 -05:00
ggetz b02649e670 test task does not depend, removed sperate release task 2016-02-10 11:57:00 -05:00
Matthew Amato 7e98cd2c61 "use strict" -> 'use strict'
A few straggling places were still using "use strict" instead of
'use strict' after #3535.
2016-02-09 21:03:48 -05:00
Matthew Amato 6b313d84f3 Merge pull request #3535 from sanuj/use_strict_cleanup
Replace "use strict" by 'use strict'
2016-02-09 20:51:36 -05:00
Sanuj 04216d0204 Replace "use strict" by 'use strict' 2016-02-09 11:07:51 +05:30
Matthew Amato acb1798dc6 Fix travis timeout
Apparently #3430 is still an issue and the travis_wait command added as
part of #3432 does not work as advertised. To address the issue once and
for all, I turned up the loglevel on requirejs so that it always outputs
progress to the build log (this was actually requested by @shunter and
a few others after the logging went away when we moved to gulp anyway).

Long story short we should finally stop seeing travis timeouts.

I also make jsHint run as a separate step and instead of `release` we
run `makeZipFile` to be sure the entire build process works.  If
`makeZipFile` were to error, the previous configuration wouldn't have
caught it.
2016-02-08 18:31:43 -05:00
ggetz e3a61e097b Added test-release task 2016-02-08 15:46:55 -05:00
ggetz 2385560fb2 removed karma.conf.js from jsHint files since it was moved tp the Specs dir 2016-02-08 13:15:47 -05:00
ggetz 8a2de7667c Added minified release support 2016-02-08 12:15:11 -05:00
ggetz 4f04f9ecd8 Removed minimist and used yargs 2016-02-05 16:38:26 -05:00
ggetz 476377b92c Combined test gulp tasks into one 2016-02-05 16:29:51 -05:00
ggetz 0cb6a2c292 Add webgl validation support for karma 2016-02-05 14:11:30 -05:00
ggetz 9987200d65 Added targets for webgl and non-webgl tests 2016-01-25 16:46:42 -05:00
ggetz e9c6c38804 moved karma.conf.js to the Spec folder 2015-12-29 15:04:44 -05:00
ggetz 80c4aab792 Added ie and safari launchers, added detect browser plugin, added test-all target 2015-12-23 15:17:49 -05:00
Matthew Amato 1526fc6153 Work around Karma bug
Also some minor cleanup.
2015-12-23 10:17:30 -05:00
ggetz 9ae3ac50dd Changed spec reporter config, formatted karma.config, adjusted test target 2015-12-23 09:57:17 -05:00
ggetz 0866f9ca37 Added karma.conf.js to list of jsHint files, fixed use strict 2015-12-22 13:55:56 -05:00
ggetz a13d3a1249 Reverted changes to tests, added build dependancy to test target, removed including SpecList 2015-12-22 13:50:00 -05:00
ggetz 93d583988d Failing tests return error code 2015-12-18 13:19:58 -05:00
ggetz 6e546acf48 Fixed karma gulp task 2015-12-18 12:09:50 -05:00
ggetz 10359420aa Added jasmine-core to package.json, stopped logging stdout for test 2015-12-18 11:30:06 -05:00
ggetz f80108911a changed 'tests' target to 'test' 2015-12-18 11:06:47 -05:00
ggetz 5ecd0870a2 Added testing task to gulpfile 2015-12-18 10:40:10 -05:00
Guillaume Beraudo 6eba10a1c0 Prevent overwritting minified build
"gulp combine" output used to be copied to Build/Cesium, effectively overwritting any
minified version previously outputted there. With this commit, no more
copy is done by gulp.
2015-12-11 09:41:37 +01:00
Dan Bagnell 8d6965ebef Removed deprecated Scene/HeadingPitchRange. 2015-12-04 14:15:46 -05:00
Matthew Amato 2576a8fe82 Fix Sandcastle jsHint
We were writing out jsHintOptions with the `extends` attribute, which
wasn't working when loaded into the browser.  Now the build process
loads the primary jshint file and modifies is to match the gallery
in order to write out a complete jsHintOptions object.

This could probably be a little more robust (since not all changes
to Apps/Sandcastle/.jshintrc get reflected automatically jsHintOptions,
but I doubt that will be an issue given that these files will rarely change.
2015-12-01 02:29:41 -05:00
Matthew Amato 25a7591337 Fix Eclipse jsHint integration
Because jshint-eclipse does not support multiple `.jshintrc` files, I've
updated the root .jshintrc to include jasmine.  This is then set to
false in lower-down `.jshintrc files using the extends capability.

This has the added benefit of meaning we no longer write out .jshintrc
files as part of the build step.

The only downside here is that jsHint in Eclipse thinks Jasmine globals
are okay in all of our Source files. However, that's not a big deal
and travis and our own jshint build step will detect the problem if
someone tries to call jasmine outside of the Specs directory.
2015-11-16 10:42:41 -05:00
Matthew Amato 86b7a49568 Fix Travis, update .jshintrc, remove a ton of junk.
So it turns out that jsHint no longer works on Node 0.10.x, which is
ancient anyway.  So I updated Travis to use 0.12.x.  I then decided to
update our .jshintrc to take advantage of the latest JSHint features and
that produced a TON of new (perfectly valid) errors about unused variables,
empty code blocks, and unused defined globals, which I have now cleaned up.
This also uncovered a bunch of other stuff that I also fixed.

In summary:

1. Update travis to use Node 0.12.x
2. Update .jshintrc to take advantage of new features
3. Fix bad code pointed out by said features
4. Remove all uneeded `jasmine` globals in spec files
5. Generate a `Specs` specific .jshintrc as part of the build which enables jasmine mode in jshint
6. Move `QuadtreePrimitive` to Development Sandcastle gallery.
7. Update NPM modules to latest versions.
8. Lock NPM modules to specific versions to avoid untested updates in the future.
9. Ran `sortRequires`
2015-11-13 01:11:20 -05:00
Scott Hunter a0a1446280 Merge pull request #3147 from AnalyticalGraphicsInc/fix-deprecated
Ignore the deprecated Scene version of HeadingPitchRange
2015-10-30 12:02:07 -04:00
Patrick Cozzi 223ed224f2 Merge pull request #3149 from AnalyticalGraphicsInc/no-viewer-build
Don't build or include Cesium Viewer as part of release.
2015-10-30 08:04:47 -04:00
Matthew Amato 54254bccdd Fix occasional non-clean build crash. 2015-10-29 20:37:52 -04:00
Matthew Amato b1d5c094ff Don't build or include Cesium Viewer as part of release.
Fixes #3127
2015-10-29 19:54:56 -04:00
Matthew Amato 7d4ca231ca Ignore the deprecated Scene version of HeadingPitchRange
Fixes #3143
2015-10-29 19:21:12 -04:00
Matthew Amato 96b38a3271 Fix Travis jsHint checking
gulp-jshint does not return 1 on jsHint failure by default, instead it
prints the jsHint errors to the screen and cleanly exists with 0. This
adds their built-in "fail" reporter to return 1 and therefore allow
travis to fail as well.
2015-10-27 20:02:41 -04:00
Scott Hunter 8941b29bdb Switch almond to a npm module since it's only used by the build process. 2015-10-26 17:36:43 -04:00
Matthew Amato 77d22e0c62 Update AMD loaders
Update `requirejs` from 2.1.9 to 2.1.20.
Update `almond` from 0.2.6 to 0.3.1.
2015-10-22 17:07:26 -04:00
Matthew Amato 798774f565 Hopefully last review comment. 2015-10-22 15:48:00 -04:00
Matthew Amato fd1169cef6 More changes after review. 2015-10-22 15:26:55 -04:00
Matthew Amato 6061d19f9b Include Shaders subdirectories. 2015-10-22 13:33:59 -04:00
Matthew Amato d855fe5544 Minify shaders when running `buildApps` 2015-10-22 13:30:43 -04:00
Matthew Amato a3df692dbd Fix typo, again. 2015-10-22 11:03:54 -04:00
Matthew Amato 1cfa1bee45 Changes after review
Clean up file path handling.
2015-10-21 18:22:10 -04:00
Matthew Amato 79b230b11a Fix shader minification. 2015-10-21 18:08:57 -04:00
Matthew Amato f789a73e6e Remove unecessary type casting. 2015-10-21 17:55:46 -04:00
Matthew Amato bb839efdb4 Changes after review. 2015-10-21 17:54:08 -04:00
Matthew Amato 26452fd20e Fix issues with combined Workers
It was only exposed during the release tests.
2015-10-19 23:26:00 -04:00
Matthew Amato 4addf0d8ab createTaskProcessorWorker was not being properly excluded. 2015-10-19 21:52:33 -04:00
Matthew Amato 554faffc74 Fix stubs generation. 2015-10-19 19:11:53 -04:00
Matthew Amato 19add8ca17 Add `build` back as a `jsHint` dependancy. 2015-10-19 16:20:51 -04:00
Matthew Amato bc1ea1eb31 Fix almond loader. 2015-10-18 19:39:12 -04:00
Matthew Amato aecb78a4b8 Add build-watch gulp task
Also clean up exec usage.
2015-10-18 18:01:56 -04:00
Matthew Amato d12c5a04e9 Ongoing gulp work
1. Remove debug code
2. Fix documentation github links
3. Fix accidental include of development gallery directory.
2015-10-18 14:36:55 -04:00
Matthew Amato a1406897fa Fix Node 0.10 support
Go back to using it for Travis.
Also fix an issue causing makeZipFile to have incomplete data on Linux.
2015-10-18 13:48:20 -04:00
Matthew Amato ac4406013e Use r.js optimizer programatically via npm module.
Also general code clean up.

This change temporarily disables the almond loader.
2015-10-18 13:03:20 -04:00
Matthew Amato 7e08a7b2a7 Initial port of build process to gulp
1. Move all build related code to gulpfile.js
2. Add `npm` scripts for all gulp tasks so no one needs to install gulp globally.
3. Added new `jshint-watch` task for continually running jsHint on changed files and writing the results to the console.
2015-10-16 17:30:14 -04:00