Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
hvr committed Jul 29, 2018
1 parent f7ab8c7 commit f67bc41
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,7 +2,7 @@
#
# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--config=cabal.haskell-ci' 'haskell-ci.cabal'
#
# For more information, see https://github.com/hvr/multi-ghc-travis
# For more information, see https://github.com/haskell-CI/haskell-ci
#
language: c
sudo: false
Expand Down
3 changes: 2 additions & 1 deletion LICENSE
@@ -1,4 +1,5 @@
Copyright (c) 2017, Herbert Valerio Riedel
Copyright (c) 2017-2018, Herbert Valerio Riedel
2017-2018, Oleg Grenrus

All rights reserved.

Expand Down
14 changes: 10 additions & 4 deletions README.md
Expand Up @@ -26,9 +26,15 @@ Note: For actually enabling continuous integration for a GitHub hosted project,
* Step 1: Clone this project in any directory

```bash
$ git clone https://github.com/hvr/multi-ghc-travis.git
$ git clone https://github.com/haskell-CI/haskell-ci.git
```


or

```bash
cabal get -s haskell-ci
```

* Step 2: Change directories to your project:

```bash
Expand All @@ -50,8 +56,8 @@ Note: For actually enabling continuous integration for a GitHub hosted project,

```bash
$ # You run the following command from your project's directory, even
$ # though it references the script from the `multi-ghc-travis` project
$ path/to/multi-ghc-travis/make_travis_yml.hs your-project.cabal > .travis.yml
$ # though it references the script from the `haskell-ci` project
$ path/to/haskell-ci/make_travis_yml.hs your-project.cabal > .travis.yml
```

The `make_travis_yml.hs` script looks at the `Tested-With` line in your
Expand Down
2 changes: 1 addition & 1 deletion fixtures/cabal.project.empty-line.travis.yml
Expand Up @@ -2,7 +2,7 @@
#
# runghc make_travis_yml_2.hs '--ghc-head' 'cabal.project.empty-line'
#
# For more information, see https://github.com/hvr/multi-ghc-travis
# For more information, see https://github.com/haskell-CI/haskell-ci
#
language: c
sudo: false
Expand Down
2 changes: 1 addition & 1 deletion fixtures/cabal.project.messy.travis.yml
Expand Up @@ -2,7 +2,7 @@
#
# runghc make_travis_yml_2.hs '--ghc-head' 'cabal.project.messy'
#
# For more information, see https://github.com/hvr/multi-ghc-travis
# For more information, see https://github.com/haskell-CI/haskell-ci
#
language: c
sudo: false
Expand Down
41 changes: 22 additions & 19 deletions haskell-ci.cabal
@@ -1,36 +1,36 @@
-- this .cabal file is mostly for convenience; the scripts are designed to be run via `runghc` w/o the need to compile them

cabal-version: 1.18
name: haskell-ci
version: 0
synopsis: Script generator for Travis-CI
description:
Script generator for Travis-CI based on cabal new-build
version: 0.1.0.0

synopsis: Cabal package script generator for Travis-CI
description:
Script generator (@make-travis-yml@) for [Travis-CI](https://travis-ci.org/) for continuous-integration testing of Haskell Cabal packages.
.
Included features (not limited to):

.
* Multiple GHC support

* Dependency caching

* cabal.project support

* cabal.project support (see [Nix-style local builds documentation](http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html)
* Runs tests and builds benchmarks

* Generates haddocks

* Generates Haddocks
* macOS (OSX) support

* building with specific constraints

.
=== Quick Start Guide
.
Add a @tested-with@ line to your @.cabal@ file (e.g. @tested-with: GHC == 8.0.2 || == 8.2.2@) and then run @make-travis-yml yourpackage.cabal -o .travis.yml@ to generate the Travis-CI job script.
.
See @make-travis-yml --help@ for more information.


homepage: http://haskell-ci.rtfd.org/
bug-reports: https://github.com/haskell-CI/haskell-ci/issues
license: BSD3
license-file: LICENSE
author: Herbert Valerio Riedel
author: Herbert Valerio Riedel, Oleg Grenrus
maintainer: hvr@gnu.org
category: Development
build-type: Simple
cabal-version: >=1.10
tested-with:
GHC == 7.8.4,
GHC == 7.10.3,
Expand Down Expand Up @@ -78,7 +78,10 @@ library
hs-source-dirs: src
other-extensions: CPP, ViewPatterns, NamedFieldPuns
build-depends: base >= 4.7 && < 4.12
, Cabal ( >= 1.10 && < 1.25 )
, Cabal == 1.18.*
|| == 1.20.*
|| == 1.22.*
|| == 1.24.*
|| == 2.0.*
|| == 2.2.*
, containers >= 0.4 && < 0.6
Expand Down
25 changes: 13 additions & 12 deletions make_travis_yml.hs
Expand Up @@ -2,17 +2,18 @@

-- NB: This code deliberately avoids relying on non-standard packages

import Control.Monad
import Data.List
import System.Environment
import System.Exit
import System.IO

import Distribution.PackageDescription.Parse (readPackageDescription)
import Distribution.PackageDescription (packageDescription, testedWith)
import Distribution.Compiler (CompilerFlavor(..))
import Distribution.Version
import Distribution.Text
import Control.Monad
import Data.List
import System.Environment
import System.Exit
import System.IO

import Distribution.Compiler (CompilerFlavor (..))
import Distribution.PackageDescription (packageDescription,
testedWith)
import Distribution.PackageDescription.Parse (readPackageDescription)
import Distribution.Text
import Distribution.Version

putStrLnErr :: String -> IO ()
putStrLnErr m = hPutStrLn stderr ("*ERROR* " ++ m) >> exitFailure
Expand Down Expand Up @@ -70,7 +71,7 @@ genTravisFromCabalFile fn xpkgs = do
----------------------------------------------------------------------------
-- travis.yml generation starts here

putStrLn "# This file has been generated -- see https://github.com/hvr/multi-ghc-travis"
putStrLn "# This file has been generated -- see https://github.com/haskell-CI/haskell-ci"
putStrLn "language: c"
putStrLn "sudo: false"
putStrLn ""
Expand Down
4 changes: 2 additions & 2 deletions make_travis_yml_2.hs
Expand Up @@ -16,7 +16,7 @@
-- | New-style @.travis.yml@ script generator using cabal 1.24's nix-style
-- tech-preview facilities.
--
-- See also <https://github.com/hvr/multi-ghc-travis>
-- See also <https://github.com/haskell-CI/haskell-ci>
--
-- NB: This code deliberately avoids relying on non-standard packages and
-- is expected to compile/work with at least GHC 7.0 through GHC 8.0
Expand Down Expand Up @@ -601,7 +601,7 @@ genTravisFromConfigs (argv,opts) xpkgs isCabalProject config prj@Project { prjPa
, "#"
, "# runghc make_travis_yml_2.hs " ++ unwords [ "'" ++ a ++ "'" | a <- argv ]
, "#"
, "# For more information, see https://github.com/hvr/multi-ghc-travis"
, "# For more information, see https://github.com/haskell-CI/haskell-ci"
, "#"
, "language: c"
, "sudo: false"
Expand Down

0 comments on commit f67bc41

Please sign in to comment.