-
Notifications
You must be signed in to change notification settings - Fork 116
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
Test improvements #179
Open
lucafavatella
wants to merge
13
commits into
jameysharp:master
Choose a base branch
from
lucafavatella:test-improvements-201903
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Test improvements #179
lucafavatella
wants to merge
13
commits into
jameysharp:master
from
lucafavatella:test-improvements-201903
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Docker was broken because stack required a GHC version newer than the one included in 16.04.
... by merging remote-tracking branch 'upstream/pull/161' into HEAD. Symptom: ``` Compiler version mismatched, found ghc-7.10.3 (x86_64), but expected minor version match with ghc-8.0.2 (x86_64) (based on resolver setting in /corrode/stack.yaml). ```
... by preferring a supported (LTS) Ubuntu version. Symptom: ``` ... Step 1/5 : FROM ubuntu:17.04 ... E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/universe/source/Sources 404 Not Found [IP: 91.189.91.26 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty/universe/source/Sources 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-updates/universe/source/Sources 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-backports/restricted/binary-amd64/Packages 404 Not Found [IP: 91.189.88.161 80] E: Some index files failed to download. They have been ignored, or old ones used instead. The command '/bin/sh -c apt-get update && apt-get install git ghc haskell-stack -y' returned a non-zero code: 100 make: *** [docker] Error 100 ```
Symptom: ``` No compiler found, expected minor version match with ghc-8.0.2 (x86_64-nopie) (based on resolver setting in /corrode/stack.yaml). To install the correct GHC into /root/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag. To use your system GHC installation, run "stack config set system-ghc --global true", or use the "--system-ghc" flag. The command '/bin/sh -c cd corrode && stack build && stack install' returned a non-zero code: 1 ```
... by merging remote-tracking branch 'upstream/pull/147' into HEAD. Symptom (on fresh Docker image `haskell:8.0.2`): ``` Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal update' to download it. cabal: There is no package named 'happy'. There is no package named 'alex'. You may need to run 'cabal update' to get the latest list of available packages. ```
* Change the Dockerfile to use the working copy of the local git repo rather than checking out a remote git repo. Irrelevant portions of the local git repo are ignored. * Leverage Docker build cache. * Parametrize Dockerfile on version of GHC and deps. Also: * Prefer [Docker official haskell image](https://docs.docker.com/samples/library/haskell/) as base. * Move Docker image from stack to cabal - following most maintained build instructions. As the original author commented in pull request 104 of repo jameysharp/corrode: > For what it's worth, you might have more luck with the build instructions for using `cabal` than for `stack`. The `stack` instructions were contributed by someone else and I can't personally vouch for them. * Keep in Docker image [same (default) version of GHC and deps as in previous stack-based one](https://www.stackage.org/lts-8.05). * Teach CI to test build using stack - as Docker image moved from stack to cabal. References: * Old Dockerfile. * https://docs.haskellstack.org/en/stable/travis_ci/ * https://docs.haskellstack.org/en/stable/GUIDE/#stacks-functions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi @jameysharp ,
I find this project interesting. Would you be willing to include these continuous integration and Docker image improvements?
This pull request considers PRs #147, #145 and #161: if you merge this PR without squashing or rebasing, those shall get closed automatically by GitHub.
I see there are some useful open pull requests, though there has not been much activity in the master branch in the last couple of years. It would be nice to get most of those changes reviewed and merged to a common branch that can be based upon. I started such an effort in the following branch:
https://github.com/lucafavatella/corrode/commits/develop-2019
(Deletion of that ^^^ branch planned for end of year 2019.)
I started from non-invasive tests (reflected in this PR), I may in the following months continue with including changes in other PRs. Though before doing so I wanted to check the activity in this repo hence this PR.