Skip to content
This repository has been archived by the owner on Aug 28, 2022. It is now read-only.

Update everything for 2022 #2

Merged
merged 1 commit into from
Jan 8, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image": "ghcr.io/tfausak/haskell-codespace:ghc-9.2",
"postCreateCommand": "cabal update"
}
10 changes: 10 additions & 0 deletions .github/workflows/brittany.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Brittany
on: push
jobs:
brittany:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: tfausak/brittany-action@v1
with:
config: config/brittany.yaml
77 changes: 58 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,76 @@ on:
types:
- created
jobs:
build:
ci:
strategy:
matrix:
include:
- { os: ubuntu-18.04, ghc: 9.0.1, cabal: 3.4.0.0 }
- { os: ubuntu-18.04, ghc: 8.10.3, cabal: 3.2.0.0 }
- { os: macos-10.15, ghc: 8.10.3, cabal: 3.2.0.0 }
- { os: windows-2019, ghc: 8.10.3, cabal: 3.2.0.0 }
- { os: ubuntu-18.04, ghc: 8.8.4, cabal: 3.0.0.0 }
runs-on: ${{ matrix.os }}
- { platform: ubuntu, ghc: 9.2.1 }
- { platform: macos, ghc: 9.2.1 }
- { platform: windows, ghc: 9.2.1, extension: .exe }
- { platform: ubuntu, ghc: 9.0.2 }
- { platform: ubuntu, ghc: 8.10.7 }
runs-on: ${{ matrix.platform }}-latest
name: GHC ${{ matrix.ghc }} on ${{ matrix.platform }}
steps:

- uses: actions/checkout@v2

- id: artifact
run: |
mkdir artifact
mkdir artifact/${{ matrix.platform }}
mkdir artifact/${{ matrix.platform }}/${{ matrix.ghc }}
echo '::set-output name=directory::artifact/${{ matrix.platform }}/${{ matrix.ghc }}'

- id: setup-haskell
uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal freeze && cat cabal.project.freeze

- run: cabal configure --enable-tests --flags pedantic --jobs

- run: cabal freeze

- run: cat cabal.project.freeze

- uses: actions/cache@v2
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-
${{ matrix.os }}-${{ matrix.ghc }}-
key: ${{ matrix.platform }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: ${{ matrix.platform }}-${{ matrix.ghc }}-

- run: cabal build

- run: cabal test --test-show-details direct
- run: cabal sdist

- run: cabal check

- run: cabal sdist --output-dir ${{ steps.artifact.outputs.directory }}

- uses: actions/upload-artifact@v2
with:
path: dist-newstyle/sdist/caerbannog-*.tar.gz
name: caerbannog-${{ github.sha }}.tar.gz
- run: cabal check
- if: github.event_name == 'release' && matrix.os == 'ubuntu-18.04' && matrix.ghc == '9.0.1'
run: cabal upload --publish --username '${{ secrets.HACKAGE_USERNAME }}' --password '${{ secrets.HACKAGE_PASSWORD }}' dist-newstyle/sdist/caerbannog-*.tar.gz
path: artifact
name: caerbannog-${{ github.sha }}

release:
needs: ci
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:

- uses: actions/download-artifact@v2
with:
name: caerbannog-${{ github.sha }}
path: artifact

- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_content_type: application/gzip
asset_name: caerbannog-${{ github.event.release.tag_name }}.tar.gz
asset_path: artifact/ubuntu/9.2.1/caerbannog-${{ github.event.release.tag_name }}.tar.gz
upload_url: ${{ github.event.release.upload_url }}

- run: cabal upload --publish --username '${{ secrets.HACKAGE_USERNAME }}' --password '${{ secrets.HACKAGE_PASSWORD }}' artifact/ubuntu/9.2.1/caerbannog-${{ github.event.release.tag_name }}.tar.gz
10 changes: 10 additions & 0 deletions .github/workflows/hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: HLint
on: push
jobs:
hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: tfausak/hlint-action@v1
with:
config: config/hlint.yaml
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/.stack-work
/.stack-work/
/cabal.project.freeze
/cabal.project.local*
/dist-newstyle/
/stack.yaml.lock
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"taylorfausak.purple-yolk"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"purple-yolk.brittany.command": "brittany --config-file config/brittany.yaml --write-mode inplace",
"purple-yolk.ghci.command": "cabal repl --repl-options -ddump-json",
"purple-yolk.hlint.command": "hlint --hint config/hlint.yaml --json --no-exit-code",
"purple-yolk.hlint.onSave": true
}
31 changes: 2 additions & 29 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
# Change log

