Skip to content

Commit

Permalink
Enable 9.8 on CI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
edsko committed Apr 10, 2024
1 parent d2cf931 commit 9dcffd5
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 218 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -163,18 +168,17 @@ jobs:
echo "package grapesy" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
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: [email protected]:well-typed/snappy-c.git
tag: 7b37b14c847378c6519844a1b0c29d23e0db8f71
package grapesy
tests: True
flags: +build-demo +build-stress-test +build-interop +snappy
flags: +build-demo +build-stress-test +snappy
ghc-options: -Werror
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(grapesy)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
Expand All @@ -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
Expand Down
192 changes: 0 additions & 192 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -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

13 changes: 5 additions & 8 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/google/proto-lens/pull/466>
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: [email protected]:well-typed/snappy-c.git
tag: 7b37b14c847378c6519844a1b0c29d23e0db8f71
15 changes: 5 additions & 10 deletions cabal.project.ci
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/google/proto-lens/pull/466>
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: [email protected]:well-typed/snappy-c.git
tag: 7b37b14c847378c6519844a1b0c29d23e0db8f71
19 changes: 19 additions & 0 deletions grapesy.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -159,6 +168,8 @@ library

-- TODO: Should move to its own package
Control.Monad.XIO
autogen-modules:
Paths_grapesy
hs-source-dirs:
src
xio
Expand Down Expand Up @@ -262,6 +273,8 @@ test-suite test-grapesy
Proto.Empty
Proto.Messages
Proto.Test
autogen-modules:
Paths_grapesy
build-depends:
-- Internal dependencies
, grapesy
Expand Down Expand Up @@ -319,6 +332,8 @@ executable demo-client
Proto.Helloworld_Fields
Proto.RouteGuide
Proto.RouteGuide_Fields
autogen-modules:
Paths_grapesy
build-depends:
-- Internal dependencies
, grapesy
Expand Down Expand Up @@ -365,6 +380,8 @@ executable demo-server
Proto.RouteGuide
Proto.RouteGuide_Fields

Paths_grapesy
autogen-modules:
Paths_grapesy
build-depends:
-- Internal dependencies
Expand Down Expand Up @@ -469,6 +486,8 @@ test-suite grapesy-interop
Proto.Empty
Proto.Messages
Proto.Test
autogen-modules:
Paths_grapesy
build-depends:
, grapesy
build-depends:
Expand Down

0 comments on commit 9dcffd5

Please sign in to comment.