-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (104 loc) · 3.2 KB
/
package-release.yml
File metadata and controls
120 lines (104 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build and Release Packages
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: amd64
docker_image: ubuntu:22.04
dpkg_arch: amd64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
libwebsockets-dev \
libcjson-dev \
libssl-dev \
dpkg-dev \
doxygen \
graphviz
- name: Build library
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON ..
make -j$(nproc)
- name: Generate Doxygen documentation
run: |
cd build
make doc
continue-on-error: true
- name: Check built artifacts
run: |
cd build
echo "=== Built Executables ==="
if [ -f test ]; then echo "✓ Test executable built"; fi
if [ -f obsws_example ]; then echo "✓ Example executable built"; fi
echo ""
echo "=== Compiled Objects and Libraries ==="
find . -maxdepth 2 -type f \( -name "*.o" -o -name "*.a" -o -name "*.so" \) | sort
- name: Skip OBS tests (setup later)
run: |
echo "Tests built but not executed - OBS server setup required"
echo "Tests will be integrated when remote OBS server is available"
continue-on-error: true
- name: Create .deb package
run: |
cd build
cpack -G DEB -V
- name: Create source archives
run: |
cd build
cpack --config CPackSourceConfig.cmake -G TGZ
cpack --config CPackSourceConfig.cmake -G ZIP
- name: Generate checksums
run: |
cd build
sha256sum libwsv5_*.deb libwsv5_*.tar.gz libwsv5_*.zip > SHA256SUMS 2>/dev/null || true
cat SHA256SUMS
- name: List artifacts
run: |
cd build
echo "=== Artifacts ==="
ls -lh libwsv5_*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: libwsv5-packages
path: build/libwsv5_*
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: libwsv5-docs
path: build/doc/html/
if: hashFiles('build/doc/html/*') != ''
continue-on-error: true
- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
build/libwsv5_*.deb
build/libwsv5_*.tar.gz
build/libwsv5_*.zip
build/SHA256SUMS
draft: false
prerelease: false
body_path: .github/RELEASE_TEMPLATE.md
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}