Skip to content

Commit

Permalink
refreeze with GHC 9.4.8, update CI-script, add haskell-ci dep
Browse files Browse the repository at this point in the history
  • Loading branch information
astynax committed Sep 19, 2024
1 parent 7ae665c commit ddaacf8
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 52 deletions.
53 changes: 28 additions & 25 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.14.3
# version: 0.18.1
#
# REGENDATA ("0.14.3",["github","hemmet.cabal"])
# REGENDATA ("0.18.1",["github","hemmet.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -19,7 +19,7 @@ on:
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
Expand All @@ -28,19 +28,14 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.2.2
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.2.2
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.0.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
compilerVersion: 8.10.7
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
fail-fast: false
Expand All @@ -50,10 +45,10 @@ 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.17.5/x86_64-linux-ghcup-0.1.17.5 > "$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" install ghc "$HCVER"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -65,11 +60,13 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -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"
Expand Down Expand Up @@ -119,14 +116,14 @@ jobs:
- name: install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
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
uses: actions/checkout@v3
with:
path: source
- name: initial cabal.project for sdist
Expand Down Expand Up @@ -161,8 +158,8 @@ jobs:
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: cache
uses: actions/cache@v2
- name: restore cache
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -186,8 +183,14 @@ jobs:
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright Aleksey Pirogov (c) 2017
Copyright Aleksey (astynax) Pirogov (c) 2024

All rights reserved.

Expand Down Expand Up @@ -27,4 +27,4 @@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ install:
.PHONY: update-tests
update-tests:
cabal test --test-option=--accept

.PHONY: update-ci
update-ci:
cabal run --flag ci -- haskell-ci github hemmet.cabal
48 changes: 24 additions & 24 deletions cabal.project.freeze
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ constraints: any.Glob ==0.10.2,
any.ansi-terminal ==1.1.1,
ansi-terminal -example,
any.ansi-terminal-types ==1.1,
any.array ==0.5.7.0,
any.array ==0.5.4.0,
any.async ==2.2.5,
async -bench,
any.base ==4.20.0.0,
any.base ==4.17.2.1,
any.bimap ==0.5.0,
any.binary ==0.8.9.2,
any.binary ==0.8.9.1,
any.blaze-builder ==0.4.2.3,
any.brick ==2.4,
brick -demos,
any.bytestring ==0.12.1.0,
any.bytestring ==0.11.5.3,
any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0,
any.colour ==2.3.6,
any.config-ini ==0.2.7.0,
config-ini -enable-doctests,
any.containers ==0.7,
any.containers ==0.6.7,
any.data-clist ==0.2,
any.deepseq ==1.5.0.0,
any.directory ==1.3.8.3,
any.deepseq ==1.4.8.0,
any.directory ==1.3.7.1,
any.dlist ==1.0,
dlist -werror,
any.exceptions ==0.10.7,
any.filepath ==1.5.2.0,
any.exceptions ==0.10.5,
any.filepath ==1.4.2.2,
any.ghc-bignum ==1.3,
any.ghc-boot-th ==9.10.1,
any.ghc-internal ==9.1001.0,
any.ghc-prim ==0.11.0,
any.hashable ==1.5.0.0,
hashable -arch-native -random-initial-seed,
any.ghc-boot-th ==9.4.8,
any.ghc-prim ==0.9.1,
any.hashable ==1.4.7.0,
hashable -arch-native +integer-gmp -random-initial-seed,
any.haskell-lexer ==1.1.1,
hemmet -ci,
any.hspec ==2.11.9,
any.hspec-api ==2.11.9,
any.hspec-core ==2.11.9,
Expand All @@ -49,19 +49,19 @@ constraints: any.Glob ==0.10.2,
any.microlens ==0.4.13.1,
any.microlens-mtl ==0.2.0.3,
any.microlens-th ==0.4.3.15,
any.mtl ==2.3.1,
any.mtl ==2.2.2,
any.optparse-applicative ==0.18.1.0,
optparse-applicative +process,
any.os-string ==2.0.2,
any.parsec ==3.1.17.0,
any.os-string ==2.0.6,
any.parsec ==3.1.16.1,
any.parser-combinators ==1.3.0,
parser-combinators -dev,
any.pretty ==1.1.3.6,
any.prettyprinter ==1.7.1,
prettyprinter -buildreadme +text,
any.prettyprinter-ansi-terminal ==1.1.3,
any.primitive ==0.9.0.0,
any.process ==1.6.19.0,
any.process ==1.6.18.0,
any.quickcheck-io ==0.2.0,
any.random ==1.2.1.2,
any.rts ==1.0.2,
Expand All @@ -70,7 +70,7 @@ constraints: any.Glob ==0.10.2,
any.smallcheck ==1.2.1.1,
any.splitmix ==0.1.0.5,
splitmix -optimised-mixer,
any.stm ==2.5.3.1,
any.stm ==2.5.1.0,
any.tagged ==0.8.8,
tagged +deepseq +transformers,
any.tasty ==1.5,
Expand All @@ -80,19 +80,19 @@ constraints: any.Glob ==0.10.2,
any.tasty-hspec ==1.2.0.4,
any.tasty-quickcheck ==0.11,
any.tasty-smallcheck ==0.8.2,
any.template-haskell ==2.22.0.0,
any.template-haskell ==2.19.0.0,
any.temporary ==1.3,
any.terminfo ==0.4.1.6,
any.text ==2.1.1,
any.terminfo ==0.4.1.5,
any.text ==2.0.2,
any.text-zipper ==0.13,
any.tf-random ==0.5,
any.th-abstraction ==0.7.0.0,
any.time ==1.12.2,
any.transformers ==0.6.1.1,
any.transformers ==0.5.6.2,
any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.typed-process ==0.2.12.0,
any.unix ==2.8.5.1,
any.unix ==2.7.3,
any.unix-compat ==0.7.2,
any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.20,
Expand Down
9 changes: 8 additions & 1 deletion hemmet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@ maintainer: [email protected]
copyright: Aleksei Pirogov aka astynax
category: Text
build-type: Simple
tested-with: GHC==9.2.2, GHC==9.0.2, GHC==8.10.7
tested-with: GHC==9.4.8, GHC==9.8.2
extra-source-files:
README.md

source-repository head
type: git
location: https://github.com/astynax/hemmet

flag ci
description: Install also a haskell-CI
default: False
manual: True

common basics
build-depends: base >=4.13.0.0 && <5.0.0.0
if flag(ci)
build-tool-depends: haskell-ci:haskell-ci
other-modules: Paths_hemmet
autogen-modules: Paths_hemmet
default-language: Haskell2010
Expand Down

0 comments on commit ddaacf8

Please sign in to comment.