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

Make travis upload new versions of both dunai and bearriver to hackage #61

Closed
ivanperez-keera opened this issue Dec 4, 2017 · 6 comments
Assignees

Comments

@ivanperez-keera
Copy link
Owner

In order to simplify our lives, we could make travis automatically publish stable versions of packages on hackage. A new user has been created for this ( #59 ).

Example of how to do this is are in https://github.com/ivanperez-keera/Yampa/blob/develop/.travis.yml#L31-L38, and https://github.com/keera-studios/keera-hails/blob/master/.travis.yml#L86-L109.

@turion
Copy link
Contributor

turion commented Dec 4, 2017

Stupid question. Is it not a problem that the password is public then?

Btw, if you want to avoid duplicating the list of subpackages every time, you can do the thing described in https://docs.travis-ci.com/user/languages/haskell/#Build-Matrix.

@ivanperez-keera
Copy link
Owner Author

It won't be public. It'll be encrypted by Travis. But it'll be visible by anyone with commit access to the repo, which is why it's best to have a different user for this.

@chriz-zeller chriz-zeller self-assigned this Dec 6, 2017
chriz-zeller pushed a commit that referenced this issue Dec 6, 2017
Adds username, encrypted password and deploy specifications.

Refs #61.
chriz-zeller pushed a commit that referenced this issue Dec 7, 2017
Adds username, encrypted password and conditions for deploy.

Refs #61.
@ivanperez-keera
Copy link
Owner Author

I just took a quick look. It seems to me that, since packages need to be compiled with a range of GHC versions, the cleanest way to do this would be to specify a build matrix that provides all possible combinations:

env:
 - GHCVER=7.6.3  PACKAGE="dunai"     PACKAGE_DIR="."
 - GHCVER=7.8.4  PACKAGE="dunai"     PACKAGE_DIR="."
 - GHCVER=7.10.3 PACKAGE="dunai"     PACKAGE_DIR="."
 - GHCVER=8.0.2  PACKAGE="dunai"     PACKAGE_DIR="."
 - GHCVER=8.2.1  PACKAGE="dunai"     PACKAGE_DIR="."

 - GHCVER=7.6.3  PACKAGE="bearriver" PACKAGE_DIR="examples/bearriver"
 - GHCVER=7.8.4  PACKAGE="bearriver" PACKAGE_DIR="examples/bearriver"
 - GHCVER=7.10.3 PACKAGE="bearriver" PACKAGE_DIR="examples/bearriver"
 - GHCVER=8.0.2  PACKAGE="bearriver" PACKAGE_DIR="examples/bearriver"
 - GHCVER=8.2.1  PACKAGE="bearriver" PACKAGE_DIR="examples/bearriver"

Is there a simpler way? (yes, we can eliminate PACKAGE_DIR if we put dunai in a subdir and bearriver in another, but that's not what I am asking.)

@chriz-zeller
Copy link

I'm not sure about this, but we could try the following or a variant of it:

language: haskell

ghc:
  - "7.6.3"
  - "7.8.4"
  - "7.10.3"
  - "8.0.2"
  - "8.2.1"
env
  - PACKAGE="dunai" PACKAGE_DIR="."
  - PACKAGE="bearriver" PACKAGE_DIR="examples/bearriver"
  
install:
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-1.24 alex-3.1.4 happy-1.19.5
 - export PATH=$HOME/.cabal/bin:/opt/cabal/1.24/bin:/opt/alex/3.1.4/bin:/opt/happy/1.19.5/bin:$PATH
 - travis_retry cabal update

I'm not sure whether the ghc variable needs language haskell. And I'm not sure whether it is good to let travis organise the installation of the ghc instead of doing it on our own.

@ivanperez-keera
Copy link
Owner Author

You're absolutely right. I didn't know the current haskell image on travis had other versions of GHC installed (it didn't use to be the case). This simplifies the build process a lot.

Thanks!

@turion
Copy link
Contributor

turion commented Dec 7, 2017

@chriz-keera 's approach seems the right one to me. I don't think we need all those directives listed after install:. Travis should be able to figure this out on its own.

chriz-zeller pushed a commit that referenced this issue Dec 7, 2017
Using language 'haskell', the variable ghc, and the default cabal
defined by travis.

Refs #61.
chriz-zeller pushed a commit that referenced this issue Dec 7, 2017
chriz-zeller pushed a commit that referenced this issue Dec 7, 2017
chriz-zeller pushed a commit that referenced this issue Dec 7, 2017
chriz-zeller pushed a commit that referenced this issue Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants