Skip to content
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
126 changes: 126 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Build and Test

on:
push:
# Fork pull requests produce no push event in this repository, so without this
# trigger they get no checks at all. Same-repo pull requests are filtered out
# per job below, because their push event already covers them.
pull_request:

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
find-stack-yamls:
name: Find stack.yamls for GHC Matrix
if: >-
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-24.04
outputs:
stack-yamls: ${{ steps.set-output.outputs.stack-yamls }}
steps:
- name: Find Stack Yamls
id: set-output
uses: flipstone/github-actions/find-stack-ghc-yamls@2c1f2781f8a1b92a0ad82223adf77bbf24b262c2

build:
name: Build and Test
if: >-
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.repository
needs: find-stack-yamls
runs-on: ubuntu-24.04
strategy:
max-parallel: 5
matrix:
stack-yaml: ${{ fromJson(needs.find-stack-yamls.outputs.stack-yamls) }}

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Cache
uses: actions/cache@v5
env:
cache-version: v1
with:
key: ${{ env.cache-version }}-${{ matrix.stack-yaml }}-${{ hashFiles(matrix.stack-yaml, 'stack-base.yaml', '*/package.yaml') }}
restore-keys: |
${{ env.cache-version }}-${{ matrix.stack-yaml }}-
path: |
./stack-root

- name: Setup Stack
uses: flipstone/github-actions/setup-dockerized-stack@2c1f2781f8a1b92a0ad82223adf77bbf24b262c2
with:
stack-root: ./stack-root

- name: Build and test
run: ./scripts/test --stack-yaml ${{ matrix.stack-yaml }}

cabal-check:
name: Cabal Check
if: >-
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Stack (for docker env)
uses: flipstone/github-actions/setup-dockerized-stack@2c1f2781f8a1b92a0ad82223adf77bbf24b262c2
with:
stack-root: ./stack-root

# Only the two published packages are checked. The example package is not
# released to Hackage.
- name: Check for Hackage releasable issues
run: docker compose run --rm dev sh -c 'set -o errexit; cd ftp-client; cabal check; cd ../ftp-client-conduit; cabal check'

shellcheck:
name: shellcheck
if: >-
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Stack (for docker env)
uses: flipstone/github-actions/setup-dockerized-stack@2c1f2781f8a1b92a0ad82223adf77bbf24b262c2
with:
stack-root: ./stack-root

- name: Shellcheck
run: scripts/shellcheck

cabal-latest-build:
name: Cabal Build
if: >-
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Stack (for docker env)
uses: flipstone/github-actions/setup-dockerized-stack@2c1f2781f8a1b92a0ad82223adf77bbf24b262c2
with:
stack-root: ./stack-root

- name: Build with cabal and latest ghc+deps
# When a new ghc version is released, we might not be able to build all the dependencies for
# a little while. So we need to allow failure here. It is a very unfortunate situation that
# github does not give us a better UX for this as the closest thing to a required check is
# not configured here, but seemingly only through the api/webui for "branch protection"
continue-on-error: true
run: scripts/cabal-latest
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.stack-work
.stack-work/
dist-newstyle/
.env
test-all-logs/
*.prof
stack.yaml.lock
*~
18 changes: 18 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
dev:
image: ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-6a98b0f
volumes:
- .:${PROJECT_DIR}
- flipstone_stack_root:/stack-root
working_dir: ${PROJECT_DIR}
tty: true
environment:
STACK_ROOT: /stack-root
IN_DEV_CONTAINER: 'true'
# Pass through the CI variable from GitHub (or set it to `true` locally
# for debugging CI builds)
CI:

volumes:
flipstone_stack_root:
external: true
77 changes: 44 additions & 33 deletions example/example.cabal
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
name: example
version: 0.1.0.0
-- synopsis:
-- description:
homepage: https://github.com/githubuser/example#readme
license: BSD3
license-file: LICENSE
author: Author name here
maintainer: example@example.com
copyright: 2017 Author name here
category: Web
build-type: Simple
cabal-version: >=1.10
cabal-version: 1.12

executable example-exe
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, ftp-client
, ftp-client-conduit
, conduit
, bytestring
, containers
default-language: Haskell2010
-- This file has been generated from package.yaml by hpack version 0.39.1.
--
-- see: https://github.com/sol/hpack

test-suite example-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
name: example
version: 0.1.0.0
category: Web
homepage: https://github.com/flipstone/ftp-client
author: Author name here
maintainer: example@example.com
copyright: 2017 Author name here
license: BSD3
license-file: LICENSE
build-type: Simple

source-repository head
type: git
location: https://github.com/githubuser/example
type: git
location: https://github.com/flipstone/ftp-client

