Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the cabal file is up-to-date on CI #648

Merged
merged 4 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/Stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ jobs:
run: |
stack update
stack build --system-ghc --only-dependencies --test --bench --no-run-tests --no-run-benchmarks
# Despite the name, `stack build --dry-run` generates the cabal file.
# See https://github.com/commercialhaskell/stack/issues/3697#issuecomment-353729540.
- name: Ensure the cabal file is up-to-date
run: |
mv hindent.cabal hindent.cabal.original
stack build --dry-run
diff hindent.cabal hindent.cabal.original
mv hindent.cabal.original hindent.cabal
- name: Build
run: stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Run tests
Expand Down
20 changes: 6 additions & 14 deletions hindent.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.0

-- This file has been generated from package.yaml by hpack version 0.35.0.
-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack

Expand Down Expand Up @@ -67,8 +67,6 @@ library
HIndent.Types
other-modules:
Paths_hindent
autogen-modules:
Paths_hindent
hs-source-dirs:
src
ghc-options: -Wall -O2
Expand All @@ -93,21 +91,19 @@ library
, unicode-show
, utf8-string
, yaml
default-language: Haskell2010
if impl(ghc >= 9.4.1)
build-depends:
ghc-lib-parser >=9.4.1.20220807 && <9.5
else
build-depends:
ghc-lib-parser >=9.2.3.20220527 && <9.3
default-language: Haskell2010

library hindent-internal
exposed-modules:
HIndent.Internal.Test.Markdone
other-modules:
Paths_hindent
autogen-modules:
Paths_hindent
hs-source-dirs:
internal
ghc-options: -Wall -O2
Expand All @@ -133,13 +129,13 @@ library hindent-internal
, unicode-show
, utf8-string
, yaml
default-language: Haskell2010
if impl(ghc >= 9.4.1)
build-depends:
ghc-lib-parser >=9.4.1.20220807 && <9.5
else
build-depends:
ghc-lib-parser >=9.2.3.20220527 && <9.3
default-language: Haskell2010

executable hindent
main-is: Main.hs
Expand Down Expand Up @@ -173,21 +169,19 @@ executable hindent
, unicode-show
, utf8-string
, yaml
default-language: Haskell2010
if impl(ghc >= 9.4.1)
build-depends:
ghc-lib-parser >=9.4.1.20220807 && <9.5
else
build-depends:
ghc-lib-parser >=9.2.3.20220527 && <9.3
default-language: Haskell2010

test-suite hindent-test
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
Paths_hindent
autogen-modules:
Paths_hindent
hs-source-dirs:
tests
ghc-options: -Wall -O2
Expand Down Expand Up @@ -216,21 +210,19 @@ test-suite hindent-test
, unicode-show
, utf8-string
, yaml
default-language: Haskell2010
if impl(ghc >= 9.4.1)
build-depends:
ghc-lib-parser >=9.4.1.20220807 && <9.5
else
build-depends:
ghc-lib-parser >=9.2.3.20220527 && <9.3
default-language: Haskell2010

benchmark hindent-bench
type: exitcode-stdio-1.0
main-is: Main.hs
other-modules:
Paths_hindent
autogen-modules:
Paths_hindent
hs-source-dirs:
benchmarks
ghc-options: -Wall -O2
Expand Down Expand Up @@ -259,10 +251,10 @@ benchmark hindent-bench
, unicode-show
, utf8-string
, yaml
default-language: Haskell2010
if impl(ghc >= 9.4.1)
build-depends:
ghc-lib-parser >=9.4.1.20220807 && <9.5
else
build-depends:
ghc-lib-parser >=9.2.3.20220527 && <9.3
default-language: Haskell2010
2 changes: 2 additions & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ executable:
dependencies:
- hindent
- optparse-applicative
generated-other-modules:
- Paths_hindent

tests:
hindent-test:
Expand Down