Skip to content

Commit

Permalink
Require building with singletons-base-3.5/GHC 9.12
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Dec 30, 2024
1 parent 9465135 commit dbf1182
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
40 changes: 23 additions & 17 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.19.20240514
# version: 0.19.20241222
#
# REGENDATA ("0.19.20240514",["github","cabal.project"])
# REGENDATA ("0.19.20241222",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -28,22 +28,37 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.10.1
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.10.1
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
- name: apt-get install
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install (prerelease)
run: |
"$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 cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$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)
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=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -54,21 +69,12 @@ jobs:
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$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=$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"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -179,8 +185,8 @@ jobs:
run: |
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: save cache
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### next [????.??.??]
* Require `singletons-base-3.5` and GHC 9.12.

### 0.9.5 [2024.05.12]
* Require `singletons-base-3.4` and GHC 9.10.

Expand Down
14 changes: 7 additions & 7 deletions eliminators.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ category: Dependent Types
build-type: Simple
extra-source-files: CHANGELOG.md, README.md
cabal-version: >=1.10
tested-with: GHC == 9.10.1
tested-with: GHC == 9.12.1

source-repository head
type: git
Expand All @@ -30,14 +30,14 @@ library
Data.Eliminator.TH
Data.Eliminator.TypeLits
Data.Eliminator.TypeNats
build-depends: base >= 4.20 && < 4.21
build-depends: base >= 4.21 && < 4.22
, extra >= 1.4.2 && < 1.9
, singletons-base >= 3.4 && < 3.5
, singletons-base >= 3.5 && < 3.6
, singleton-nats >= 0.4.2 && < 0.5
, template-haskell >= 2.22 && < 2.23
, template-haskell >= 2.23 && < 2.24
, text >= 2.0.1 && < 2.2
, th-abstraction >= 0.4 && < 0.8
, th-desugar >= 1.17 && < 1.18
, th-desugar >= 1.18 && < 1.19
hs-source-dirs: src
default-language: GHC2021
ghc-options: -Wall -Wcompat -Wno-unticked-promoted-constructors -fenable-th-splice-warnings
Expand All @@ -58,10 +58,10 @@ test-suite spec
PolyRecTypes
VecTypes
VecSpec
build-depends: base >= 4.20 && < 4.21
build-depends: base >= 4.21 && < 4.22
, eliminators
, hspec >= 2 && < 3
, singletons-base >= 3.4 && < 3.5
, singletons-base >= 3.5 && < 3.6
, singleton-nats >= 0.4.2 && < 0.5
build-tool-depends: hspec-discover:hspec-discover
hs-source-dirs: tests
Expand Down

0 comments on commit dbf1182

Please sign in to comment.