Add travis config (and make tests runnable on emacs 23) #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a bit more to this than I initially expected...
The rust-mode code has a few things in it that show intent to keep it compatible with emacs 23 as well as emacs 24, so the
.travis.yml
file here tests it against emacs 23, 24 and the latest snapshot build. To make it successfully test on emacs 23 I had to change the test code (though not the actual rust-mode code under test) to eliminate some use of forms that were newly introduced in emacs 24.The way it installs emacs in the Travis VM is taken from the example at https://github.com/rolandwalker/emacs-travis. Other repos seem using the same approach as well--a very well known one is Magit.
There are a few unfortunate things about it:
An alternative approach would be to have it download an emacs source tarball right from a GNU mirror, and rebuild emacs from source each time. That would eliminate dependency on no-longer-interested third parties, but would also complicate the configuration in this repo and might make the travis builds take a while. (I haven't tried it, so I can't really say for sure.)
Here is a successful Travis run with this version from my own fork.