From 9dcffd5bd069155964f8e99f031eb7291d806b32 Mon Sep 17 00:00:00 2001 From: Edsko de Vries Date: Sat, 6 Apr 2024 15:30:27 +0200 Subject: [PATCH] Enable 9.8 on CI Reduce `cabal.haskell-ci` to an absolute minimum, so that we pick up the correct defaults each time we upgrade `haskell-ci`. Make `cabal check` happy. --- .github/workflows/haskell-ci.yml | 24 ++-- cabal.haskell-ci | 192 ------------------------------- cabal.project | 13 +-- cabal.project.ci | 15 +-- grapesy.cabal | 19 +++ 5 files changed, 45 insertions(+), 218 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 87480ebb..3511be79 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -28,6 +28,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.8.2 + compilerKind: ghc + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.6.4 compilerKind: ghc compilerVersion: 9.6.4 @@ -55,7 +60,7 @@ jobs: apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) @@ -163,18 +168,17 @@ jobs: echo "package grapesy" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -200,6 +204,10 @@ jobs: - name: tests run: | $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct + - name: cabal check + run: | + cd ${PKGDIR_grapesy} || false + ${CABAL} -vnormal check - name: haddock run: | $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 3eb3ce69..ffa544b6 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,194 +1,2 @@ --- cabal-install version for all jobs -cabal-install-version: 3.10 - --- jobs (N:M - cabal:ghc) -jobs: - --- distribution version (xenial, bionic, focal, jammy) -distribution: bionic - --- Jobs selection across packages -jobs-selection: uniform - --- Restrict jobs selection futher from per package tested-with -enabled: True - --- Copy ? fields from cabal.project fields copy-fields: all - --- --ghc-options for local packages -local-ghc-options: - --- Clone submodules, i.e. recursively -submodules: False - --- Disable caching -cache: True - --- Skip separate dependency installation step -install-dependencies: True - --- Specify 'constraint: ... installed' packages -installed: -all - --- Build tests with -tests: True - --- Run tests with (note: only built tests are run) -run-tests: True - --- Build benchmarks -benchmarks: True - --- Haddock step -haddock: True - --- Haddock components -haddock-components: all - --- Build without tests and benchmarks -no-tests-no-benchmarks: True - --- Make unconstrained build -unconstrained: True - --- Use head.hackage repository. Also marks as allow-failures -head-hackage: >=9.7 - --- Use :override for head.hackage repository -head-hackage-override: True - --- Run tests with GHCJS (experimental, relies on cabal-plan finding test-suites) -ghcjs-tests: False - -ghcjs-tools: - --- Use --test-show-details=direct, may cause problems with build-type: Custom -test-output-direct: True - --- Disable cabal check run -cabal-check: False - --- Enable builds only for specific branches -branches: - --- Enable IRC notifications to given channel (e.g. 'irc.libera.chat#haskell-lens') -irc-channels: - --- Nickname with which to authenticate to an IRC server. Only used if `irc-channels` are set. -irc-nickname: - --- Password with which to authenticate to an IRC server. Only used if `irc-channels` are set. -irc-password: - --- Only send IRC notifications if run from the original remote (GitHub Actions only) -irc-if-in-origin-repo: False - --- Disable email notifications -email-notifications: True - --- Project name (used for IRC notifications), defaults to package name or name of first package listed in cabal.project file -project-name: - --- Build steps to fold -folds: - --- Add ghc-head job -ghc-head: False - --- Add postgresql service -postgresql: False - --- Add google-chrome service -google-chrome: False - --- Environment variables per job (e.g. `8.0.2:HADDOCK=false`) -env: - --- Allow failures of particular GHC version -allow-failures: False - --- [Discouraged] Assume there are only GHCs last in major series: 8.2.* will match only 8.2.2 -last-in-series: False - --- Jobs to build on Linux -linux-jobs: True - --- Jobs to additionally build with OSX -macos-jobs: False - --- Use (or don't) ghcup to install cabal -ghcup-cabal: True - --- (Linux) jobs to use ghcup to install tools -ghcup-jobs: >8.10.4 && <9 || >9.0.1 - --- ghcup version -ghcup-version: 0.1.19.2 - --- Additional apt packages to install apt: libsnappy-dev - -travis-patches: - -github-patches: - --- Don't insert the haskell-ci version into the generated Travis YAML file -insert-version: True - --- Insert -Werror=missing-methods for package scope (none, local, all) -error-missing-methods: local - --- Enable Doctest job -doctest: False - --- Additional Doctest options -doctest-options: - --- Doctest version -doctest-version: ^>=0.21.0 - --- Filter packages from .ghc.environment file -doctest-filter-packages: - --- Skip doctests for these packages -doctest-skip: - --- Enable Docspec job -docspec: False - --- Additional Docspec options -docspec-options: - --- URL to download cabal-docspec -docspec-url: https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230517/cabal-docspec-0.0.0.20230517-x86_64-linux.xz - --- SHA256 of cabal-docspec -docspec-hash: 3b31bbe463ad4d671abbc103db49628562ec48a6604cab278207b5b6acd21ed7 - --- Enable HLint job -hlint: False - --- Specify HLint job -hlint-job: latest - -hlint-yaml: - --- Additional HLint options -hlint-options: - --- HLint version -hlint-version: >=3.5 && <3.6 - --- Download HLint binary release -hlint-download-binary: True - --- Raw travis commands which will be run at the very end of the script -raw-travis: - --- The name of GitHub Action -github-action-name: - --- The maximum number of minutes to let a job run -timeout-minutes: 60 - diff --git a/cabal.project b/cabal.project index 9a86f7b9..79087447 100644 --- a/cabal.project +++ b/cabal.project @@ -2,12 +2,9 @@ packages: . package grapesy tests: True - flags: +build-demo +build-stress-test +build-interop + flags: +build-demo +build-stress-test +snappy --- for ghc 9.8. See -allow-newer: proto-lens:base -allow-newer: proto-lens:deepseq -allow-newer: proto-lens:ghc-prim -allow-newer: proto-lens:primitive -allow-newer: proto-lens-runtime:base -allow-newer: proto-lens-runtime:deepseq +source-repository-package + type: git + location: git@github.com:well-typed/snappy-c.git + tag: 7b37b14c847378c6519844a1b0c29d23e0db8f71 diff --git a/cabal.project.ci b/cabal.project.ci index d4226698..35b6fec3 100644 --- a/cabal.project.ci +++ b/cabal.project.ci @@ -2,15 +2,10 @@ packages: . package grapesy tests: True - -- Force the snappy flag to true for CI - flags: +build-demo +build-stress-test +build-interop +snappy - -- Insist on no warnings + flags: +build-demo +build-stress-test +snappy ghc-options: -Werror --- for ghc 9.8. See -allow-newer: proto-lens:base -allow-newer: proto-lens:deepseq -allow-newer: proto-lens:ghc-prim -allow-newer: proto-lens:primitive -allow-newer: proto-lens-runtime:base -allow-newer: proto-lens-runtime:deepseq +source-repository-package + type: git + location: git@github.com:well-typed/snappy-c.git + tag: 7b37b14c847378c6519844a1b0c29d23e0db8f71 diff --git a/grapesy.cabal b/grapesy.cabal index 18fb8438..800dc5e0 100644 --- a/grapesy.cabal +++ b/grapesy.cabal @@ -1,6 +1,10 @@ cabal-version: 3.0 name: grapesy version: 0.1.0 +synopsis: Native Haskell implementation of the gRPC framework +description: This is a fully compliant and feature complete native Haskell + implementation of gRPC, Google's RPC framework. See README.md + for details. license: BSD-3-Clause license-file: LICENSE author: Edsko de Vries @@ -19,6 +23,11 @@ tested-with: GHC==8.10.7 , GHC==9.2.8 , GHC==9.4.8 , GHC==9.6.4 + , GHC==9.8.2 + +source-repository head + type: git + location: https://github.com/well-typed/grapesy common lang ghc-options: @@ -159,6 +168,8 @@ library -- TODO: Should move to its own package Control.Monad.XIO + autogen-modules: + Paths_grapesy hs-source-dirs: src xio @@ -262,6 +273,8 @@ test-suite test-grapesy Proto.Empty Proto.Messages Proto.Test + autogen-modules: + Paths_grapesy build-depends: -- Internal dependencies , grapesy @@ -319,6 +332,8 @@ executable demo-client Proto.Helloworld_Fields Proto.RouteGuide Proto.RouteGuide_Fields + autogen-modules: + Paths_grapesy build-depends: -- Internal dependencies , grapesy @@ -365,6 +380,8 @@ executable demo-server Proto.RouteGuide Proto.RouteGuide_Fields + Paths_grapesy + autogen-modules: Paths_grapesy build-depends: -- Internal dependencies @@ -469,6 +486,8 @@ test-suite grapesy-interop Proto.Empty Proto.Messages Proto.Test + autogen-modules: + Paths_grapesy build-depends: , grapesy build-depends: