Skip to content

Commit 8a02cda

Browse files
committed
v1.1.0 Production Release with CI/CD and installation infrastructure
- Add GitHub Actions CI/CD workflows for package releases - Add professional packaging, distribution, and installation infrastructure - Add comprehensive installation and deployment guides - Update documentation and API references - Clean up build artifacts and temporary files - Replace placeholder URLs with actual GitHub repository references
1 parent 89d8124 commit 8a02cda

File tree

190 files changed

+2627
-24739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+2627
-24739
lines changed

.github/RELEASE_TEMPLATE.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Release v1.1.0
2+
3+
## Overview
4+
Describe the major changes, improvements, and features in this release.
5+
6+
## Key Features
7+
- Feature 1
8+
- Feature 2
9+
- Feature 3
10+
11+
## Improvements
12+
- Improvement 1
13+
- Improvement 2
14+
15+
## Bug Fixes
16+
- Bug fix 1
17+
- Bug fix 2
18+
19+
## Installation
20+
21+
### From .deb Package (Ubuntu/Debian)
22+
```bash
23+
sudo apt-get install ./libwsv5_1.1.0_amd64.deb
24+
```
25+
26+
### From Source
27+
```bash
28+
git clone https://github.com/linuxmainframe/libwsv5.git
29+
cd libwsv5
30+
git checkout v1.1.0
31+
32+
mkdir build && cd build
33+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
34+
make -j$(nproc)
35+
sudo make install
36+
```
37+
38+
### Verify Installation
39+
```bash
40+
pkg-config --modversion libwsv5
41+
```
42+
43+
## Documentation
44+
- [Installation Guide](INSTALL_GUIDE.md)
45+
- [API Reference](API_REFERENCE.md)
46+
- [Packaging Guide](PACKAGING.md)
47+
48+
## Downloads
49+
- `libwsv5_1.1.0_amd64.deb` - Debian/Ubuntu package
50+
- `libwsv5-1.1.0.tar.gz` - Source code (tar.gz)
51+
- `libwsv5-1.1.0.zip` - Source code (zip)
52+
53+
## Checksums
54+
All downloads should be verified against SHA256SUMS file:
55+
```bash
56+
sha256sum -c SHA256SUMS
57+
```
58+
59+
## Support
60+
For issues, questions, or contributions:
61+
- [GitHub Issues](https://github.com/linuxmainframe/libwsv5/issues)
62+
- [GitHub Discussions](https://github.com/linuxmainframe/libwsv5/discussions)
63+
64+
## Contributors
65+
Thank you to all contributors in this release!
66+
67+
---
68+
**Release Date:** January XX, 2024
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build and Release Packages
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
include:
18+
- arch: amd64
19+
docker_image: ubuntu:22.04
20+
dpkg_arch: amd64
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Install dependencies
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y \
31+
build-essential \
32+
cmake \
33+
libwebsockets-dev \
34+
libcjson-dev \
35+
libssl-dev \
36+
dpkg-dev
37+
38+
- name: Build library
39+
run: |
40+
mkdir -p build
41+
cd build
42+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
43+
make -j$(nproc)
44+
45+
- name: Run tests (if OBS available)
46+
run: |
47+
cd build
48+
if [ -f test ]; then
49+
echo "Tests available but require OBS running on localhost:4455"
50+
# ./test -h localhost -p 4455 || echo "OBS not available, skipping"
51+
fi
52+
continue-on-error: true
53+
54+
- name: Create .deb package
55+
run: |
56+
cd build
57+
cpack -G DEB -V
58+
59+
- name: Create source archives
60+
run: |
61+
cd build
62+
cpack --config CPackSourceConfig.cmake -G TGZ
63+
cpack --config CPackSourceConfig.cmake -G ZIP
64+
65+
- name: Generate checksums
66+
run: |
67+
cd build
68+
sha256sum libwsv5_*.deb libwsv5_*.tar.gz libwsv5_*.zip > SHA256SUMS 2>/dev/null || true
69+
cat SHA256SUMS
70+
71+
- name: List artifacts
72+
run: |
73+
cd build
74+
echo "=== Artifacts ==="
75+
ls -lh libwsv5_*
76+
77+
- name: Upload artifacts
78+
uses: actions/upload-artifact@v3
79+
with:
80+
name: libwsv5-packages
81+
path: build/libwsv5_*
82+
83+
- name: Create Release
84+
if: startsWith(github.ref, 'refs/tags/v')
85+
uses: softprops/action-gh-release@v1
86+
with:
87+
files: |
88+
build/libwsv5_*.deb
89+
build/libwsv5_*.tar.gz
90+
build/libwsv5_*.zip
91+
build/SHA256SUMS
92+
draft: false
93+
prerelease: false
94+
body_path: .github/RELEASE_TEMPLATE.md
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ To verify correct installation:
388388

389389
```bash
390390
cd build
391-
./test -h localhost -p 4455 -w your_password -d 1
391+
./test -h localhost -p 4455 -w obs_password -d 1
392392
```
393393

394394
Expected output: `Pass Rate: 90%+` (minor failures may occur if OBS is not fully configured)

CMakeLists.txt

Lines changed: 76 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(libwsv5 C)
2+
project(libwsv5 C VERSION 1.1.0 DESCRIPTION "OBS WebSocket v5 Protocol C Library")
33

44
set(CMAKE_C_STANDARD 11)
55
set(CMAKE_C_STANDARD_REQUIRED ON)
6+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
67

78
# Find required packages
89
find_package(OpenSSL REQUIRED)
@@ -34,65 +35,79 @@ set(HEADERS
3435
libwsv5.h
3536
)
3637

37-
# Create static library
38-
add_library(libwsv5 STATIC ${SOURCES} ${HEADERS})
38+
# Create both static and shared libraries
39+
add_library(libwsv5_static STATIC ${SOURCES} ${HEADERS})
40+
add_library(libwsv5_shared SHARED ${SOURCES} ${HEADERS})
3941

40-
# Set library output name (removes 'lib' prefix duplication)
41-
set_target_properties(libwsv5 PROPERTIES OUTPUT_NAME wsv5)
42+
# Set library output names (removes 'lib' prefix duplication)
43+
set_target_properties(libwsv5_static PROPERTIES OUTPUT_NAME wsv5)
44+
set_target_properties(libwsv5_shared PROPERTIES OUTPUT_NAME wsv5)
4245

43-
# Include directories
44-
target_include_directories(libwsv5 PUBLIC
45-
${CMAKE_CURRENT_SOURCE_DIR}
46-
${OPENSSL_INCLUDE_DIR}
47-
${LIBWEBSOCKETS_INCLUDE_DIR}
48-
${CJSON_INCLUDE_DIR}
49-
)
50-
51-
# Link libraries
52-
target_link_libraries(libwsv5 PUBLIC
53-
${OPENSSL_LIBRARIES}
54-
${LIBWEBSOCKETS_LIBRARY}
55-
${CJSON_LIBRARY}
56-
Threads::Threads
57-
m
58-
)
46+
# Create an alias for convenience - libwsv5 defaults to static
47+
add_library(libwsv5 ALIAS libwsv5_static)
5948

60-
# Compiler flags
61-
target_compile_options(libwsv5 PRIVATE
62-
-Wall
63-
-Wextra
64-
-Wpedantic
65-
-Wno-unused-parameter
66-
)
49+
# Include directories for both libraries
50+
foreach(target libwsv5_static libwsv5_shared)
51+
target_include_directories(${target} PUBLIC
52+
${CMAKE_CURRENT_SOURCE_DIR}
53+
${OPENSSL_INCLUDE_DIR}
54+
${LIBWEBSOCKETS_INCLUDE_DIR}
55+
${CJSON_INCLUDE_DIR}
56+
)
57+
58+
# Link libraries
59+
target_link_libraries(${target} PUBLIC
60+
${OPENSSL_LIBRARIES}
61+
${LIBWEBSOCKETS_LIBRARY}
62+
${CJSON_LIBRARY}
63+
Threads::Threads
64+
m
65+
)
66+
67+
# Compiler flags
68+
target_compile_options(${target} PRIVATE
69+
-Wall
70+
-Wextra
71+
-Wpedantic
72+
-Wno-unused-parameter
73+
)
74+
endforeach()
6775

6876
# Optional: Build example/test program
6977
option(BUILD_EXAMPLES "Build example programs" OFF)
7078
option(BUILD_TESTS "Build test programs" OFF)
7179

7280
if(BUILD_EXAMPLES)
7381
add_executable(obsws_example example.c)
74-
target_link_libraries(obsws_example libwsv5)
82+
target_link_libraries(obsws_example libwsv5_static)
7583
endif()
7684

7785
# Build test suite if requested
7886
if(BUILD_TESTS)
7987
# Comprehensive test suite
8088
add_executable(test tests/test.c)
81-
target_link_libraries(test libwsv5)
89+
target_link_libraries(test libwsv5_static)
8290
target_include_directories(test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
8391
target_compile_options(test PRIVATE -lm)
8492
endif()
8593

8694
# Installation
87-
install(TARGETS libwsv5
95+
install(TARGETS libwsv5_static libwsv5_shared
8896
ARCHIVE DESTINATION lib
8997
LIBRARY DESTINATION lib
98+
RUNTIME DESTINATION bin
9099
)
91100

92101
install(FILES ${HEADERS}
93102
DESTINATION include/libwsv5
94103
)
95104

105+
# Install pkg-config file
106+
configure_file(libwsv5.pc.in libwsv5.pc @ONLY)
107+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libwsv5.pc
108+
DESTINATION lib/pkgconfig
109+
)
110+
96111
# Doxygen documentation generation
97112
find_package(Doxygen REQUIRED OPTIONAL_COMPONENTS dot)
98113

@@ -153,4 +168,34 @@ message(STATUS " Threads: ${CMAKE_THREAD_LIBS_INIT}")
153168
message(STATUS "")
154169
message(STATUS "Build Options:")
155170
message(STATUS " Build Examples: ${BUILD_EXAMPLES}")
171+
message(STATUS "")
172+
173+
# CPack Configuration for packaging
174+
include(CPack)
175+
set(CPACK_PACKAGE_NAME "libwsv5")
176+
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
177+
set(CPACK_PACKAGE_VENDOR "Aidan A. Bradley")
178+
set(CPACK_PACKAGE_CONTACT "[email protected]")
179+
set(CPACK_PACKAGE_DESCRIPTION "OBS WebSocket v5 Protocol C Library")
180+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "High-performance C library for OBS WebSocket v5 protocol")
181+
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/linuxmainframe/libwsv5")
182+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
183+
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
184+
185+
# Debian package specific settings
186+
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
187+
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
188+
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
189+
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Aidan A. Bradley <[email protected]>")
190+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libwebsockets (>= 3.0), libcjson (>= 1.7), libssl-dev (>= 1.1)")
191+
set(CPACK_DEBIAN_PACKAGE_SUGGESTS "libwsv5-dev (= ${PROJECT_VERSION})")
192+
set(CPACK_DEBIAN_FILE_NAME "${CPACK_PACKAGE_NAME}_${PROJECT_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb")
193+
194+
# Source archive
195+
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
196+
set(CPACK_SOURCE_IGNORE_FILES "/build/;/cmake-build-*/;/.git/;/.gitignore;/.idea/;/.vscode/")
197+
198+
message(STATUS "Package Generation:")
199+
message(STATUS " To create .deb packages: cpack -G DEB")
200+
message(STATUS " To create source archive: cpack --config CPackSourceConfig.cmake")
156201
message(STATUS "")

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to libwsv5
22

3-
Thank you for your interest in contributing! This document provides guidelines for contributing to the libwsv5 project.
3+
Thank you for your interest in contributing to libwsv5! This document provides guidelines for contributing to the project. Please review the following sections before submitting pull requests.
44

55
## Code of Conduct
66

@@ -27,21 +27,21 @@ We are committed to providing a welcoming and inclusive environment for all cont
2727

2828
### Pull Requests
2929

30-
1. **Fork the repository**
31-
2. **Create a feature branch**: `git checkout -b feature/your-feature-name`
32-
3. **Make your changes** with clear, descriptive commits
30+
1. **Fork the repository** on GitHub
31+
2. **Create a feature branch**: `git checkout -b feature/description-of-feature`
32+
3. **Make your changes** with clear, descriptive commits explaining the reasoning
3333
4. **Write tests** if adding new functionality
34-
5. **Test locally** before submitting
35-
6. **Submit PR** with description of changes
34+
5. **Test locally** before submitting with `./test`
35+
6. **Submit PR** with detailed description of changes and motivation
3636

3737
## Development Setup
3838

3939
```bash
4040
# Install dependencies
4141
sudo apt-get install build-essential cmake libwebsockets-dev libcjson-dev libssl-dev
4242

43-
# Clone your fork
44-
git clone https://github.com/yourusername/libwsv5.git
43+
# Clone the repository
44+
git clone https://github.com/linuxmainframe/libwsv5.git
4545
cd libwsv5
4646

4747
# Build
@@ -50,7 +50,7 @@ cmake -DBUILD_TESTS=ON ..
5050
make
5151

5252
# Run tests
53-
./test -h localhost -p 4455 -w your_password
53+
./test -h localhost -p 4455 -w obs_password
5454
```
5555

5656
## Code Style Guidelines
@@ -85,7 +85,7 @@ make
8585

8686
## License
8787

88-
By contributing, you agree that your contributions will be licensed under the MIT License.
88+
By contributing to libwsv5, you agree that your contributions will be licensed under the MIT License. Contributions should maintain the project's code quality standards and follow existing conventions.
8989

9090
## Questions?
9191

0 commit comments

Comments
 (0)