Skip to content

Commit

Permalink
Don't generate debug files when building production
Browse files Browse the repository at this point in the history
  • Loading branch information
kvanbere committed Sep 21, 2019
1 parent 866b4c9 commit 88bfbe7
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ before_install:
# any command which exits with a non-zero exit code causes the build to fail.
script:
- source .ci-scripts/travis/run-hlint.sh
- travis_wait 45 stack --no-terminal --skip-ghc-check test --haddock --no-haddock-deps
- travis_wait 45 stack --no-terminal --skip-ghc-check test --flag github-webhooks:ci --haddock --no-haddock-deps
- source .ci-scripts/travis/run-weeder.sh

# Build the integration examples
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
- stack --no-terminal --verbosity=error setup 2>&1 >stack-setup.log || type stack-setup.log

test_script:
- stack --no-terminal --skip-ghc-check test --haddock --no-haddock-deps
- stack --no-terminal --skip-ghc-check test --flag github-webhooks:ci --haddock --no-haddock-deps
- stack --no-terminal --skip-ghc-check build
github-webhooks-scotty-example
github-webhooks-servant-simple-example
Expand Down
7 changes: 4 additions & 3 deletions examples/scotty/github-webhooks-scotty-example.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
-- This file has been generated from package.yaml by hpack version 0.21.2.
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.31.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 8bda503a0c6b3674a8a992c694ee4bfd90dfca2bed81c37a0842147f2e831a43
-- hash: ec9a5d0f673953f16afca93ad06e6d3722f9d853a5901b2a9f499d67ea2d0258

cabal-version: >= 1.10
name: github-webhooks-scotty-example
version: 0.0.0
author: Kyle Van Berendonck <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
-- This file has been generated from package.yaml by hpack version 0.21.2.
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.31.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 0716f1c3282053e53da221bf6646fe5799818ee2ab99cc96337ef5bdd745586d
-- hash: a3c0d3d7bac698ce0b40f6b9756567525932ef5c8b4aa36d056016cc4b36fddc

cabal-version: >= 1.10
name: github-webhooks-servant-simple-example
version: 0.0.0
author: Kyle Van Berendonck <[email protected]>
Expand Down
7 changes: 4 additions & 3 deletions examples/servant/github-webhooks-servant-example.cabal
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
-- This file has been generated from package.yaml by hpack version 0.21.2.
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.31.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 11035414b03cdbc50e83bb54009d87266031f5dc204b6ba81e1e51baf5c72fc1
-- hash: 879ccec7655889178f4f20000e981739dc2ba5ebb75109f1ddc36b1c572bdfa0

cabal-version: >= 1.10
name: github-webhooks-servant-example
version: 0.0.0
author: Kyle Van Berendonck <[email protected]>
Expand Down
13 changes: 10 additions & 3 deletions github-webhooks.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
-- see: https://github.com/sol/hpack
--
-- hash: e9dfdc3a652132da2d0ec1b4f6d422a3212c3521a47902c30a7bdbdc3a757159
-- hash: a8a3058292d764f69ecdc7ddb3fcea6b948e8950609abee98f65e13a591d63d1

cabal-version: >= 1.10
name: github-webhooks
Expand Down Expand Up @@ -68,11 +68,15 @@ source-repository head
type: git
location: https://github.com/onrock-eng/github-webhooks

flag ci
description: A stricter build designed for continuous integration.
manual: True
default: False

library
hs-source-dirs:
src
default-extensions: DeriveDataTypeable DeriveGeneric OverloadedStrings
ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi
build-depends:
aeson
, base ==4.*
Expand All @@ -85,6 +89,8 @@ library
, text
, time
, vector
if flag(ci)
ghc-options: -Wall -Werror -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi
exposed-modules:
GitHub.Data.Webhooks.Events
GitHub.Data.Webhooks.Payload
Expand All @@ -99,7 +105,6 @@ test-suite spec
hs-source-dirs:
spec
default-extensions: DeriveDataTypeable DeriveGeneric OverloadedStrings ScopedTypeVariables
ghc-options: -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi
build-depends:
aeson
, base ==4.*
Expand All @@ -108,6 +113,8 @@ test-suite spec
, hspec ==2.*
, text
, vector
if flag(ci)
ghc-options: -Wall -Werror -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi
other-modules:
DecodeEventsSpec
Paths_github_webhooks
Expand Down
11 changes: 9 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ github: onrock-eng/github-webhooks
description:
Complete instances for decoding GitHub Webhook payloads (using @aeson@).
See the README at <https://github.com/onrock-eng/github-webhooks#readme> for examples.
flags:
ci:
description: A stricter build designed for continuous integration.
default: false
manual: true

ghc-options:
- -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi

when:
- condition: flag(ci)
ghc-options: -Wall -Werror -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -ddump-to-file -ddump-hi

default-extensions:
- DeriveDataTypeable
Expand Down

0 comments on commit 88bfbe7

Please sign in to comment.