[#18] Support GHC-8.10 (#19)

* [#18] Support GHC-8.10

Resolves #18

* Add -Wunused-packages

* Disable README build on Windows

* Remove Windows from CI
This commit is contained in:
Dmitrii Kovanikov 2020-05-07 18:11:49 +01:00 committed by GitHub
parent db4507020f
commit 9fb7d02c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 116 additions and 153 deletions

View File

@ -1,32 +1,89 @@
name: "CI"
name: CI
on: [pull_request]
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
build:
name: ghc-${{ matrix.ghc }}
runs-on: ubuntu-18.04
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc: [ "8.2.2", "8.4.4", "8.6.5", "8.8.1" ]
cabal: [ "3.0" ]
os: [ubuntu-latest, macOS-latest]
cabal: ["3.0"]
ghc:
- "8.2.2"
- "8.4.4"
- "8.6.5"
- "8.8.3"
- "8.10.1"
exclude:
- os: macOS-latest
ghc: 8.8.3
- os: macOS-latest
ghc: 8.6.5
- os: macOS-latest
ghc: 8.4.4
- os: macOS-latest
ghc: 8.2.2
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
- uses: actions/setup-haskell@v1.1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Setup Haskell
uses: actions/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache cabal-store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Build
run: |
cabal v2-update
cabal v2-build --enable-tests --enable-benchmarks --write-ghc-environment-files=always
cabal v2-test
- name: Build
run: |
cabal update
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=always
- name: Test
run: |
cabal test --enable-tests
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.1.3"]
ghc: ["8.8.3"]
steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/setup-haskell@v1.1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}
- uses: actions/cache@v1
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: |
stack test --system-ghc

View File

@ -1,46 +0,0 @@
sudo: true
language: haskell
git:
depth: 5
cabal: "3.0"
cache:
directories:
- "$HOME/.cabal/store"
- "$HOME/.stack"
- "$TRAVIS_BUILD_DIR/.stack-work"
matrix:
include:
- ghc: 8.2.2
- ghc: 8.4.4
- ghc: 8.6.5
- ghc: 8.8.1
- ghc: 8.8.1
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
install:
- |
if [ -z "$STACK_YAML" ]; then
cabal build --enable-tests --enable-benchmarks --write-ghc-environment-files=always
else
curl -sSL https://get.haskellstack.org/ | sh
stack --version
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --no-terminal
fi
script:
# HLint check
- curl -sSL https://raw.github.com/ndmitchell/neil/master/misc/travis.sh | sh -s -- hlint .
- |
if [ -z "$STACK_YAML" ]; then
cabal test --enable-tests
else
stack test --system-ghc
fi
notifications:
email: false

View File

@ -3,6 +3,11 @@
`shellmet` uses [PVP Versioning][1].
The changelog is available [on GitHub][2].
## 0.0.3.1 — May 7, 2020
* [#18](https://github.com/kowainik/shellmet/issues/18):
Support GHC-8.10. Move from GHC-8.8.1 support to GHC-8.8.3.
## 0.0.3.0 — Sep 28, 2019
* [#10](https://github.com/kowainik/shellmet/issues/10):

View File

@ -1,53 +0,0 @@
# Contributing to the Kowainik repositories
## :wave: Greetings Traveler!
We are delighted you're reading this, and we appreciate the effort you're
taking to make our projects awesome! :sparkles:
## How to contribute
### :bug: Report bugs or feature request :bulb:
If you discover a bug or have any proposals on how to make this project better
don't hesitate to create an issue [here](../../issues/new) in a free format.
### Create a PR
We love to receive pull requests from everyone! It's usually a good idea
to tell about your intention to work on something under the corresponding
issue, so everyone is aware that you're on it. If there's no such issue — simply
create a new one!
To get started with the Pull Request implementation you should first
[fork](../../fork), then clone the repo:
git clone git@github.com:your-username/project-name.git
Make your changes and consider the following checklist to go through
before submitting your pull request.
### :white_check_mark: Check list
- [ ] New/fixed features work as expected (Bonus points for the new tests).
- [ ] There are no warnings during compilation.
- [ ] `hlint .` output is: _No Hints_ (see [`hlint`][hlint] tool docs).
- [ ] The code is formatted with the [`stylish-haskell`][stylish-tool] tool
using [stylish-haskell.yaml][stylish] file in the repository.
- [ ] The code style of the files you changed is preserved (for more specific
details on our style guide check [this document][style-guide]).
- [ ] Commit messages are in the proper format.
Start the first line of the commit with the issue number in square parentheses.
**_Example:_** `[#42] Upgrade upper bounds of 'base'`
After all above is done commit and push to your fork.
Now you are ready to [submit a pull request](../../compare).
----------
Thanks for spending your time on reading this contributing guide! :sparkling_heart:
[stylish]: .stylish-haskell.yaml
[stylish-tool]: http://hackage.haskell.org/package/stylish-haskell
[hlint]: http://hackage.haskell.org/package/hlint
[style-guide]: https://github.com/kowainik/org/blob/master/style-guide.md#haskell-style-guide

View File

@ -1,7 +1,6 @@
# shellmet
[![GitHub CI](https://github.com/kowainik/shellmet/workflows/CI/badge.svg)](https://github.com/kowainik/shellmet/actions)
[![Build status](https://img.shields.io/travis/kowainik/shellmet.svg?logo=travis)](https://travis-ci.org/kowainik/shellmet)
[![Hackage](https://img.shields.io/hackage/v/shellmet.svg?logo=haskell)](https://hackage.haskell.org/package/shellmet)
[![Stackage Lts](http://stackage.org/package/shellmet/badge/lts)](http://stackage.org/lts/package/shellmet)
[![Stackage Nightly](http://stackage.org/package/shellmet/badge/nightly)](http://stackage.org/nightly/package/shellmet)

View File

@ -1,6 +1,6 @@
cabal-version: 2.4
name: shellmet
version: 0.0.3.0
version: 0.0.3.1
synopsis: Out of the shell solution for scripting in Haskell
description: Shellmet provides easy and convenient way to call shell commands from Haskell programs
homepage: https://github.com/kowainik/shellmet
@ -9,7 +9,7 @@ license: MPL-2.0
license-file: LICENSE
author: Dmitrii Kovanikov
maintainer: Kowainik <xrom.xkov@gmail.com>
copyright: 2019 Kowainik
copyright: 2019-2020 Kowainik
category: Shell, Command Line
build-type: Simple
extra-doc-files: README.md
@ -17,22 +17,31 @@ extra-doc-files: README.md
tested-with: GHC == 8.2.2
GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.1
GHC == 8.8.3
GHC == 8.10.1
source-repository head
type: git
location: https://github.com/kowainik/shellmet.git
common common-options
build-depends: base >= 4.10.1.0 && < 4.14
build-depends: base >= 4.10.1.0 && < 4.15
ghc-options: -Wall
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wcompat
-Widentities
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wredundant-constraints
-fhide-source-paths
if impl(ghc >= 8.4)
ghc-options: -Wmissing-export-lists
-Wpartial-fields
if impl(ghc >= 8.8)
ghc-options: -Wmissing-deriving-strategies
-Werror=missing-deriving-strategies
if impl(ghc >= 8.10)
ghc-options: -Wunused-packages
default-language: Haskell2010
default-extensions: ConstraintKinds
@ -58,25 +67,17 @@ library
, text ^>= 1.2.3
executable readme
import: common-options
if os(windows)
buildable: False
main-is: README.lhs
build-depends: base
, shellmet
build-depends: shellmet
, text
build-tool-depends: markdown-unlit:markdown-unlit
ghc-options: -Wall -pgmL markdown-unlit
ghc-options: -pgmL markdown-unlit
default-language: Haskell2010
test-suite shellmet-test
import: common-options
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: shellmet
ghc-options: -threaded -rtsopts -with-rtsopts=-N
test-suite shellmet-doctest
import: common-options
type: exitcode-stdio-1.0

View File

@ -3,7 +3,12 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{- | This module contains neat utilities to be able to work with
{- |
Copyright: (c) 2019-2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <xrom.xkov@gmail.com>
This module contains neat utilities to be able to work with
shell commands in generic and simple way using just string literals.
>>> "echo" ["Hello", "World!"]
@ -12,10 +17,10 @@ Hello World!
-}
module Shellmet
( ($|)
, ($^)
, ($?)
) where
( ($|)
, ($^)
, ($?)
) where
import Control.Exception (catch)
import Data.String (IsString (..))
@ -31,7 +36,6 @@ simple string literals in 'IO' monad.
>>> "ls" ["-1", "test"]
ls -1 test
Doctest.hs
Spec.hs
-}
instance (a ~ [Text], b ~ IO ()) => IsString (a -> b) where
fromString :: String -> [Text] -> IO ()

View File

@ -1 +1 @@
resolver: nightly-2019-09-28
resolver: lts-15.11

View File

@ -1,4 +0,0 @@
module Main (main) where
main :: IO ()
main = putStrLn ("Test suite not yet implemented" :: String)