Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce dev builds regularly (daily) #885

Closed
letmaik opened this issue Mar 18, 2015 · 15 comments
Closed

Produce dev builds regularly (daily) #885

letmaik opened this issue Mar 18, 2015 · 15 comments

Comments

@letmaik
Copy link

letmaik commented Mar 18, 2015

Currently public builds only exist for the "release" branch. I think it would be nice to have continuous builds with a fixed dev URL so that interested people can easily test the latest unit-tests-passing dev version without actually being forced to download npm etc. and build it themselves.

The main problem is hosting -- building and uploading is very easy with Travis CI. It shouldn't be any burden to anyone, so I suggest some kind of free hosting. The easiest thing that comes to my mind is to create a separate github repo like crafty-dev-builds which exactly has two files: crafty.js and crafty-min.js. These can always be referenced via rawgit.com. Inside this repo there would be a travis config which just builds the latest crafty commit and if tests pass then it would push this to the crafty-dev-builds repo (by encrypting ssh credentials etc., have done that before as well). This could be invoked daily with a cronjob (I used http://tron-ci.herokuapp.com before). So totally self-autonomous.

Let me know if you have another idea or if you need help with that. I think it's a nice addition.

@starwed
Copy link
Member

starwed commented Mar 18, 2015

That's a pretty good idea. It would make sense to use the Crafty-Distro repo for that -- we could have a nightly directory.

@letmaik
Copy link
Author

letmaik commented Mar 18, 2015

Probably better to use a new orphan branch "nightlies" in the Crafty-Distro repo. Also, it probably makes sense to only store crafty.js there, and not crafty-min.js. Otherwise this may encourage people too much to use this for non-testing purposes. Also, checking in the minified one creates probably massive git diffs every time, which is not the case for the crafty.js one.

@starwed
Copy link
Member

starwed commented Mar 18, 2015

I've had a look at this -- it's not clear to me how to have Travis commit the files when it's triggered by the cron job.

@letmaik
Copy link
Author

letmaik commented Mar 18, 2015

Have a look here: https://github.com/neothemachine/pixelpitch
Every week a cronjob triggers a travis rebuild and the travis config of the master branch gets run, and in that travis pushes to the gh-pages branch and thereby updating a webpage. Exactly the same concept, except that we have a single branch and no website.

@kevinsimper
Copy link
Contributor

@neothemachine If you want live build, you can just do npm install craftyjs/crafty which installs the latest from github repository.

@letmaik
Copy link
Author

letmaik commented Mar 18, 2015

@kevinsimper Please read my issue text again. This is about not needing npm etc. and just having a simple link available which points to the current dev version. This makes it very easy to let people test new features before release. Personally, I don't use nodejs for anything, so the barrier is quite high just to get the latest version.

@letmaik
Copy link
Author

letmaik commented Mar 24, 2015

Ok guys... proof-of-concept: https://github.com/neothemachine/crafty-nightlies
Feel free to copy it, I don't want it living under my username.

@kevinsimper
Copy link
Contributor

👍 Very nice to see an example! Good job!

@starwed
Copy link
Member

starwed commented Mar 25, 2015

Thanks, I should have some time to look over your example by tomorrow.

@starwed
Copy link
Member

starwed commented Apr 4, 2015

Huh, what happened to the Crafty-Distro repo? For some reason I thought it had some files checked in, but it seems to be empty now -- was I just confused?

Anyway, Neo's example was helpful. Rather than use an SSH key, though, I went ahead and created what github refers to as a machine user. That means we can just include the OAuth token for that user in the travis config, and then control access to repos with the same interface we have for a regular user. Since we might want to have Travis push to the site repo as well, that seemed the easiest path.

I was going to open a PR, but I'm now uncertain about the status of the distro repo.

@starwed
Copy link
Member

starwed commented Apr 4, 2015

I opened PR #889 for this, but it needs testing and the repo itself might need to be setup properly.

@starwed
Copy link
Member

starwed commented Apr 4, 2015

It occurs to me that we could do something similar for releases -- have Travis update the documentation whenever we update the release branch.

@starwed
Copy link
Member

starwed commented Apr 6, 2015

Looks like #889 was successful. I'll leave this issue open until we actually document how to use the nightly builds somewhere.

@letmaik
Copy link
Author

letmaik commented May 17, 2015

I am deleting my temporary repository now as this seems to work. Some minimal documentation:

How to use

<script src="https://rawgit.com/craftyjs/Crafty-Distro/nightlies/crafty.js"></script>

The Crafty commit hash and date from which the latest nightly was built can be checked in the nightlies branch.

@starwed
Copy link
Member

starwed commented Sep 30, 2016

Closing, since these effectively exist. (Except that we build per merge into develop, rather than nightly.)

@starwed starwed closed this as completed Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants