summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-03-23 17:12:28 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-03-23 17:49:50 +0100
commitd684bc2b012e23e3cc0dfa1195a74abac661b926 (patch)
tree2c00f6e065219adcc609a3ee83fa241a8785ca01
parenta168d79d757c28cd328b9c9cd0fb5033c57a4ee7 (diff)
Enable -Werror for CI testing
-rw-r--r--erebos.cabal15
-rw-r--r--main/Version.hs4
-rw-r--r--minici.yaml2
3 files changed, 19 insertions, 2 deletions
diff --git a/erebos.cabal b/erebos.cabal
index b824e03..f099719 100644
--- a/erebos.cabal
+++ b/erebos.cabal
@@ -33,12 +33,25 @@ Extra-Source-Files:
Flag ice
Description: Enable peer discovery with ICE support using pjproject
+Flag ci
+ description: Options for CI testing
+ default: False
+ manual: True
+
source-repository head
type: git
location: git://erebosprotocol.net/erebos
common common
- ghc-options: -Wall
+ ghc-options:
+ -Wall
+ -fdefer-typed-holes
+
+ if flag(ci)
+ ghc-options:
+ -Werror
+ -- sometimes needed for backward/forward compatibility:
+ -Wno-error=unused-imports
build-depends:
base >=4.13 && <4.19,
diff --git a/main/Version.hs b/main/Version.hs
index d7583bf..71af694 100644
--- a/main/Version.hs
+++ b/main/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
diff --git a/minici.yaml b/minici.yaml
index 2ff317b..333878c 100644
--- a/minici.yaml
+++ b/minici.yaml
@@ -1,6 +1,6 @@
job build:
shell:
- - cabal build
+ - cabal build -fci
- mkdir build
- cp $(cabal list-bin erebos) build/erebos
artifact erebos: