-
Notifications
You must be signed in to change notification settings - Fork 18
224 lines (203 loc) · 7.12 KB
/
main.yml
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: CI
on: [push, pull_request]
env:
MAKEFLAGS: "-j8"
jobs:
linux:
name: "qt:${{ matrix.qt }} py:${{ matrix.py }} on ${{ matrix.container }}"
runs-on: ubuntu-22.04
container: "${{ matrix.container }}"
strategy:
matrix:
include:
- qt: 5 # 5.12
py: "3.8"
container: "ubuntu:20.04"
packages: "qt5-default qttools5-dev-tools qtdeclarative5-dev qml-module-qtquick2"
- qt: 5 # 5.15
py: "3.10"
container: "ubuntu:22.04"
packages: "qtbase5-dev qttools5-dev-tools qtdeclarative5-dev qml-module-qtquick2"
- qt: 6 # 6.2
py: "3.10"
container: "ubuntu:22.04"
packages: "qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-declarative-dev libqt6opengl6-dev qml6-module-*"
- qt: 6 # 6.4
py: "3.12"
container: "ubuntu:24.04"
packages: "qt6-base-dev qt6-tools-dev qt6-tools-dev-tools qt6-declarative-dev libqt6opengl6-dev qml6-module-*"
env:
DEBIAN_FRONTEND: noninteractive
FUNQ_QT_MAJOR_VERSION: "${{ matrix.qt }}"
steps:
- uses: actions/checkout@v2
- name: Install requirements
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential cmake xvfb libglu1-mesa-dev \
python3 python3-pip python3-flake8 \
${{ matrix.packages }}
- name: Install Python requirements
run: |
pip install wheel pytest pytest-runner
# Stylecheck
- name: Flake8
run: python3 -m flake8 client/funq server/funq_server
# Build & test C++ modules
- name: Build libFunq
run: |
mkdir build
cd build
cmake ../server -DQT_MAJOR_VERSION=${{ matrix.qt }} -DBUILD_TESTS=1 -DBUILD_DISALLOW_WARNINGS=1
make
- name: Run libFunq tests
run: xvfb-run -a build/tests/libFunq/testLibFunq
- name: Run protocole tests
run: xvfb-run -a build/tests/protocole/testProtocole
# Server
- name: Install server
run: cd server && python -m pip install --editable .
# Client
- name: Install client
run: cd client && python -m pip install --editable .
- name: Test client
run: |
python -m pip install -r requirements-dev.txt
cd client && pytest -v tests/
# Functional tests
- name: Build test app
run: cd tests-functionnal/funq-test-app && cmake . && make
- name: Test injection
run: xvfb-run -a funq tests-functionnal/funq-test-app/funq-test-app --exit-after-startup
- name: Test functional
run: cd tests-functionnal && xvfb-run -a pytest -v
macos:
name: "qt:${{ matrix.qt }} on ${{ matrix.runner }}"
runs-on: "${{ matrix.runner }}"
strategy:
matrix:
include:
- {qt: "5", runner: "macos-12"}
- {qt: "6", runner: "macos-14"}
env:
FUNQ_QT_MAJOR_VERSION: "${{ matrix.qt }}"
PIP_BREAK_SYSTEM_PACKAGES: 1
steps:
- uses: actions/checkout@v2
- name: Install requirements
run: |
brew install cmake qt@${{ matrix.qt }}
brew link --force qt@${{ matrix.qt }}
echo "$(brew --prefix qt${{ matrix.qt }})/bin" >> $GITHUB_PATH
pip3 install setuptools flake8 wheel pytest pytest-runner
# Stylecheck
- name: Flake8
run: python3 -m flake8 client/funq server/funq_server
# Build & test C++ modules
- name: Build libFunq
run: |
mkdir build
cd build
cmake ../server -DQT_MAJOR_VERSION=${{ matrix.qt }} -DBUILD_TESTS=1 -DBUILD_DISALLOW_WARNINGS=1
make
- name: Run libFunq tests
run: build/tests/libFunq/testLibFunq
- name: Run protocole tests
run: build/tests/protocole/testProtocole
# Server
- name: Install server
run: cd server && python -m pip install --editable /
# Client
- name: Install client
run: cd client && python -m pip install --editable .
- name: Test client
run: |
python -m pip install -r requirements-dev.txt
cd client && pytest -v tests/
# Functional tests
- name: Build test app
run: cd tests-functionnal/funq-test-app && cmake . && make
- name: Test injection
run: funq tests-functionnal/funq-test-app/funq-test-app --exit-after-startup
- name: Test functional
run: cd tests-functionnal && xvfb-run -a pytest -v
windows:
name: "qt:${{ matrix.qt }} py:${{ matrix.py }} ${{ matrix.arch }} on windows"
runs-on: windows-2022
strategy:
matrix:
include:
- py: "3.8"
arch: "x86"
qt: 5
qt_full: "5.15.2"
qt_arch: "win32_mingw81"
qt_tools: "tools_mingw,qt.tools.win32_mingw810"
compiler_path: "D:/a/funq/Qt/Tools/mingw810_32/bin"
- py: "3.8"
arch: "x64"
qt: 6
qt_full: "6.7.0"
qt_arch: "win64_mingw"
qt_tools: "tools_mingw1310"
compiler_path: "D:/a/funq/Qt/Tools/mingw1310_64/bin"
- py: "3.11"
arch: "x64"
qt: 6
qt_full: "6.7.0"
qt_arch: "win64_mingw"
qt_tools: "tools_mingw1310"
compiler_path: "D:/a/funq/Qt/Tools/mingw1310_64/bin"
env:
CMAKE_GENERATOR: "MinGW Makefiles"
CC: "${{ matrix.compiler_path }}/gcc.exe"
CXX: "${{ matrix.compiler_path }}/g++.exe"
defaults:
run:
shell: cmd
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.py }}"
architecture: "${{ matrix.arch }}"
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: "${{ matrix.qt_full }}"
tools: "${{ matrix.qt_tools }}"
arch: "${{ matrix.qt_arch }}"
setup-python: false
cache: true
# Build & test C++ modules
- name: Build libFunq
run: |
mkdir build
cd build
cmake ../server -DBUILD_TESTS=1 -DBUILD_DISALLOW_WARNINGS=1
make
- name: Run libFunq tests
run: build\tests\libFunq\testLibFunq.exe
- name: Run protocole tests
run: build\tests\protocole\testProtocole.exe
# Server
- name: Install server
run: cd server && python -m pip install --editable .
# Client
- name: Install test requirements
run: pip install wheel pytest pytest-runner
- name: Install client
run: cd client && python -m pip install --editable .
- name: Test client
run: |
python -m pip install -r requirements-dev.txt
cd client && pytest -v tests/
# Functional tests
- name: Build test app
run: cd tests-functionnal/funq-test-app && cmake . && make
- name: Test injection
run: funq tests-functionnal/funq-test-app/funq-test-app.exe --exit-after-startup
- name: Test functional
run: cd tests-functionnal && pytest -v