## 0.6.0.3

- Released on 2020-08-04.
- Improved package documentation.

## 0.6.0.2

- Released on 2020-08-03.
- First `caerbannog` release on Hackage.

## 0.5

- Released on 2015-01-09.

## 0.4

- Released on 2015-01-09.

## 0.3

- Released on 2013-03-14.

## 0.2

- Released on 2012-10-28.

## 0.1

- Initially released on 2011-10-22.
Caerbannog follows the [Package Versioning Policy](https://pvp.haskell.org).
You can find release notes [on GitHub](https://github.com/tfausak/caerbannog/releases).
2 changes: 1 addition & 1 deletion LICENSE.txt → LICENSE.markdown
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) Lennart Kolmodin
Copyright (c) Lennart Kolmodin, Taylor Fausak

All rights reserved.

Expand Down
53 changes: 35 additions & 18 deletions caerbannog.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cabal-version: >= 1.10
cabal-version: 2.2

name: caerbannog
version: 0.6.1.0

synopsis: That rabbit's got a vicious streak a mile wide!
description:
Caerbannog is a drop in replacement for the @binary-bits@ package. Unlike
Expand All @@ -22,41 +23,57 @@ description:
author: Lennart Kolmodin
build-type: Simple
category: Data, Parsing
extra-source-files:
CHANGELOG.markdown
README.markdown
license-file: LICENSE.txt
license: BSD3
extra-source-files: CHANGELOG.markdown README.markdown
license-file: LICENSE.markdown
license: BSD-3-Clause
maintainer: Taylor Fausak

source-repository head
location: https://github.com/tfausak/caerbannog
type: git

library
flag pedantic
default: False
description: Enables @-Werror@, which turns warnings into errors.
manual: True

common library
build-depends:
base >= 4.13.0 && < 4.16
, base >= 4.13.0 && < 4.17
, binary >= 0.8.7 && < 0.9
, bytestring >= 0.10.10 && < 0.11
, bytestring >= 0.10.10 && < 0.12
default-language: Haskell98
ghc-options:
-Wall

if flag(pedantic)
ghc-options: -Werror

common executable
import: library

build-depends: caerbannog
ghc-options:
-rtsopts
-threaded
-Wno-unused-packages

library
import: library

exposed-modules:
Data.Binary.Bits
Data.Binary.Bits.Get
Data.Binary.Bits.Put
ghc-options:
-Wall
hs-source-dirs: src/lib
hs-source-dirs: source/library

test-suite test
import: executable

build-depends:
base
, binary
, caerbannog
, bytestring
, hspec >= 2.7.6 && < 2.9
, QuickCheck >= 2.13.2 && < 2.15
, random >= 1.1 && < 1.3
default-language: Haskell98
hs-source-dirs: src/test
hs-source-dirs: source/test-suite
main-is: Main.hs
type: exitcode-stdio-1.0
4 changes: 4 additions & 0 deletions config/brittany.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
conf_layout:
lconfig_cols: 79
lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }
lconfig_indentPolicy: IndentPolicyLeft
5 changes: 5 additions & 0 deletions config/hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- group: { name: dollar, enabled: true }
- group: { name: generalise, enabled: true }
- ignore: { name: Use lambda-case }
- ignore: { name: Use list comprehension }
- ignore: { name: Use tuple-section }
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
-- style, or more efficiently, using the 'Applicative' style. Writing is
-- monadic style only. See "Data.Binary.Bits.Get" and "Data.Binary.Bits.Put",
-- respectively.
module Data.Binary.Bits ( BinaryBit(putBits, getBits) ) where
module Data.Binary.Bits
( BinaryBit(getBits, putBits)
) where

import qualified Data.Binary.Bits.Get as Get
import qualified Data.Binary.Bits.Put as Put
Expand Down
Loading