Skip to content
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
202 changes: 98 additions & 104 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# packcheck-0.6.0
# packcheck-0.7.0
# You can use any of the options supported by packcheck as environment
# variables here. See https://github.com/composewell/packcheck for all
# options and their explanation.
Expand All @@ -22,155 +22,149 @@ on:

jobs:
build:
name: >-
${{ matrix.name }}
${{ matrix.command }}
${{ matrix.runner }}
${{ matrix.ghc_version }}
name: ${{ matrix.name }}
env:
# ------------------------------------------------------------------------
# Common options
# ------------------------------------------------------------------------
# GHC_OPTIONS: "-Werror"
GHCUP_VERSION: 0.1.20.0
DOCSPEC_URL: https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz
DOCSPEC_OPTIONS: "--timeout 60"
CABAL_REINIT_CONFIG: y
LC_ALL: C.UTF-8

# ------------------------------------------------------------------------
# What to build
# ------------------------------------------------------------------------
# DISABLE_TEST: "y"
# DISABLE_BENCH: "y"
# DISABLE_DOCS: "y"
# DISABLE_SDIST_BUILD: "y"
# DISABLE_SDIST_GIT_CHECK: "y"
# DISABLE_DIST_CHECKS: "y"
STACK_UPGRADE: "y"

# ------------------------------------------------------------------------
# Selecting tool versions
# ------------------------------------------------------------------------
GHCVER: ${{ matrix.ghc_version }}
# RESOLVER: ${{ matrix.stack_resolver }}

# ------------------------------------------------------------------------
# stack options
# ------------------------------------------------------------------------
# Note requiring a specific version of stack using STACKVER may fail due to
# github API limit while checking and upgrading/downgrading to the specific
# version.
#STACKVER: "1.6.5"
#STACK_UPGRADE: "y"
STACK_YAML: "stack.yaml"

# ------------------------------------------------------------------------
# cabal options
# ------------------------------------------------------------------------
CABAL_CHECK_RELAX: y
CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
CABAL_PROJECT: ${{ matrix.cabal_project }}
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
DISABLE_SDIST_PROJECT_CHECK: y
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com

# ------------------------------------------------------------------------
# Where to find the required tools
# ------------------------------------------------------------------------
PATH: /opt/ghc/bin:/sbin:/usr/sbin:/bin:/usr/bin
#TOOLS_DIR: /opt

# ------------------------------------------------------------------------
# Location of packcheck.sh (the shell script invoked to perform CI tests ).
# ------------------------------------------------------------------------
# You can either commit the packcheck.sh script at this path in your repo or
# you can use it by specifying the PACKCHECK_REPO_URL option below in which
# case it will be automatically copied from the packcheck repo to this path
# during CI tests. In any case it is finally invoked from this path.
PACKCHECK: "./packcheck.sh"
# If you have not committed packcheck.sh in your repo at PACKCHECK
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
PACKCHECK_GITHUB_COMMIT: "7c4e1ab7a59b5ed6e92cfd0da67460a6116be4ac"

# ------------------------------------------------------------------------
# Final build variables
# ------------------------------------------------------------------------
PACKCHECK_COMMAND: ${{ matrix.command }} ${{ matrix.pack_options }}
BUILD: ${{ matrix.build }}
GHCVER: ${{ matrix.ghc_version }}
#RESOLVER: ${{ matrix.resolver }}
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
CABAL_PROJECT: ${{ matrix.cabal_project }}
DISABLE_DOCS: ${{ matrix.disable_docs }}
#DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
#DISABLE_SDIST_BUILD: "y"
HLINT_VERSION: 3.6.1
HLINT_OPTIONS: ${{ matrix.hlint_options }}
HLINT_TARGETS: ${{ matrix.hlint_targets }}

runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: 9.4.4-linux
command: cabal-v2
- name: 9.12.1-Werror
ghc_version: 9.12.1
build: cabal
runner: ubuntu-latest
ghc_version: 9.4.4
cabal-version: 3.10.2.0
cabal_project: cabal.project.Werror

- name: 9.2.2-linux
command: cabal-v2
- name: 9.10.1-Werror
ghc_version: 9.10.1
build: cabal
runner: ubuntu-latest
ghc_version: 9.2.2
cabal-version: 3.10.2.0
cabal_project: cabal.project.Werror

- name: 9.0.2-linux
command: cabal-v2
- name: 9.8.1-Werror
ghc_version: 9.8.1
build: cabal
runner: ubuntu-latest
ghc_version: 9.0.2
cabal_project: cabal.project.user
cabal-version: 3.10.2.0
cabal_project: cabal.project.Werror

