Skip to content

Commit

Permalink
Merge remote-tracking branch 'odr/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-abrar committed May 28, 2024
2 parents cd0168d + ef7f74f commit 7ad21c8
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 28 deletions.
72 changes: 46 additions & 26 deletions .github/workflows/Cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,63 @@ on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
ghc: ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.2']
os: ['ubuntu-latest', 'macos-latest']
exclude:
# There are some linker warnings in 802 on darwin that
# cause compilation to fail
# See https://github.com/NixOS/nixpkgs/issues/25139
- ghc: '8.0.2'
os: [ubuntu-latest]
ghc: ['8.6', '8.10', '9.4', '9.6', '9.8', '9.10']
include:
- ghc: '9.10'
os: 'macos-latest'
runs-on: ${{ matrix.os }}

name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-haskell@v1
- uses: actions/checkout@v4

- name: Set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
- name: Cache
uses: actions/cache@v1

- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --enable-documentation
cabal build all --dry-run
# The last step generates dist-newstyle/cache/plan.json for the cache key.

- name: Restore cached dependencies
uses: actions/cache/restore@v4
id: cache
env:
cache-name: cache-cabal
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ~/.cabal
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.ghc }}-build-
${{ runner.os }}-${{ matrix.ghc }}-
${{ runner.os }}
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-

- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
# If we had an exact cache hit, the dependencies will be up to date.
if: steps.cache.outputs.cache-hit != 'true'
run: cabal build all --only-dependencies

# Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
- name: Save cached dependencies
uses: actions/cache/save@v4
# If we had an exact cache hit, trying to save the cache would error because of key clash.
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: Build
run: cabal build --enable-tests --enable-benchmarks all
run: cabal build all

- name: Run tests
run: cabal test --enable-tests all
- name: Build Docs
run: cabal haddock
run: cabal test all

- name: Check cabal file
run: cabal check

- name: Build documentation
run: cabal haddock all
5 changes: 3 additions & 2 deletions monoidal-containers.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: monoidal-containers
version: 0.6.4.0
version: 0.6.5.0
synopsis: Containers with monoidal accumulation
description:
Containers with merging via monoidal accumulation. The 'Monoid' instances
Expand All @@ -26,7 +26,8 @@ build-type: Simple
cabal-version: >=1.10
extra-source-files: Changelog.md
tested-with:
GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.2 || ==9.2.1 || ==9.4.1
GHC ==8.2 || ==8.4 || ==8.6 || ==8.8 || ==8.10 || ==9.0 || ==9.2 || ==9.4
|| ==9.6 || ==9.10

source-repository head
type: git
Expand Down

0 comments on commit 7ad21c8

Please sign in to comment.