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

~Travis CI~ All the CI #7

Merged
merged 21 commits into from May 29, 2018
Merged

~Travis CI~ All the CI #7

merged 21 commits into from May 29, 2018

Conversation

dra27
Copy link
Member

@dra27 dra27 commented May 18, 2018

Enables Travis CI with compilation of the new backends (I have WIP for testing using the alternate backends as well, but it needs some further testing)

@dra27 dra27 changed the title Travis CI ~Travis CI~ All the CI May 22, 2018
@dra27
Copy link
Member Author

dra27 commented May 22, 2018

Right, Windows fixes and more testing included as well. So, at the moment:

  • Travis Linux builds all the backends and tests the LP, GLPK and SYMPHONY backends
  • Travis macOS builds default configuration and tests GLPK backend only (I've got a branch which builds and tests the other backends same as Linux, but I need some time on a real Mac to finish it, as I can't tell from Travis where all the libraries/binaries are with gnawing my arm off waiting for builds...)
  • AppVeyor builds default configuration but tests GLPK and LP using a binary distribution from COIN-OR. The COIN-OR mingw binary builds are done using MSYS2 rather than Cygwin and they don't seem to provide a 64-bit MSVC build. I tried building the backends on mingw, but the linking was problematic (it's either slightly different C++ libraries from MSYS2/Cygwin or possibly that the libraries have linked libstdc++ statically, where the ocaml-mccs code needs a shared libstdc++). I think it'll need to be built from sources (which is what homebrew is doing too, of course). Ping me when the Symphony backend is important enough to enable by default and I'll do that work, but it didn't seem necessary at this stage for a largely experimental backend?

@@ -100,10 +134,10 @@ int lp_solver::solve() {
fclose(lpfile);

if (verbosity < 2)
sprintf(command, "cat %s >> %s; %s %s > %s 2> /dev/null",
sprintf(command, "cat %s >> %s && %s %s > %s 2> nul",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops - sorry, this shouldn't be here.

dra27 added 21 commits May 22, 2018 12:47
Allows having default test criteria but changing the solver (more
natural).
Output isn't steady enough.
Need the (universe) dependency.
Use system call to determine temporary file location and implement
Windows alternative for `getpid`. Windows temporary directories are
already user-specific, so no alternate implementation of `getuid` is
provided.
Although implementations of cat (and, optionally, tee) are still
required.
Commenting out the lines allows Remote Desktop connection at the end of
the build.
The upgrade scripts assumed Cygwin64 (copied from opam), but the CI was
actually using Cygwin32. Corrected to use Cygwin64 as intended - and
therefore to install the missing patch package (which was being
incorrectly picked up from Git-for-Windows beforehand).
The unzip utility does not support GNU's --version, so add a -v test as
well as an alternate.
@AltGr
Copy link
Collaborator

AltGr commented May 22, 2018

Thanks!

Ping me when the Symphony backend is important enough to enable by default and I'll do that work, but it didn't seem necessary at this stage for a largely experimental backend?

Indeed!

case $TRAVIS_OS_NAME in
linux)
sudo apt-get install coinor-libclp-dev coinor-libcbc-dev coinor-libsymphony-dev mccs
;;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't that rather be in .travis.yml addons.apt.packages section ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be, but Travis seem to have taken their linter offline while they develop a new one and I could not be bothered to figure out the expansion of the matrix so that the addons only applied to Linux, and not macOS. It's also the case that once the backend testing is extended to macOS that it has to be done using commands rather than YAML changes, because you need a different homebrew tap. So it seemed better to do all the package installations by hand.

It'd be fine if YAML weren't such a arm-gnawingly useless way of specifying anything...

@dra27 dra27 mentioned this pull request May 28, 2018
@AltGr AltGr merged commit 9326846 into ocaml-opam:master May 29, 2018
@dra27 dra27 deleted the travis branch May 30, 2018 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants