Skip to content

Commit 3d568af

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

15 files changed

+248
-90
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: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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; e.g. if GITHUB_REF is "refs/tags/v0.2.1.0",
17+
# this step sets the output "version" to "0.2.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: "Debug: List Documentation Directory"
37+
run: |
38+
echo "Listing documentation directory contents:"
39+
ls -R dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
40+
41+
- name: Zip Haddock Documentation
42+
run: |
43+
cd dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
44+
echo "Current directory contents before zipping:"
45+
ls -la
46+
# Zip only the contents of this directory into documentation.zip placed at the repository root.
47+
zip -r ../../../../../../../../../documentation.zip .
48+
49+
- name: Create GitHub Release and Upload Assets
50+
uses: ncipollo/release-action@v1
51+
with:
52+
tag: ${{ github.ref }}
53+
name: Release ${{ steps.extract_version.outputs.version }}
54+
artifacts: |
55+
dist-newstyle/sdist/*.tar.gz
56+
documentation.zip
57+
58+
- name: "Debug: List Publish Directory"
59+
run: |
60+
echo "Listing publish directory contents:"
61+
ls -R dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
62+
63+
- name: Deploy Haddock Documentation to GitHub Pages
64+
uses: peaceiris/actions-gh-pages@v3
65+
with:
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
publish_branch: gh-pages
68+
publish_dir: dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
69+
destination_dir: ${{ steps.extract_version.outputs.version }}
70+
71+
update-index:
72+
name: Update Documentation Index
73+
runs-on: ubuntu-latest
74+
needs: release
75+
steps:
76+
- name: Checkout gh-pages branch
77+
uses: actions/checkout@v4
78+
with:
79+
ref: gh-pages
80+
- name: Set up Git user
81+
run: |
82+
git config user.name "github-actions[bot]"
83+
git config user.email "github-actions[bot]@users.noreply.github.com"
84+
- name: "Debug: List gh-pages Root"
85+
run: |
86+
echo "Listing gh-pages branch root:"
87+
ls -R
88+
- name: Update Documentation Index
89+
run: |
90+
chmod +x ./scripts/generate-index.sh
91+
./scripts/generate-index.sh
92+
echo "After running generate-index.sh, listing files:"
93+
ls -la
94+
git add index.html
95+
if ! git diff --cached --exit-code; then
96+
git commit -m "Update documentation index"
97+
git push origin gh-pages
98+
else
99+
echo "No changes to index.html"
100+
fi

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
## [0.2.1.0] - 2025-03-20
4+
- Updated repository URL to [https://github.com/flip111/haskell-socket-unix](https://github.com/flip111/haskell-socket-unix).
5+
- Package builds with GHC versions 8.4.4 (lts-12.26) to 9.8.4 (lts-23.15)
6+
7+
## [0.2.0.0] and earlier
8+
No changelog available for now

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: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
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: [email protected]
10+
author: flip111, Vyacheslav Hashov
11+
1212
copyright: 2017 Vyacheslav Hashov
1313
category: System, Network
1414
stability: Experimental
1515
build-type: Simple
16-
extra-source-files: README.md
16+
extra-source-files: README.md CHANGELOG.md
17+
18+
source-repository head
19+
type: git
20+
location: https://github.com/flip111/haskell-socket-unix
1721

1822
library
1923
hs-source-dirs: src
@@ -25,14 +29,13 @@ library
2529
other-modules: System.Socket.Family.Unix.Internal
2630
System.Socket.Family.Unix.Platform
2731
build-depends:
28-
base
29-
, socket
30-
, bytestring
32+
base >= 4.11 && < 5
33+
, socket == 0.8.3.0
34+
, bytestring >= 0.10 && < 0.13
3135

3236
ghc-options:
3337
-Wall
34-
-O2
35-
default-language: GHC2021
38+
default-language: Haskell2010
3639

3740
test-suite default
3841
type: exitcode-stdio-1.0
@@ -45,15 +48,15 @@ test-suite default
4548
other-modules: Internal
4649
Platform
4750
build-depends:
48-
base
49-
, socket
51+
base >= 4.11 && < 5
52+
, socket == 0.8.3.0
5053
, socket-unix
51-
, tasty
52-
, tasty-hunit
53-
, bytestring
54-
, unix
55-
, async
56-
default-language: GHC2021
54+
, tasty >= 1.1 && < 1.6
55+
, tasty-hunit >= 0.10 && < 0.11
56+
, bytestring >= 0.10 && < 0.13
57+
, unix >= 2.7 && < 2.9
58+
, async >= 2.2 && < 2.3
59+
default-language: Haskell2010
5760

5861
test-suite threaded
5962
type: exitcode-stdio-1.0
@@ -66,17 +69,13 @@ test-suite threaded
6669
other-modules: Internal
6770
Platform
6871
build-depends:
69-
base
70-
, socket
72+
base >= 4.11 && < 5
73+
, socket == 0.8.3.0
7174
, socket-unix
72-
, tasty
73-
, tasty-hunit
74-
, bytestring
75-
, unix
76-
, async
75+
, tasty >= 1.1 && < 1.6
76+
, tasty-hunit >= 0.10 && < 0.11
77+
, bytestring >= 0.10 && < 0.13
78+
, unix >= 2.7 && < 2.9
79+
, async >= 2.2 && < 2.3
7780
ghc-options: -threaded
78-
default-language: GHC2021
79-
80-
source-repository head
81-
type: git
82-
location: https://github.com/vyacheslavhashov/haskell-socket-unix
81+
default-language: Haskell2010

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: []

0 commit comments

Comments
 (0)