forked from 7h0ma5/QLog
-
Notifications
You must be signed in to change notification settings - Fork 46
205 lines (172 loc) · 5.37 KB
/
c-cpp.yml
File metadata and controls
205 lines (172 loc) · 5.37 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
name: CI Linux/macOS
on:
push:
branches:
- 'testing_*'
pull_request:
branches:
- 'testing_*'
- master
workflow_dispatch:
jobs:
ubuntu-build-qt5:
name: Ubuntu CI QT5
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libsqlite3-dev libhamlib++-dev libqt5charts5-dev qttools5-dev-tools libqt5keychain1 qt5keychain-dev qtwebengine5-dev build-essential libqt5serialport5-dev pkg-config libqt5websockets5-dev
- name: Checkout code
uses: actions/checkout@v5
- name: configure
run: qmake QLog.pro
- name: make
run: make -j2
ubuntu-build-qt6:
name: Ubuntu CI QT6
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libhamlib-dev build-essential pkg-config qt6-base-dev qtkeychain-qt6-dev qt6-webengine-dev libqt6charts6-dev libqt6serialport6-dev libqt6webenginecore6-bin libqt6svg6-dev libgl-dev libqt6websockets6-dev
- name: Checkout code
uses: actions/checkout@v5
- name: configure
run: qmake6 QLog.pro
- name: make
run: make -j2
macos-build:
name: MacOS CI
if: vars.ENABLE_MACOS == 'true'
strategy:
matrix:
os: [macos-15]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
unset HOMEBREW_NO_INSTALL_FROM_API
brew update
brew upgrade || true
brew install qt6
brew link qt6 --force
brew install hamlib
brew link hamlib --force
brew install qtkeychain
brew install dbus-glib
brew install brotli
brew install icu4c
brew install pkg-config
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get version from tag
run : |
TAGVERSION=$(git describe --tags)
echo "TAGVERSION=${TAGVERSION:1}" >> $GITHUB_ENV
- name: Configure and compile
run: |
cd build
qmake6 -config release ..
make -j4
deb-package:
name: DEB Package Build
if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install tools and build dependencies
run: |
sudo apt-get update
sudo apt-get -y install devscripts equivs dpkg-dev fakeroot lintian
sudo mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends"
- name: Build DEB package
run: dpkg-buildpackage -b -us -uc -j2
- name: Verify DEB was created
run: ls -la ../qlog_*.deb
- name: Run lintian
run: lintian --no-tag-display-limit ../qlog_*.changes || true
- name: Upload DEB artifact
uses: actions/upload-artifact@v5
with:
name: deb-package
path: /home/runner/work/QLog/qlog_*.deb
retention-days: 1
deb-smoke-test:
name: DEB Smoke Test
needs: deb-package
runs-on: ubuntu-24.04
steps:
- name: Download DEB artifact
uses: actions/download-artifact@v5
with:
name: deb-package
- name: Install and smoke test
run: |
sudo apt-get update
sudo apt-get install -y ./qlog_*.deb
QT_QPA_PLATFORM=offscreen qlog --help 2>&1 | grep -q "QLog Help"
rpm-package:
name: RPM Package Build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
container:
image: fedora:43
steps:
- name: Install base tools
run: dnf install -y git rpm-build rpmdevtools rpmlint dnf-plugins-core
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Get version from tag
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
echo "REPO_VERSION=${VERSION}" >> $GITHUB_ENV
- name: Install build dependencies from spec
run: dnf builddep -y rpm_spec/qlog.spec
- name: Prepare RPM build tree
run: |
rpmdev-setuptree
TAR_DIR="QLog-${REPO_VERSION}"
mkdir -p "/tmp/${TAR_DIR}"
cp -a . "/tmp/${TAR_DIR}/"
tar czf ~/rpmbuild/SOURCES/qlog-${REPO_VERSION}.tar.gz --exclude='.git' -C /tmp "${TAR_DIR}"
- name: Build RPM package
run: rpmbuild -bb rpm_spec/qlog.spec
- name: Verify RPM was created
run: ls -la ~/rpmbuild/RPMS/*/QLog-*.rpm
- name: Run rpmlint
run: rpmlint ~/rpmbuild/RPMS/*/*.rpm || true
- name: Upload RPM artifact
uses: actions/upload-artifact@v5
with:
name: rpm-package
path: ~/rpmbuild/RPMS/*/QLog-*.rpm
retention-days: 1
rpm-smoke-test:
name: RPM Smoke Test
needs: rpm-package
runs-on: ubuntu-latest
container:
image: fedora:43
steps:
- name: Download RPM artifact
uses: actions/download-artifact@v5
with:
name: rpm-package
- name: Install and smoke test
run: |
dnf install -y $(find . -name 'QLog-*.rpm')
QT_QPA_PLATFORM=offscreen qlog --help 2>&1 | grep -q "QLog Help"