Skip to content

Commit

Permalink
Fix #4 Move to crypton
Browse files Browse the repository at this point in the history
Also moves CI from Azure to GitHub Actions and updates GHC versions.
  • Loading branch information
mpilgrem committed Aug 6, 2023
1 parent c3b7eb3 commit c4d5efa
Show file tree
Hide file tree
Showing 19 changed files with 195 additions and 313 deletions.
110 changes: 0 additions & 110 deletions .azure/azure-linux-template.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .azure/azure-osx-template.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .azure/azure-pipelines.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .azure/azure-windows-template.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Unit tests

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

# As of 6 August 2023, ubuntu-latest, windows-latest and macos-latest come
# with Stack 2.11.1 and GHC 9.6.2.

jobs:
unit-tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
resolver:
- stack-ghc-9.2.8.yaml
- stack-ghc-9.4.5.yaml
- stack-ghc-9.6.2.yaml
include:
- os: windows-latest
resolver: stack-ghc-9.6.2.yaml
- os: macos-latest
resolver: stack-ghc-9.6.2.yaml
steps:
- name: Clone project
uses: actions/checkout@v3
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}
- name: Cache dependencies on Windows
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v3
with:
path: |
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ matrix.resolver }}
- name: Run tests
shell: bash
run: |
set -ex
stack --resolver ${{ matrix.resolver }} test --bench --no-run-benchmarks --haddock --no-haddock-deps
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.stack-work/
http-download.cabal
*.swp
*~

# Haskell Tool Stack-related
/.stack-work/
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# http-download changelog

## 0.2.1.0

* Depend on `crypton` instead of `cryptonite`. No changes to API.

## 0.2.0.0

* Add new field `drForceDownload` to `DownloadRequest` to allow force download even if the file exists
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2019, Stack contributors
Copyright (c) 2015-2023, Stack contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
75 changes: 75 additions & 0 deletions http-download.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.2.
--
-- see: https://github.com/sol/hpack

name: http-download
version: 0.2.1.0
synopsis: Verified downloads with retries
description: Higher level HTTP download APIs include verification of content and retries
category: Development
homepage: https://github.com/commercialhaskell/http-download#readme
bug-reports: https://github.com/commercialhaskell/http-download/issues
author: Michael Snoyman
maintainer: [email protected]
copyright: 2018-2023 FP Complete
license: BSD3
license-file: LICENSE
build-type: Simple

source-repository head
type: git
location: https://github.com/commercialhaskell/http-download

library
exposed-modules:
Network.HTTP.Download
Network.HTTP.Download.Verified
other-modules:
Paths_http_download
hs-source-dirs:
src/
build-depends:
base >=4.10 && <5
, base64-bytestring
, bytestring
, conduit
, conduit-extra
, crypton
, crypton-conduit
, directory
, exceptions
, filepath
, http-client
, http-conduit
, http-types
, memory
, path
, path-io
, retry
, rio
, rio-prettyprint
default-language: Haskell2010

test-suite spec
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Network.HTTP.Download.VerifiedSpec
Paths_http_download
hs-source-dirs:
test
build-depends:
base >=4.10 && <5
, crypton
, hspec
, hspec-discover
, http-client
, http-download
, path
, path-io
, retry
, rio
, rio-prettyprint
default-language: Haskell2010
8 changes: 4 additions & 4 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: http-download
version: 0.2.0.0
version: 0.2.1.0
synopsis: Verified downloads with retries
category: Development
author: Michael Snoyman
maintainer: [email protected]
copyright: 2018-2019 FP Complete
copyright: 2018-2023 FP Complete
license: BSD3
github: commercialhaskell/http-download
description: Higher level HTTP download APIs include verification of content and retries

dependencies:
- base >=4.10 && < 5
- cryptonite
- crypton
- http-client
- path
- path-io
Expand All @@ -26,7 +26,7 @@ library:
- bytestring
- conduit
- conduit-extra
- cryptonite-conduit
- crypton-conduit
- directory
- exceptions
- filepath
Expand Down
17 changes: 17 additions & 0 deletions stack-ghc-9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Snapshot specification for GHC 9.2.8.
resolver: lts-20.26 # GHC 9.2.8

packages:
- crypton-0.33
- crypton-conduit-0.2.3
- crypton-connection-0.3.1
- crypton-x509-1.7.6
- crypton-x509-store-1.6.9
- crypton-x509-system-1.6.7
- crypton-x509-validation-1.6.12
- http-client-tls-0.3.6.2
- tls-1.7.1

flags:
ansi-terminal:
win32-2-13-1: false
Loading

0 comments on commit c4d5efa

Please sign in to comment.