Skip to content

Commit af68094

Browse files
committed
Source repository change
* Change source repository and add maintainer * Add ci actions * Bump version
1 parent d0b7b6b commit af68094

14 files changed

+218
-85
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
ghc: ['8.4.4', '8.6.5', '9.0.2', '9.2.8', '9.4.8', '9.6.6', '9.8.4']
11+
env:
12+
STACK_YAML: stack-ghc${{ matrix.ghc }}.yaml
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Haskell
18+
uses: haskell-actions/setup@v2
19+
id: setup-haskell
20+
with:
21+
ghc-version: ${{ matrix.ghc }}
22+
enable-stack: true
23+
stack-version: 'latest'
24+
25+
- name: Cache Haskell Tools
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
${{ steps.setup-haskell.outputs.stack-root }}
30+
.stack-work
31+
~/.ghcup
32+
key: ${{ runner.os }}-haskell-${{ matrix.ghc }}-${{ hashFiles(env.STACK_YAML) }}
33+
restore-keys: |
34+
${{ runner.os }}-haskell-${{ matrix.ghc }}-
35+
36+
- name: Build
37+
run: stack build --system-ghc
38+
39+
- name: Test
40+
run: stack test

.github/workflows/release.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*.*'
7+
8+
jobs:
9+
release:
10+
name: Release Job
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
# Extract version from the tag. For example, if GITHUB_REF is "refs/tags/v0.3.1.0"
17+
# this step will set the output "version" to "0.3.1.0".
18+
- name: Extract Version
19+
id: extract_version
20+
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
21+
22+
- name: Setup Haskell (Cabal)
23+
uses: haskell-actions/setup@v2
24+
with:
25+
ghc-version: '9.8.4'
26+
27+
- name: Cabal Check
28+
run: cabal check
29+
30+
- name: Generate Haddock Documentation
31+
run: cabal haddock --haddock-html --haddock-hoogle --builddir=dist/haddock
32+
33+
- name: Build Source Distribution (Tarball for Hackage)
34+
run: cabal sdist
35+
36+
- name: Zip Haddock Documentation
37+
run: |
38+
cd dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
39+
# Change directory into the docs folder and zip its contents into haddock.zip at the repository root.
40+
zip -r ../../../../../../haddock.zip .
41+
42+
- name: Create GitHub Release and Upload Assets
43+
uses: ncipollo/release-action@v1
44+
with:
45+
tag: ${{ github.ref }}
46+
name: Release ${{ github.ref }}
47+
artifacts: |
48+
dist-newstyle/sdist/*.tar.gz
49+
haddock.zip
50+
51+
- name: Deploy Haddock Documentation to GitHub Pages
52+
uses: peaceiris/actions-gh-pages@v3
53+
with:
54+
github_token: ${{ secrets.GITHUB_TOKEN }}
55+
publish_branch: gh-pages
56+
publish_dir: dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
57+
destination_dir: ${{ github.ref_name }}
58+
59+
60+
update-index:
61+
name: Update Documentation Index
62+
runs-on: ubuntu-latest
63+
needs: release
64+
steps:
65+
- name: Checkout gh-pages branch
66+
uses: actions/checkout@v4
67+
with:
68+
ref: gh-pages
69+
- name: Set up Git user
70+
run: |
71+
git config user.name "github-actions[bot]"
72+
git config user.email "github-actions[bot]@users.noreply.github.com"
73+
- name: Update Documentation Index
74+
run: |
75+
chmod +x ./scripts/generate-index.sh
76+
./scripts/generate-index.sh
77+
git add index.html
78+
if ! git diff --cached --exit-code; then
79+
git commit -m "Update documentation index"
80+
git push origin gh-pages
81+
else
82+
echo "No changes to index.html"
83+
fi

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
[![Available on Hackage][badge-hackage]][hackage]
2-
[![License MIT][badge-license]][license]
3-
[![Build Status][badge-travis]][travis]
1+
[![Available on Hackage](https://img.shields.io/hackage/v/socket-unix.svg?dummy)](https://hackage.haskell.org/package/socket-unix)
2+
[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?dummy)](https://github.com/flip111/haskell-socket-unix/blob/master/LICENSE)
3+
[![Build Status](https://github.com/flip111/haskell-socket-unix/actions/workflows/ci.yml/badge.svg)](https://github.com/flip111/haskell-socket-unix/actions)
4+
[![Stackage LTS](https://stackage.org/package/socket-unix/badge/lts)](https://stackage.org/package/socket-unix)
5+
[![GitHub release](https://img.shields.io/github/release/flip111/haskell-socket-unix.svg)](https://github.com/flip111/haskell-socket-unix/releases)
6+
47
# socket-unix
58
A Unix domain socket API for the [socket](https://github.com/lpeterse/haskell-socket) library.
69

10+
This is a fork maintained at [GitHub](https://github.com/flip111/haskell-socket-unix).
11+
Please refer to this repository for the latest updates, issue tracking, and contributions.
12+
713
## Usage
814
Creating the Unix domain socket:
915
```haskell
@@ -20,15 +26,9 @@ address <- case socketAddressUnixPath "example.sock" of
2026
Just addr -> pure addr
2127
Nothing -> putStrLn "invalid pathname for socket"
2228
```
29+
2330
### Symlinks
2431
Binding to a socket with a filename creates a socket in the filesystem, but does not unlink it after `close` called. You should handle deleting links yourself.
32+
2533
## Portability
2634
Linux and OS X are supported.
27-
28-
29-
[badge-travis]: https://img.shields.io/travis/VyacheslavHashov/haskell-socket-unix.svg
30-
[travis]: https://travis-ci.org/VyacheslavHashov/haskell-socket-unix
31-
[badge-hackage]: https://img.shields.io/hackage/v/socket-unix.svg?dummy
32-
[hackage]: https://hackage.haskell.org/package/socket-unix
33-
[badge-license]: https://img.shields.io/badge/license-MIT-blue.svg?dummy
34-
[license]: https://github.com/vyacheslavhashov/haskell-socket-unix/blob/master/LICENSE

socket-unix.cabal

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
cabal-version: 3.8
1+
cabal-version: 2.2
22

33
name: socket-unix
4-
version: 0.3.0.0
4+
version: 0.2.1.0
55
synopsis: Unix domain sockets
66
description: A Unix domain socket extension for the socket library
7-
homepage: https://github.com/vyacheslavhashov/haskell-socket-unix#readme
7+
homepage: https://github.com/flip111/haskell-socket-unix#readme
88
license: MIT
99
license-file: LICENSE
10-
author: Vyacheslav Hashov
11-
maintainer: vyacheslavhashov@gmail.com
10+
author: flip111, Vyacheslav Hashov
11+
maintainer: flip101@gmail.com, vyacheslavhashov@gmail.com
1212
copyright: 2017 Vyacheslav Hashov
1313
category: System, Network
1414
stability: Experimental
@@ -25,14 +25,13 @@ library
2525
other-modules: System.Socket.Family.Unix.Internal
2626
System.Socket.Family.Unix.Platform
2727
build-depends:
28-
base
29-
, socket
30-
, bytestring
28+
base >= 4.11 && < 5
29+
, socket == 0.8.3.0
30+
, bytestring >= 0.10 && < 0.13
3131

3232
ghc-options:
3333
-Wall
34-
-O2
35-
default-language: GHC2021
34+
default-language: Haskell2010
3635

3736
test-suite default
3837
type: exitcode-stdio-1.0
@@ -45,15 +44,15 @@ test-suite default
4544
other-modules: Internal
4645
Platform
4746
build-depends:
48-
base
49-
, socket
47+
base >= 4.11 && < 5
48+
, socket == 0.8.3.0
5049
, socket-unix
51-
, tasty
52-
, tasty-hunit
53-
, bytestring
54-
, unix
55-
, async
56-
default-language: GHC2021
50+
, tasty >= 1.1 && < 1.6
51+
, tasty-hunit >= 0.10 && < 0.11
52+
, bytestring >= 0.10 && < 0.13
53+
, unix >= 2.7 && < 2.9
54+
, async >= 2.2 && < 2.3
55+
default-language: Haskell2010
5756

5857
test-suite threaded
5958
type: exitcode-stdio-1.0
@@ -66,16 +65,16 @@ test-suite threaded
6665
other-modules: Internal
6766
Platform
6867
build-depends:
69-
base
70-
, socket
68+
base >= 4.11 && < 5
69+
, socket == 0.8.3.0
7170
, socket-unix
72-
, tasty
73-
, tasty-hunit
74-
, bytestring
75-
, unix
76-
, async
71+
, tasty >= 1.1 && < 1.6
72+
, tasty-hunit >= 0.10 && < 0.11
73+
, bytestring >= 0.10 && < 0.13
74+
, unix >= 2.7 && < 2.9
75+
, async >= 2.2 && < 2.3
7776
ghc-options: -threaded
78-
default-language: GHC2021
77+
default-language: Haskell2010
7978

8079
source-repository head
8180
type: git

stack-ghc8.4.4.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
resolver: lts-12.26
2+
3+
packages:
4+
- '.'
5+
6+
extra-deps:
7+
- socket-0.8.3.0
8+
9+
# Override default flag values for local packages and extra-deps
10+
flags: {}
11+
12+
# Extra package databases containing global packages
13+
extra-package-dbs: []
14+

stack-ghc8.6.5.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
resolver: lts-14.27
2+
3+
packages:
4+
- '.'
5+
6+
extra-deps:
7+
- socket-0.8.3.0
8+
9+
# Override default flag values for local packages and extra-deps
10+
flags: {}
11+
12+
# Extra package databases containing global packages
13+
extra-package-dbs: []
14+

stack-ghc9.6.4.yaml renamed to stack-ghc9.0.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-22.13
1+
resolver: lts-19.33
22

33
packages:
44
- '.'
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
resolver: lts-6.27
1+
resolver: lts-20.26
22

33
packages:
4-
- '.'
4+
- '.'
55
extra-deps:
6-
- socket-0.8.0.0
6+
- socket-0.8.3.0
77

88
# Override default flag values for local packages and extra-deps
99
flags: {}
1010

1111
# Extra package databases containing global packages
1212
extra-package-dbs: []
13-
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
resolver: lts-8.0
1+
resolver: lts-21.25
22

33
packages:
4-
- '.'
4+
- '.'
55
extra-deps:
6-
- socket-0.8.0.0
6+
- socket-0.8.3.0
77

88
# Override default flag values for local packages and extra-deps
99
flags: {}
1010

1111
# Extra package databases containing global packages
1212
extra-package-dbs: []
13-

stack-ghc9.6.4.yaml.lock

Lines changed: 0 additions & 19 deletions
This file was deleted.

stack-ghc9.6.6.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resolver: lts-22.43
2+
3+
packages:
4+
- '.'
5+
extra-deps:
6+
- socket-0.8.3.0
7+
8+
# Override default flag values for local packages and extra-deps
9+
flags: {}
10+
11+
# Extra package databases containing global packages
12+
extra-package-dbs: []

stack-ghc9.8.4.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resolver: lts-23.15
2+
3+
packages:
4+
- '.'
5+
extra-deps:
6+
- socket-0.8.3.0
7+
8+
# Override default flag values for local packages and extra-deps
9+
flags: {}
10+
11+
# Extra package databases containing global packages
12+
extra-package-dbs: []

stack.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

stack.yaml.lock

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)