haskell-CI / haskell-ci

Scripts and instructions for using CI services (e.g. Travis CI or Appveyor) with multiple GHC configurations
GNU General Public License v3.0
438 stars 71 forks source link

Add --tested-with-set, difference or intersection #385

Open philderbeast opened 4 years ago

philderbeast commented 4 years ago

Could we please add a new option that defines this set comparison, keeping the default as it is?

https://github.com/haskell-CI/haskell-ci/blob/3a6929e6b3101b6cbad56f9097e9c9bff106bbe9/src/HaskellCI/TestedWith.hs#L68

> haskell-ci --help
...
--tested-with-set SET  Set comparision (difference, intersection) (Default: difference)
                       of tested-with compiler versions among packages.

                       With difference, reject a non-empty difference.

                       With intersection, accept a non-empty intersection.
# alternative wording
--tested-with-set SET  Set comparision (reject-difference, accept-intersection)
                       (Default: reject-difference)

                       With reject-difference, tested-with has to be the same
                       for all packages. Error if it's not.

                       With accept-intersection, use the subset of tested-with
                       compiler versions common to all packages. Error if this
                       set is empty.
philderbeast commented 4 years ago

A relevant test:

https://github.com/haskell-CI/haskell-ci/blob/0305f597a3227351671d9508f31ef19612307268/fixtures/cabal.project.fail-versions.stderr#L1-L3

phadej commented 4 years ago

are you sure you won't be happy with jobs-selection: any?

philderbeast commented 4 years ago

It is good to know about jobs-selection: any, thanks. I tried it.

tested-with: GHC ==8.2.2
packages:
    lang-haskell/hcoord/{hcoord,hcoord-utm}/*.cabal
    lang-haskell/{clip,cmd,comp,detour-via-sci,detour-via-uom,earth,flare-timing,fsdb,gap,igc,kml,latlng,lookup,mask,route,scribe,siggy-chardust,span,task,tasty-compare,time,track,units,zone}/*.cabal

~/.cabal/bin/haskell-ci --output=.travis.yml --config=cabal.haskell-ci cabal.project --jobs-selection any
*INFO* Generating Travis-CI config for testing for GHC versions: 8.2.2 8.4.4 8.6.5 8.8.3
*INFO* hcoord-utm : 8.2.2 8.4.4 8.6.5 8.8.3
*INFO* hcoord : 8.2.2 8.4.4 8.6.5 8.8.3
*INFO* flight-igc : 8.2.2
*INFO* flight-cmd : 8.2.2
*INFO* detour-via-sci : 8.2.2
*INFO* flight-track : 8.2.2
*INFO* flight-route : 8.2.2
*INFO* flight-clip : 8.2.2
*INFO* flight-zone : 8.2.2
*INFO* flare-timing : 8.2.2
*INFO* flight-lookup : 8.2.2
*INFO* flight-fsdb : 8.2.2
*INFO* flight-comp : 8.2.2
*INFO* tasty-compare : 8.2.2
*INFO* flight-time : 8.2.2
*INFO* flight-units : 8.2.2
*INFO* flight-latlng : 8.2.2
*INFO* detour-via-uom : 8.2.2
*INFO* flight-kml : 8.2.2
*INFO* flight-mask : 8.2.2
*INFO* flight-gap : 8.2.2
*INFO* flight-span : 8.2.2
*INFO* flight-earth : 8.2.2
*INFO* siggy-chardust : 8.2.2
*INFO* flight-task : 8.2.2
*INFO* flight-scribe : 8.2.2

Those hcoord packages are coming from a git submodule. I'd like to not test them or failing that, to test them with ghc-8.2.2 alone.