Skip to content

Commit

Permalink
Merge pull request #456 from phadej/ghc-9.0
Browse files Browse the repository at this point in the history
Allow base-4.15
  • Loading branch information
phadej committed Mar 7, 2021
2 parents b063b6e + bf5f8fd commit cb04452
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 19 deletions.
47 changes: 34 additions & 13 deletions .github/workflows/haskell-ci.yml
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.11.20201213
# version: 0.11.20210222
#
# REGENDATA ("0.11.20201213",["--config=cabal.haskell-ci","github","cabal.project"])
# REGENDATA ("0.11.20210222",["--config=cabal.haskell-ci","github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -22,21 +22,32 @@ on:
- master
jobs:
linux:
name: Haskell-CI Linux
name: Haskell-CI - Linux - GHC ${{ matrix.ghc }}
runs-on: ubuntu-18.04
container:
image: buildpack-deps:bionic
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- ghc: 8.10.1
- ghc: 8.8.3
- ghc: 9.0.1
allow-failure: false
- ghc: 8.10.4
allow-failure: false
- ghc: 8.8.4
allow-failure: false
- ghc: 8.6.5
allow-failure: false
- ghc: 8.4.4
allow-failure: false
- ghc: 8.2.2
allow-failure: false
- ghc: 8.0.2
allow-failure: false
- ghc: 7.10.3
allow-failure: false
- ghc: 7.8.4
allow-failure: false
fail-fast: false
steps:
- name: apt
Expand All @@ -45,7 +56,7 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y ghc-$GHC_VERSION cabal-install-3.2
apt-get install -y ghc-$GHC_VERSION cabal-install-3.4
env:
GHC_VERSION: ${{ matrix.ghc }}
- name: Set PATH and environment variables
Expand All @@ -58,12 +69,13 @@ jobs:
echo "HC=$HC" >> $GITHUB_ENV
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
echo "HEADHACKAGE=false" >> $GITHUB_ENV
echo "ARG_COMPILER=--ghc --with-compiler=$HC" >> $GITHUB_ENV
echo "GHCJSARITH=0" >> $GITHUB_ENV
env:
GHC_VERSION: ${{ matrix.ghc }}
Expand All @@ -75,7 +87,7 @@ jobs:
mkdir -p $CABAL_DIR
cat >> $CABAL_CONFIG <<EOF
remote-build-reporting: anonymous
write-ghc-environment-files: always
write-ghc-environment-files: never
remote-repo-cache: $CABAL_DIR/packages
logs-dir: $CABAL_DIR/logs
world-file: $CABAL_DIR/world
Expand Down Expand Up @@ -106,14 +118,20 @@ jobs:
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v2
with:
path: source
- name: initial cabal.project for sdist
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/samples" >> cabal.project
cat cabal.project
- name: sdist
run: |
mkdir -p sdist
cd source || false
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
- name: unpack
run: |
Expand All @@ -138,6 +156,9 @@ jobs:
constraints: semigroups ^>=0.19
constraints: github +openssl
constraints: github-samples +openssl
allow-newer: deepseq-generics-0.2.0.0:base
allow-newer: deepseq-generics-0.2.0.0:ghc-prim
allow-newer: cryptohash-sha1-0.11.100.1:base
optimization: False
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
Expand All @@ -155,14 +176,14 @@ jobs:
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: install dependencies
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only all
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only all
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
- name: build w/o tests
run: |
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: build
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
- name: tests
run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
Expand Down
4 changes: 4 additions & 0 deletions cabal.project
Expand Up @@ -9,3 +9,7 @@ constraints: semigroups ^>=0.19

constraints: github +openssl
constraints: github-samples +openssl

allow-newer: deepseq-generics-0.2.0.0:base
allow-newer: deepseq-generics-0.2.0.0:ghc-prim
allow-newer: cryptohash-sha1-0.11.100.1:base
9 changes: 5 additions & 4 deletions github.cabal
Expand Up @@ -27,7 +27,7 @@ maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
homepage: https://github.com/phadej/github
build-type: Simple
copyright:
Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016-2019 Oleg Grenrus
Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016-2021 Oleg Grenrus

tested-with:
GHC ==7.8.4
Expand All @@ -36,8 +36,9 @@ tested-with:
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
|| ==8.8.3
|| ==8.10.1
|| ==8.8.4
|| ==8.10.4
|| ==9.0.1

extra-source-files:
README.md
Expand Down Expand Up @@ -164,7 +165,7 @@ library

-- Packages bundles with GHC, mtl and text are also here
build-depends:
base >=4.7 && <4.15
base >=4.7 && <4.16
, binary >=0.7.1.0 && <0.11
, bytestring >=0.10.4.0 && <0.11
, containers >=0.5.5.1 && <0.7
Expand Down
5 changes: 3 additions & 2 deletions samples/github-samples.cabal
Expand Up @@ -15,8 +15,9 @@ tested-with:
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
|| ==8.8.3
|| ==8.10.1
|| ==8.8.4
|| ==8.10.4
|| ==9.0.1

library
hs-source-dirs: src
Expand Down

0 comments on commit cb04452

Please sign in to comment.