From f3831180930c01ac06b2deb0345f181ccbb783af Mon Sep 17 00:00:00 2001 From: eldr <83576392+sigrdrifa@users.noreply.github.com> Date: Sat, 30 Sep 2023 16:00:38 +0100 Subject: [PATCH 1/6] Remove upper bounds --- OTP.cabal | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OTP.cabal b/OTP.cabal index b53b945..c4d4a8b 100644 --- a/OTP.cabal +++ b/OTP.cabal @@ -26,7 +26,7 @@ homepage: https://github.com/hvr/OTP bug-reports: https://github.com/hvr/OTP/issues category: Cryptography build-type: Simple -tested-with: GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 +tested-with: GHC=9.6.2, GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 extra-source-files: CHANGELOG.md @@ -50,17 +50,17 @@ library other-extensions: CPP if flag(pure-sha) - build-depends: SHA >= 1.6.4.4 && < 1.7 - , bytestring >= 0.10.0.0 && < 0.11 - , base >= 4.3.0.0 && < 4.12 - , time >= 1.2 && < 1.9 + build-depends: SHA >= 1.6.4.4 + , bytestring >= 0.10.0.0 + , base >= 4.3.0.0 + , time >= 1.2 else - build-depends: cryptohash-sha1 >= 0.11.100.1 && < 0.12 - , cryptohash-sha256 >= 0.11.100.1 && < 0.12 - , cryptohash-sha512 >= 0.11.100.1 && < 0.12 - , bytestring >= 0.9.2.0 && < 0.11 - , base >= 4.5.0.0 && < 4.12 - , time >= 1.4 && < 1.9 + build-depends: cryptohash-sha1 >= 0.11.100.1 + , cryptohash-sha256 >= 0.11.100.1 + , cryptohash-sha512 >= 0.11.100.1 + , bytestring >= 0.9.2.0 + , base >= 4.5.0.0 && <5 + , time >= 1.4 ghc-options: -Wall @@ -79,7 +79,7 @@ test-suite tests , OTP , time -- dependency constraints not inherited via 'OTP' component - , tasty >= 1.1 && < 1.3 + , tasty >= 1.1 , tasty-hunit == 0.10.* ghc-options: -Wall From 5802cdef5f7feba91c1de8e5647dd2c0e920bfcd Mon Sep 17 00:00:00 2001 From: eldr <83576392+sigrdrifa@users.noreply.github.com> Date: Sat, 30 Sep 2023 16:03:51 +0100 Subject: [PATCH 2/6] Update OTP.cabal --- OTP.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OTP.cabal b/OTP.cabal index c4d4a8b..4aa4c22 100644 --- a/OTP.cabal +++ b/OTP.cabal @@ -26,7 +26,7 @@ homepage: https://github.com/hvr/OTP bug-reports: https://github.com/hvr/OTP/issues category: Cryptography build-type: Simple -tested-with: GHC=9.6.2, GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 +tested-with: GHC==9.6.2, GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 extra-source-files: CHANGELOG.md From 9a0fec12f9062739c90fc9215edc6c730e1164cb Mon Sep 17 00:00:00 2001 From: eldr <83576392+sigrdrifa@users.noreply.github.com> Date: Sat, 30 Sep 2023 16:05:34 +0100 Subject: [PATCH 3/6] Create haskell.yml --- .github/workflows/haskell.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/haskell.yml diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml new file mode 100644 index 0000000..cedfeba --- /dev/null +++ b/.github/workflows/haskell.yml @@ -0,0 +1,43 @@ +name: Haskell CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-haskell@v1 + with: + ghc-version: '9.6.2' + cabal-version: '3.2' + + - name: Cache + uses: actions/cache@v3 + env: + cache-name: cache-cabal + with: + path: ~/.cabal + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + run: | + cabal update + cabal build --only-dependencies --enable-tests --enable-benchmarks + - name: Build + run: cabal build --enable-tests --enable-benchmarks all + - name: Run tests + run: cabal test all From af93b0636faa5430282a62d36b4130d42e1e5c3f Mon Sep 17 00:00:00 2001 From: sigrdrifa Date: Sat, 30 Sep 2023 16:07:59 +0100 Subject: [PATCH 4/6] update to GHC2021 and GHC 9.6.2 --- OTP.cabal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OTP.cabal b/OTP.cabal index c4d4a8b..f96b66d 100644 --- a/OTP.cabal +++ b/OTP.cabal @@ -26,7 +26,7 @@ homepage: https://github.com/hvr/OTP bug-reports: https://github.com/hvr/OTP/issues category: Cryptography build-type: Simple -tested-with: GHC=9.6.2, GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 +tested-with: GHC==9.6.2, GHC==8.4.3, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 extra-source-files: CHANGELOG.md @@ -46,7 +46,7 @@ library exposed-modules: Data.OTP other-modules: HashImpl - default-language: Haskell2010 + default-language: GHC2021 other-extensions: CPP if flag(pure-sha) @@ -71,7 +71,7 @@ test-suite tests hs-source-dirs: test main-is: Test.hs - default-language: Haskell2010 + default-language: GHC2021 other-extensions: OverloadedStrings build-depends: base From 87bbd4f48633718213acc21c6d7d94578ded1667 Mon Sep 17 00:00:00 2001 From: eldr <83576392+sigrdrifa@users.noreply.github.com> Date: Sat, 30 Sep 2023 16:10:18 +0100 Subject: [PATCH 5/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7cac4b1..44d966b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# `OTP`: HMAC-Based and Time-Based One-Time Passwords (HOTP & TOTP) [![Hackage](https://img.shields.io/hackage/v/OTP.svg)](https://hackage.haskell.org/package/OTP) [![Build Status](https://travis-ci.org/haskell-hvr/OTP.svg)](https://travis-ci.org/haskell-hvr/OTP) +# `OTP`: HMAC-Based and Time-Based One-Time Passwords (HOTP & TOTP) [![Hackage](https://img.shields.io/hackage/v/OTP.svg)](https://hackage.haskell.org/package/OTP) [![Haskell CI](https://github.com/sigrdrifa/OTP/actions/workflows/haskell.yml/badge.svg)](https://github.com/sigrdrifa/OTP/actions/workflows/haskell.yml) **Please refer to the [package description](https://hackage.haskell.org/package/OTP#description) for an overview of `OTP`.** From 25b4d49b0cfb98c6722ac94fa45e301db266de1d Mon Sep 17 00:00:00 2001 From: eldr <83576392+sigrdrifa@users.noreply.github.com> Date: Sat, 30 Sep 2023 16:19:32 +0100 Subject: [PATCH 6/6] Update Haskell CI build badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 44d966b..b3e3930 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# `OTP`: HMAC-Based and Time-Based One-Time Passwords (HOTP & TOTP) [![Hackage](https://img.shields.io/hackage/v/OTP.svg)](https://hackage.haskell.org/package/OTP) [![Haskell CI](https://github.com/sigrdrifa/OTP/actions/workflows/haskell.yml/badge.svg)](https://github.com/sigrdrifa/OTP/actions/workflows/haskell.yml) +# `OTP`: HMAC-Based and Time-Based One-Time Passwords (HOTP & TOTP) [![Hackage](https://img.shields.io/hackage/v/OTP.svg)](https://hackage.haskell.org/package/OTP) [![Haskell CI](https://github.com/haskell-hvr/OTP/actions/workflows/haskell.yml/badge.svg)](https://github.com/haskell-hvr/OTP/actions/workflows/haskell.yml) **Please refer to the [package description](https://hackage.haskell.org/package/OTP#description) for an overview of `OTP`.**