From d684bc2b012e23e3cc0dfa1195a74abac661b926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 23 Mar 2024 17:12:28 +0100 Subject: Enable -Werror for CI testing --- erebos.cabal | 15 ++++++++++++++- main/Version.hs | 4 ++++ minici.yaml | 2 +- 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: -- cgit v1.2.3