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

[#28] Support GHC 9.2 #30

Merged
merged 6 commits into from Jun 14, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

135 changes: 69 additions & 66 deletions .github/workflows/ci.yml
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]
schedule:
# additionally run once per week (At 00:00 on Sunday) to maintain cache
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"

jobs:
cabal:
Expand All @@ -16,17 +16,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
cabal: ["3.4"]
cabal: ["3.6.2.0"]
ghc:
- "8.2.2"
- "8.4.4"
- "8.6.5"
- "8.8.4"
- "8.10.4"
- "9.0.1"
- 8.2.2
- 8.4.4
- 8.6.5
- 8.8.4
- 8.10.7
- 9.0.2
- 9.2.3
exclude:
- os: macOS-latest
ghc: 9.0.1
ghc: 9.0.2
- os: macOS-latest
ghc: 8.10.7
- os: macOS-latest
ghc: 8.8.4
- os: macOS-latest
Expand All @@ -37,76 +40,76 @@ jobs:
ghc: 8.2.2

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Configure
run: |
cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always
- name: Configure
run: |
cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always

- name: Freeze
run: |
cabal freeze
- name: Freeze
run: |
cabal freeze

- uses: actions/cache@v2.1.3
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
- uses: actions/cache@v2.1.3
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}

- name: Install dependencies
run: |
cabal build all --only-dependencies
- name: Install dependencies
run: |
cabal build all --only-dependencies

- name: Build
run: |
cabal build all
- name: Build
run: |
cabal build all

- name: Test
run: |
cabal test all
- name: Test
run: |
cabal test all

- name: Documentation
run: |
cabal haddock
- name: Documentation
run: |
cabal haddock

stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.5"]
ghc: ["8.10.4"]
stack: ["2.7.5"]
ghc: ["9.2.3"]

steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
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: Install dependencies
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies

- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks

- name: Test
run: |
stack test --system-ghc
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack

- name: Install dependencies
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies

- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks

- name: Test
run: |
stack test --system-ghc
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,11 @@
`shellmet` uses [PVP Versioning][1].
The changelog is available [on GitHub][2].

## 0.0.4.1 — Jun 13, 2022

* [#28](https://github.com/kowainik/shellmet/issues/28):
Support GHC 9.2.

## 0.0.4.0 — Mar 23, 2021

* [#20](https://github.com/kowainik/shellmet/issues/20):
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -26,6 +26,8 @@ necessary pragmas and imports.
```haskell
{-# LANGUAGE OverloadedStrings #-}

import Data.Semigroup ((<>))

import Shellmet (($|))

import qualified Data.Text as T
Expand Down
18 changes: 12 additions & 6 deletions shellmet.cabal
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: shellmet
version: 0.0.4.0
version: 0.0.4.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
Expand All @@ -9,7 +9,7 @@ license: MPL-2.0
license-file: LICENSE
author: Dmitrii Kovanikov
maintainer: Kowainik <xrom.xkov@gmail.com>
copyright: 2019-2021 Kowainik
copyright: 2019-2022 Kowainik
category: Shell, Command Line
build-type: Simple
extra-doc-files: README.md
Expand All @@ -18,15 +18,16 @@ tested-with: GHC == 8.2.2
GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.4
GHC == 8.10.4
GHC == 9.0.1
GHC == 8.10.7
GHC == 9.0.2
GHC == 9.2.3

source-repository head
type: git
location: https://github.com/kowainik/shellmet.git

common common-options
build-depends: base >= 4.10.1.0 && < 4.16
build-depends: base >= 4.10.1.0 && < 4.17

ghc-options: -Wall
-Wcompat
Expand All @@ -43,6 +44,11 @@ common common-options
-Werror=missing-deriving-strategies
if impl(ghc >= 8.10)
ghc-options: -Wunused-packages
if impl(ghc >= 9.0)
ghc-options: -Winvalid-haddock
if impl(ghc >= 9.2)
ghc-options: -Wredundant-bang-patterns
-Woperator-whitespace

default-language: Haskell2010
default-extensions: ConstraintKinds
Expand All @@ -65,7 +71,7 @@ library
exposed-modules: Shellmet

build-depends: process ^>= 1.6.1
, text ^>= 1.2.3
, text >= 1.2.3 && < 2.1

executable readme
import: common-options
Expand Down
7 changes: 4 additions & 3 deletions src/Shellmet.hs
Expand Up @@ -5,7 +5,7 @@

{- |
Module : Shellmet
Copyright : (c) 2019-2021 Kowainik
Copyright : (c) 2019-2022 Kowainik
SPDX-License-Identifier : MPL-2.0
Maintainer : Kowainik <xrom.xkov@gmail.com>
Stability : Stable
Expand Down Expand Up @@ -73,8 +73,9 @@ cmd $^ args = callProcess cmd (map T.unpack args)

{- | Do some IO actions when process failed with 'IOError'.

>>> "exit" ["0"] $? putStrLn "Command failed"
⚙ exit 0
>>> "echo" ["0"] $? putStrLn "Command failed"
⚙ echo 0
0

>>> "exit" ["1"] $? putStrLn "Command failed"
⚙ exit 1
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
@@ -1 +1 @@
resolver: lts-17.7
resolver: nightly-2022-06-12