-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
93 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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/[email protected] | ||
name: Cache ~/.cabal/store | ||
with: | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | ||
- uses: actions/[email protected] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
@@ -9,7 +9,7 @@ license: MPL-2.0 | |
license-file: LICENSE | ||
author: Dmitrii Kovanikov | ||
maintainer: Kowainik <[email protected]> | ||
copyright: 2019-2021 Kowainik | ||
copyright: 2019-2022 Kowainik | ||
category: Shell, Command Line | ||
build-type: Simple | ||
extra-doc-files: README.md | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
{- | | ||
Module : Shellmet | ||
Copyright : (c) 2019-2021 Kowainik | ||
Copyright : (c) 2019-2022 Kowainik | ||
SPDX-License-Identifier : MPL-2.0 | ||
Maintainer : Kowainik <[email protected]> | ||
Stability : Stable | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
resolver: lts-17.7 | ||
resolver: nightly-2022-06-12 |