mirror of https://github.com/zachjs/sv2v.git
broaden compiler support
- build in CI using snapshots from lts-13 through lts-22 and nightly - allow building with alex >= 3.2 and happy >= 1.19 - fallback to cabal version string with incompatible versions of githash
This commit is contained in:
parent
bc1329a72b
commit
988f76b92b
|
|
@ -0,0 +1,31 @@
|
|||
name: Resolver
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
resolver:
|
||||
- nightly
|
||||
- lts-22
|
||||
- lts-21
|
||||
- lts-20
|
||||
- lts-19
|
||||
- lts-18
|
||||
- lts-17
|
||||
- lts-16
|
||||
- lts-15
|
||||
- lts-14
|
||||
- lts-13
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: stack build --resolver ${{ matrix.resolver }}
|
||||
- run: stack exec sv2v --resolver ${{ matrix.resolver }} -- --help
|
||||
- run: stack exec sv2v --resolver ${{ matrix.resolver }} -- test/basic/*.sv
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{- sv2v
|
||||
|
|
@ -12,7 +13,9 @@ import Control.Monad (when)
|
|||
import Data.Char (toLower)
|
||||
import Data.List (isPrefixOf, isSuffixOf)
|
||||
import Data.Version (showVersion)
|
||||
#if MIN_VERSION_githash(0,1,5)
|
||||
import GitHash (giTag, tGitInfoCwdTry)
|
||||
#endif
|
||||
import qualified Paths_sv2v (version)
|
||||
import System.IO (stderr, hPutStr)
|
||||
import System.Console.CmdArgs
|
||||
|
|
@ -53,7 +56,11 @@ data Job = Job
|
|||
} deriving (Typeable, Data)
|
||||
|
||||
version :: String
|
||||
#if MIN_VERSION_githash(0,1,5)
|
||||
version = either (const backup) giTag $$tGitInfoCwdTry
|
||||
#else
|
||||
version = backup
|
||||
#endif
|
||||
where backup = showVersion Paths_sv2v.version
|
||||
|
||||
defaultJob :: Job
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ executable sv2v
|
|||
main-is: sv2v.hs
|
||||
hs-source-dirs: src
|
||||
build-tool-depends:
|
||||
, alex:alex >= 3.2.5 && < 4
|
||||
, happy:happy >= 1.20 && < 2
|
||||
, alex:alex >= 3.2 && < 4
|
||||
, happy:happy >= 1.19 && < 2
|
||||
build-depends:
|
||||
, array
|
||||
, base
|
||||
|
|
|
|||
Loading…
Reference in New Issue