executable example-exe
main-is: Main.hs
other-modules:
Paths_example
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base
, bytestring
, conduit
, containers
, ftp-client
, ftp-client-conduit
default-language: Haskell2010

test-suite example-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_example
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base
default-language: Haskell2010
40 changes: 40 additions & 0 deletions example/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: example
version: 0.1.0.0
homepage: https://github.com/flipstone/ftp-client
license: BSD3
license-file: LICENSE
author: Author name here
maintainer: example@example.com
copyright: 2017 Author name here
category: Web

git: https://github.com/flipstone/ftp-client

executables:
example-exe:
main: Main.hs
source-dirs: app
language: Haskell2010
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- base
- ftp-client
- ftp-client-conduit
- conduit
- bytestring
- containers

tests:
example-test:
main: Spec.hs
source-dirs: test
language: Haskell2010
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- base
20 changes: 20 additions & 0 deletions ftp-client-conduit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog for ftp-client-conduit

## 0.5.0.6

* Correct the `resourcet` bound. `>= 1.2 && < 1.3` excluded `resourcet-1.3.0`,
which is what current Stackage snapshots carry, so the package could not build
against them at all. Only the `MonadResource` class is used from resourcet and
it is unchanged across that boundary, so the bound is now `< 1.4`.

* Relax the `crypton-connection` bound from `>= 0.4` to `>= 0.3`, matching
`ftp-client`. Only `connectionClose` is used from that package, and 0.3 has it.

* Correct the `base` bound. The package claimed `>= 4.7`, i.e. support back to
GHC 7.8, which has never been buildable. It is now `>= 4.16`, the oldest GHC
that is actually tested, and `tested-with` records the full set.

## Earlier releases

Prior to 0.5.0.6 this package had no changelog. See the git history at
<https://github.com/flipstone/ftp-client> for changes in earlier versions.
93 changes: 59 additions & 34 deletions ftp-client-conduit/ftp-client-conduit.cabal
Original file line number Diff line number Diff line change
@@ -1,39 +1,64 @@
name: ftp-client-conduit
version: 0.5.0.5
synopsis: Transfer file with FTP and FTPS with Conduit
description: ftp-client is a library for communicating with an FTP server. It works over both a clear channel or TLS. ftp-client-conduit uses conduit to stream files and data in constant space.
homepage: https://github.com/flipstone/ftp-client
maintainer: Flipstone Technology Partners
license: PublicDomain
license-file: LICENSE
author: Megan Robinson
category: Web
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
cabal-version: 1.12

library
hs-source-dirs: src
exposed-modules: Network.FTP.Client.Conduit
build-depends: base >= 4.7 && < 5
, ftp-client == 0.5.*
, conduit >= 1.1
, bytestring
, resourcet >= 1.2 && < 1.3
, crypton-connection >= 0.4 && < 0.5
, exceptions
default-language: Haskell2010
default-extensions: RankNTypes, OverloadedStrings
-- This file has been generated from package.yaml by hpack version 0.39.1.
--
-- see: https://github.com/sol/hpack

test-suite ftp-conduit-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base >=4.11.1.0 && < 5
, ftp-client-conduit
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
name: ftp-client-conduit
version: 0.5.0.6
synopsis: Transfer file with FTP and FTPS with Conduit
description: ftp-client is a library for communicating with an FTP server. It works over both a clear channel or TLS. ftp-client-conduit uses conduit to stream files and data in constant space.
category: Web
homepage: https://github.com/flipstone/ftp-client
author: Megan Robinson
maintainer: Flipstone Technology Partners
license: PublicDomain
license-file: LICENSE
build-type: Simple
tested-with:
GHC == 9.2.8
, GHC == 9.4.8
, GHC == 9.6.7
, GHC == 9.8.4
, GHC == 9.10.3
, GHC == 9.12.4
extra-source-files:
README.md
CHANGELOG.md

source-repository head
type: git
type: git
location: https://github.com/flipstone/ftp-client

library
exposed-modules:
Network.FTP.Client.Conduit
other-modules:
Paths_ftp_client_conduit
hs-source-dirs:
src
default-extensions:
RankNTypes
OverloadedStrings
build-depends:
base >=4.16 && <5
, bytestring
, conduit >=1.1
, crypton-connection >=0.3 && <0.5
, exceptions
, ftp-client ==0.5.*
, resourcet >=1.2 && <1.4
default-language: Haskell2010

test-suite ftp-conduit-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_ftp_client_conduit
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.16 && <5
, ftp-client-conduit
default-language: Haskell2010
Loading
Loading