-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add travis build matrix config. #179
Conversation
9cb2d1b
to
704779e
Compare
Ugh- I temporarily forgot about nix/stack failing to find the GHC libraries necessary to test our scripting support. I will have to look into that again. |
@agentm I can try to figure out this dependencies, do you know exactly what are the missing libraries, paths or binaries? |
Thanks! I probably won't have time to dig into this until after the Christmas break. The issue is that the tests require access to the various GHC-built libraries (including GHC and project-m36 Haskell packages). I have this working for cabal sandboxes and I thought it was working for stack as well. You can see where our binaries look for the modules here. Presumably, the fix would require an additional path be added to the list. Finding the correct library path on a machine to which you don't have ssh access will be challenging, needless to say, so don't feel discouraged if you can't find it. It's complicated to use GHC-as-a-compiler-service. I have been toying with the idea of using an off-the-shelf Haskell alternative like Morte which would lower the dependency bar and allow for relocatable libraries (Haskell packages cannot be currently moved), but I haven't found anything suitable yet. |
19f5bcc
to
f21cb20
Compare
Done! It's probably not the best solution since we could have some corner case where multiple stack snapshots will match the |
.travis.yml
Outdated
|
||
matrix: | ||
fast_finish: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the docs on this flag, but I don't quite understand how the behavior will change. Could you explain with an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I haven't tried without the flag, I just copied from the haskell-stack-travis-ci repo. But the idea is to fail the build as soon as any job fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok- that's fine with me. Either way, it's not a deal-breaker.
Fantastic! This looks great! I will look to merge it by the end of the week. Thanks for finding the proper paths! |
.travis.yml
Outdated
- | | ||
set -ex | ||
# Run tests | ||
stack --no-terminal test --ghc-options="$GHC_OPTIONS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this only build the tests? Before, we were building all binaries including examples and the haddock target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will build and execute the tests. It won't build the haddock target though. I can add the haddock at the end of the build if it builds within our time window.
I was expecting GHC 8.2 building to fail, so I am surprised that GHC 8.2 building is working here. Specifically, I know there are some incompatibilities with using GHC-8.2-as-a-library which have not been merged to master. Do you know what's going on? |
About the 8.2 build, I'll try to run it manually and see if I can reproduce this build locally. |
stack refuses to build with GHC 8.2 in our master branch because the stack.yaml doesn't include a plan for it:
This suggests that this configuration is building with all the same version GHC compiler. |
From the travis log:
This suggests that stack is not picking up the installed ghc and using its own. In the same log for GHC 8.2.1:
so all the builders are using GHC 8.0.2, probably installed by stack. |
Looking at the travis template, shouldn't it be using |
@agentm yes, this script is compiling everything under 8.0.2. I'll try to change the stack flags. Worst case scenario I'll create separate stack.yml files |
Thanks for the update! I see now that the macos builder is improperly succeeding because stack is still downloading GHC 8.0.2 there. I think the fix is to install GHC via The 7.10.3 builder is failing due to a missing version macro- I'll try to reproduce and fix that locally. |
I have used the brew version on osx to use the system ghc flags. It is currently working, we can change this later to make it ghc version specific, since now it is bound to whatever version is available in brew (currently 8.2.2). |
Thanks! Would it be easier to use stack to download the proper version? We don't support GHC 8.2 yet in the master branch. |
@agentm true, maybe it's better to keep the mac build just using the standard stack.yml setup. I'll move the osx conditional to the test command. |
@agentm another question, do we want to allow 7.10.3 and 8.2.2 to fail without failing the build? So they would become informative only. |
b0e21dd
to
2aca43d
Compare
I have rebased to clean a bit the commit history since most commits were just experiments. |
GHC 7.10.3 should be supported on all platforms. I used GHC 7.10.3 on darwin just a few days ago but I built with cabal new-build, so something about the stack build is not passing the macro down. I'll take a look at that. For now, I would prefer to disable GHC 8.2 building- I don't want to give the impression it is supported (yet). More specifically, we have to wait for an upstream package (distributed-process-systest) to bump some version bounds on hackage before we can support GHC 8.2. |
76a590f
to
881174a
Compare
stack won't build with GHC 7.10 without a dedicated yaml file since the master branch mentions the GHC 8.0 LTS one. I am testing a GHC 7.10-specific stack.yaml now. |
I patched the |
We will have to wait until the backlog is cleared to continue. Even when we get macos time, it's so sluggish, it's useless. |
2fb93c7
to
79978d7
Compare
@agentm we are green! Now with the timeout feature the dependencies will be partially uploaded even when the build fails. |
I can rebase this to clear the history from experimental commits, what do you think? |
Could you comment on how the dependency installation timeout works? If the dependency installation takes longer than 15 minutes, what happens in the Travis UI? |
Sure, you can rebase if you like, but the history of our experiments could be useful too. When I merge to mater, I would just add |
@agentm when the dependencies timeout the build will be red (as failed, not errored). A message about the dependencies timeout will show up in the logs. From then one can hit the rebuild button (if they are collaborators in the repo) or just send another push to trigger a new build and incrementally build the cache. |
Once this is in master the failures due to dependencies timing out should become rare, since new pull requests use the master branch cache according to Travis docs. |
…nd of the test and operating with all dependencies on the Either type inside a do block.
attempt to install GHC via stack on macos
…nd of the test and operating with all dependencies on the Either type inside a do block.
add workaround which may prevent the cache from functioning
…age cache for GHC installation and moves dependencies to same command used to run tests
71cdbfc
to
7142828
Compare
Great news! I didn't realize that failed builds will also upload the cache. I hope travis can resolve the macos build backlog soon. |
Thanks again for your hard work on this issue! We both got close to giving up but successfully bounced ideas back-and-forth until we got it. This patch will help us to catch stackage LTS mistakes which I have missed in the past. The hassles we faced here make me even more worried about the mess the automated Windows builders will face. Next stop: AppVeyor! |
@diogob, I am having trouble with dependency-building timeouts in the master branch after 3 commits. Is there anything I need to do to prime the cache? |
there is an error that is invalidating the macos build:
But for the linux build I don't have an explanation, unless their cache upload is coupled with the global state of the build. |
I'm making some tests on a branch of my own |
I found this: travis-ci/travis-ci#6307 |
The macos builds are backlogged for over 16 hours, so we probably won't have complete macos builds for a while. I am experimenting with increasing the dependency timeout to prime the cache. For whatever reason, I don't see a cache upload after a timed out dependency step. |
I have kept only the stack tests in the matrix for the sake of simplicity, but I can add back the commands to ensure a build with cabal (although rerunning the tests using cabal seems unnecessary).
I changed some code in order to compile all tests. Now everything compiles but some tests are still failing.
Let me know what you think.