From bb46558401a50509936889d19de5144d0307e165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 26 Apr 2024 22:38:52 +0200 Subject: MiniCI configuration and cabal flag --- .gitignore | 1 + erebos-tester.cabal | 24 ++++++++++++++++++++++-- minici.yaml | 3 +++ src/Version.hs | 4 ++++ 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 minici.yaml diff --git a/.gitignore b/.gitignore index edc0c50..fa58281 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist-newstyle/ .test +.minici diff --git a/erebos-tester.cabal b/erebos-tester.cabal index 133d088..3c9adef 100644 --- a/erebos-tester.cabal +++ b/erebos-tester.cabal @@ -20,12 +20,29 @@ category: Testing extra-doc-files: CHANGELOG.md +flag ci + description: Options for CI testing + default: False + manual: True + source-repository head type: git location: git://erebosprotocol.net/tester +common common + ghc-options: + -Wall + -fdefer-typed-holes + + if flag(ci) + ghc-options: + -Werror + -- sometimes needed for backward/forward compatibility: + -Wno-error=unused-imports + executable erebos-tester - ghc-options: -Wall + import: common + main-is: Wrapper.hs -- other-modules: -- other-extensions: @@ -39,7 +56,10 @@ executable erebos-tester default-language: Haskell2010 executable erebos-tester-core - ghc-options: -Wall -threaded + import: common + ghc-options: + -threaded + main-is: Main.hs other-modules: Config diff --git a/minici.yaml b/minici.yaml new file mode 100644 index 0000000..a3f87f5 --- /dev/null +++ b/minici.yaml @@ -0,0 +1,3 @@ +job build: + shell: + - cabal build -fci diff --git a/src/Version.hs b/src/Version.hs index ace016b..d09ed36 100644 --- a/src/Version.hs +++ b/src/Version.hs @@ -1,5 +1,9 @@ {-# LANGUAGE TemplateHaskell #-} +-- "Pattern match is redundant" warning can be generated based on template +-- haskell $$tGitVersion value +{-# OPTIONS_GHC -Wno-error=overlapping-patterns #-} + module Version ( versionLine, ) where -- cgit v1.2.3