OpenXcom Forum
Contributions => Programming => Topic started by: DoxaLogos (JG) on March 20, 2015, 08:03:29 pm
-
I was playing around with travis-ci and got it working on my "branch" of OXC. Took a while get it working on Ubuntu 12.04 (travis VM's) because of outdated yaml-cpp libs. This is only for linux, but OSX support can be added into the build config file (I don't know OSX though).
Here's the results:
https://travis-ci.org/jgatkinsn/OpenXcom (https://travis-ci.org/jgatkinsn/OpenXcom)
Here's what the script looks like:
https://github.com/jgatkinsn/OpenXcom/blob/travis_ci/.travis.yml (https://github.com/jgatkinsn/OpenXcom/blob/travis_ci/.travis.yml)
Unfortunately, I looked into available options out there for free CI hosting of Windows builds, but haven't had much luck. I think you have to pay for VisualSudio Online CI builds for C++. However, I could see Travis-CI being useful for developers on windows machines by allowing them to see if their latest checked in changes broke on linux builds (and/or OSX after support is added). Or let linux developers know that the build is broken on the latest, and they can submit fixes.
BTW, building this from the default instructions on UfoPaedia for AutoConf/Cmake will not compile. I have to turn off warnings as errors to get this to build. Is this desired to have warnings not treated as errors?
-
mxe <- its build nightly and I use it too for my branch. Require linux (I couldn't made it run on cygwin) but it output windows exe without any dependency.
-
I'll see if I can incorporate into the travis script too for building windows executables. Maybe I can get a friend to loan me his mac to work on the OSX side. I can do a pull request once it's done, and hope it gets accepted. It certainly doesn't hurt anything, because you don't have to enable it for your github account. I find automated builds that all the developers can see extremely useful (automated tests...even better).
-
Sounds like a good idea
https://docs.travis-ci.com/user/osx-ci-environment/
We already can and do build each git version in OSX (https://bitbucket.org/grrussel/openxcomosx)
export 'CXXFLAGS=-Wall -Wextra -O2''
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
cd src
make -f Makefile.simple clean
The question is really does travis retain the binaries after a build? To allow downloading and testing them, not merely that the source code built
-
The question is really does travis retain the binaries after a build? To allow downloading and testing them, not merely that the source code built
From my little understanding of travis, it does not retain the binaries after build. The VM's are spun up and spun down after each build. You'd have to incorporate into your build script a place to post the binaries once the build is successful before the VM is destroyed. Even if the binaries aren't posted, there is still value in knowing if the build is "green".
Thanks for the OSX build steps!
-
Whelp, I started adding OSX support to the script, only to find out that "multi-OS" feature is beta at Travis-CI and they are currently not accepting requests for it to be turned on for projects :( So, that means separate repos until it's turned back on. It's quite annoying, because their example scripts for C++ builds point to a "multi-OS" config.
I did do some more digging, and Travis does support a couple of hooks for publishing binaries to other locations along with "secure" connections.