From 779452e60227f90bf75b3a9dbb6a64f128074b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= <969523+alaendle@users.noreply.github.com> Date: Thu, 21 Sep 2023 06:47:01 +0200 Subject: [PATCH] Build tutorials during CI; but not on hackage. --- .github/workflows/ci.yml | 2 +- co-log.cabal | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d12cd53..afbbfcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: - name: Configure run: | - cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always + cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always -ftutorial - name: Freeze run: | diff --git a/co-log.cabal b/co-log.cabal index 62cc9b5..79c49ac 100644 --- a/co-log.cabal +++ b/co-log.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: co-log -version: 0.6.0.1 +version: 0.6.0.2 synopsis: Composable Contravariant Comonadic Logging Library description: The default implementation of logging based on [co-log-core](http://hackage.haskell.org/package/co-log-core). @@ -27,6 +27,10 @@ tested-with: GHC == 8.10.7 GHC == 9.4.7 GHC == 9.6.2 +flag tutorial + description: Controls if tutorials get build (mainly to avoid building them on hackage). + default: False + source-repository head type: git location: https://github.com/co-log/co-log.git @@ -71,13 +75,12 @@ common common-options common tutorial-options import: common-options - if os(windows) + if os(windows) || !flag(tutorial) buildable: False build-depends: co-log-core - , markdown-unlit >= 0.5.0 && < 0.7 , text - build-tool-depends: markdown-unlit:markdown-unlit + build-tool-depends: markdown-unlit:markdown-unlit >= 0.5.0 && < 0.7 ghc-options: -pgmL markdown-unlit common tutorial-depends @@ -90,12 +93,12 @@ library import: common-options hs-source-dirs: src exposed-modules: Colog - Colog.Actions - Colog.Contra - Colog.Message - Colog.Monad - Colog.Pure - Colog.Rotation + Colog.Actions + Colog.Contra + Colog.Message + Colog.Monad + Colog.Pure + Colog.Rotation build-depends: ansi-terminal >= 1.0 && < 1.1 , bytestring >= 0.10.8 && < 0.13