- name: 8.10.7-linux
command: cabal-v2
- name: hlint
build: hlint
hlint_options: "lint"
hlint_targets: "src"
runner: ubuntu-latest
ghc_version: 8.10.7
cabal_project: cabal.project.user
cabal-version: 3.2
cabal_project: cabal.project.Werror

- name: 9.6.3-macos
runner: macos-latest
ghc_version: 9.6.3
build: cabal
cabal-version: 3.10.1.0
cabal_project: cabal.project.Werror

- name: 8.10.7-linux-fusion-plugin
command: cabal-v2
- name: 9.4.4
runner: ubuntu-latest
ghc_version: 9.4.4
build: cabal
cabal-version: 3.8.1.0
cabal_project: cabal.project.Werror

- name: 9.4.4
runner: ubuntu-latest
ghc_version: 9.4.4
build: cabal
cabal-version: 3.8.1.0
cabal_project: cabal.project.Werror

- name: 9.2.7
runner: ubuntu-latest
ghc_version: 9.2.7
build: cabal
cabal-version: 3.6
cabal_project: cabal.project.Werror

- name: 8.10.7
runner: ubuntu-latest
ghc_version: 8.10.7
cabal_project: cabal.project.user
cabal_build_options: "--flag fusion-plugin"
build: cabal
cabal-version: 3.2
cabal_project: cabal.project.Werror
disable_docs: y

- name: 9.2.2-macos
ghc_version: 9.2.2
command: cabal-v2
runner: macos-latest
cabal_project: cabal.project.user
- name: 8.8.4
runner: ubuntu-latest
ghc_version: 8.8.4
build: cabal
cabal-version: 3.2
disable_docs: y

steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
if: ${{ matrix.name != 'hlint' }}
with:
ghc-version: ${{ matrix.ghc_version }}
enable-stack: true
stack-version: 'latest'
cabal-version: 'latest'

- uses: actions/cache@v2
name: Cache common directories
- uses: actions/cache@v4
name: Restore cache
with:
path: |
~/.cabal
~/.ghc
~/.local
~/.cabal
~/.stack
key: ${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.runner }}
.stack-work
key: ${{ runner.os }}-${{ matrix.name }}

- name: Download packcheck
run: |
# Check for PACKCHECK_GITHUB_COMMIT
if test -z "$PACKCHECK_GITHUB_COMMIT"
# If a custom stack-yaml is specified, replace the default with that
#if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
#unset STACK_YAML

if test ! -e "$PACKCHECK"
then
if test -z "$PACKCHECK_GITHUB_COMMIT"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
fi
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
chmod +x $PACKCHECK
elif test ! -x "$PACKCHECK"
then
die "PACKCHECK_GITHUB_COMMIT is not specified."
chmod +x $PACKCHECK
fi

# Get packcheck if needed
CURL=$(which curl)
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
if test ! -e "$PACKCHECK"; then $CURL -sL -o "$PACKCHECK" $PACKCHECK_URL; fi;
chmod +x $PACKCHECK

- name: Run packcheck
run: |
bash -c "$PACKCHECK $PACKCHECK_COMMAND"
bash -c "$PACKCHECK $BUILD"
18 changes: 9 additions & 9 deletions cabal.project.Werror
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
packages: streamly-statistics.cabal

source-repository-package
type: git
location: https://github.com/composewell/streamly.git
tag: master
-- source-repository-package
-- type: git
-- location: https://github.com/composewell/streamly.git
-- tag: master

source-repository-package
type: git
location: https://github.com/composewell/streamly.git
tag: master
subdir: core
-- source-repository-package
-- type: git
-- location: https://github.com/composewell/streamly.git
-- tag: master
-- subdir: core

jobs: 1

Expand Down
18 changes: 9 additions & 9 deletions cabal.project.user
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
packages: streamly-statistics.cabal

source-repository-package
type: git
location: https://github.com/composewell/streamly.git
tag: master
-- source-repository-package
-- type: git
-- location: https://github.com/composewell/streamly.git
-- tag: master

source-repository-package
type: git
location: https://github.com/composewell/streamly.git
tag: master
subdir: core
-- source-repository-package
-- type: git
-- location: https://github.com/composewell/streamly.git
-- tag: master
-- subdir: core

jobs: 1
10 changes: 7 additions & 3 deletions streamly-statistics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ bug-reports: https://github.com/composewell/streamly-statistics/issues
license: Apache-2.0
license-file: LICENSE
tested-with:
GHC==8.10.7
, GHC==9.0.2
, GHC==9.2.2
GHC==8.8.4
, GHC==8.10.7
, GHC==9.2.7
, GHC==9.4.4
, GHC==9.6.3
, GHC==9.8.1
, GHC==9.10.1
, GHC==9.12.1
author: Composewell Technologies
maintainer: streamly@composewell.com
copyright: 2019 Composewell Technologies
Expand Down
Loading