Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghc 9.8.1 #32

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 14 additions & 29 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/andreasabel/haskell-ci
#
# version: 0.17.20230911
# version: 0.17.20231012
#
# REGENDATA ("0.17.20230911",["github","STMonadTrans.cabal"])
# REGENDATA ("0.17.20231012",["github","STMonadTrans.cabal"])
#
name: Haskell-CI
on:
Expand All @@ -32,14 +32,14 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.8.0.20230822
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.8.0.20230822
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: true
- compiler: ghc-9.6.2
allow-failure: false
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.6.2
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
Expand All @@ -65,27 +65,27 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.0.2
compilerKind: ghc
compilerVersion: 8.0.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-7.10.3
compilerKind: ghc
Expand All @@ -97,7 +97,7 @@ jobs:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
Expand Down Expand Up @@ -175,18 +175,6 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
if $HEADHACKAGE; then
cat >> $CABAL_CONFIG <<EOF
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
EOF
fi
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
Expand Down Expand Up @@ -238,9 +226,6 @@ jobs:
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(STMonadTrans)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
Expand Down
93 changes: 78 additions & 15 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,25 @@ defaults:

jobs:
stack:
name: ${{ matrix.os }} stack ${{ matrix.ghc }}
name: Stack ${{ matrix.ghc }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
ghc: 9.4.5
resolver: nightly-2023-05-17
ghc: 9.8.1
resolver: nightly-2023-10-17
- os: ubuntu-latest
ghc: 9.2.7
resolver: lts-20.21
ghc: 9.6.3
resolver: nightly-2023-10-17
- os: ubuntu-latest
ghc: 9.4.7
resolver: lts-21.16
- os: ubuntu-latest
ghc: 9.2.8
resolver: lts-20.26
- os: ubuntu-latest
ghc: 9.0.2
resolver: lts-19.33
Expand Down Expand Up @@ -60,6 +66,9 @@ jobs:
# ghc: 7.8.4
# resolver: lts-2.22

env:
stack: 'stack --system-ghc --no-install-ghc'

steps:

- uses: actions/checkout@v3
Expand All @@ -74,20 +83,74 @@ jobs:

- name: Create stack.yaml
run: |
echo "resolver: ${{ matrix.resolver }}" > stack.yaml
echo "packages: [.]" >> stack.yaml
cat > stack.yaml <<EOF
resolver: ${{ matrix.resolver }}
compiler: ghc-${{ matrix.ghc }}
packages: [.]
EOF

# According to https://github.com/commercialhaskell/stack/issues/5754#issuecomment-1696156869
# not all of ~/.stack should be cached,
# only the index (pantry) and the dependencies (sqlite3+snapshots).

## Pantry
########################################################################

- name: Restore cached stack pantry
uses: actions/cache/restore@v3
id: cache-pantry
with:
path: ${{ steps.setup.outputs.stack-root }}/pantry
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-pantry-resolver-${{ matrix.resolver }}
# No fall-back keys here!

- name: Stack update
if: steps.cache-pantry.outputs.cache-hit != 'true'
run: ${{ env.stack }} update

- uses: actions/cache@v3
- name: Cache stack pantry
if: steps.cache-pantry.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: ${{ steps.setup.outputs.stack-root }}
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-resolver-${{ matrix.resolver }}
restore-keys: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-
path: ${{ steps.setup.outputs.stack-root }}/pantry
key: ${{ steps.cache-pantry.outputs.cache-primary-key }}

## Dependencies
########################################################################

- name: Stack build plan
run: ${{ env.stack }} test --dry-run > '.build-plan.txt'

- name: Restore cached dependencies
uses: actions/cache/restore@v3
id: cache-deps
with:
path: |
${{ steps.setup.outputs.stack-root }}/stack.sqlite3
${{ steps.setup.outputs.stack-root }}/snapshots
key: ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-resolver-${{ matrix.resolver }}-plan-${{ hashfiles('.build-plan.txt') }}
restore-keys: |
${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-resolver-${{ matrix.resolver }}-
${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs.ghc-version }}-

- name: Build dependencies
run: stack build --system-ghc --dependencies-only
if: steps.cache-deps.outputs.cache-hit != 'true'
run: ${{ env.stack }} test --dependencies-only

- name: Cache dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
${{ steps.setup.outputs.stack-root }}/stack.sqlite3
${{ steps.setup.outputs.stack-root }}/snapshots
key: ${{ steps.cache-deps.outputs.cache-primary-key }}

## Build and test STMonadTrans
########################################################################

- name: Build
run: stack build --system-ghc
- name: Build w/ tests
run: ${{ env.stack }} test --no-run-tests

- name: Run tests
run: stack test --system-ghc
run: ${{ env.stack }} test
4 changes: 2 additions & 2 deletions STMonadTrans.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ description:
Maybe and combinations of their corresponding monad transformers.

Tested-With:
GHC == 9.8.0
GHC == 9.6.2
GHC == 9.8.1
GHC == 9.6.3
GHC == 9.4.7
GHC == 9.2.8
GHC == 9.0.2
Expand Down
Loading