-
Notifications
You must be signed in to change notification settings - Fork 141
296 lines (281 loc) · 10.4 KB
/
pullrequest.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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
name: PullRequest
on:
pull_request:
branches:
- main
jobs:
MinQtDynamic:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
qt: [5.10.1]
os: [ubuntu-20.04, macos-11, windows-2019]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Python 3.7 version
uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- name: Install BrainFlow and LSL submodules
run: |
git submodule update --init src/applications/mne_scan/plugins/brainflowboard/brainflow
git submodule update --init src/applications/mne_scan/plugins/lsladapter/liblsl
- name: Install Qt (Linux|MacOS)
if: (matrix.os == 'ubuntu-20.04') || (matrix.os == 'macos-11')
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt }}
modules: qtcharts
- name: Install Qt (Windows)
if: matrix.os == 'windows-2019'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt }}
arch: win64_msvc2017_64
modules: qtcharts
- name: Compile BrainFlow submodule (Windows)
if: matrix.os == 'windows-2019'
run: |
cd src\applications\mne_scan\plugins\brainflowboard\brainflow
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -DMSVC_RUNTIME=dynamic -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX="$env:GITHUB_WORKSPACE\applications\mne_scan\plugins\brainflowboard\brainflow\installed" ..
cmake --build . --target install --config Release
- name: Compile BrainFlow submodule (Linux|MacOS)
if: (matrix.os == 'ubuntu-20.04') || (matrix.os == 'macos-11')
run: |
cd src/applications/mne_scan/plugins/brainflowboard/brainflow
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../installed -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- name: Compile LSL submodule (Windows)
if: matrix.os == 'windows-2019'
run: |
cd src\applications\mne_scan\plugins\lsladapter\liblsl
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
cmake --build . --config Release --target install
- name: Compile LSL submodule (Linux|MacOS)
if: (matrix.os == 'ubuntu-20.04') || (matrix.os == 'macos-11')
run: |
cd src/applications/mne_scan/plugins/lsladapter/liblsl
mkdir build
cd build
cmake ..
cmake --build .
- name: Configure and compile MNE-CPP
run: |
./tools/build_project.bat all
- name: Deploy binaries
run: |
./tools/deploy.bat dynamic pack
MaxQtDynamic:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
qt: [5.15.2]
os: [ubuntu-latest, macos-11, windows-2019]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Python 3.7 version
uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- name: Install BrainFlow and LSL submodules
run: |
git submodule update --init src/applications/mne_scan/plugins/brainflowboard/brainflow
git submodule update --init src/applications/mne_scan/plugins/lsladapter/liblsl
- name: Install Qt (Linux|MacOS)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-11')
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt }}
modules: qtcharts
- name: Install Qt (Windows)
if: matrix.os == 'windows-2019'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt }}
arch: win64_msvc2019_64
modules: qtcharts
- name: Compile BrainFlow submodule (Windows)
if: matrix.os == 'windows-2019'
run: |
cd src\applications\mne_scan\plugins\brainflowboard\brainflow
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -DMSVC_RUNTIME=dynamic -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX="$env:GITHUB_WORKSPACE\applications\mne_scan\plugins\brainflowboard\brainflow\installed" ..
cmake --build . --target install --config Release
- name: Compile BrainFlow submodule (Linux|MacOS)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-11')
run: |
cd src/applications/mne_scan/plugins/brainflowboard/brainflow
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../installed -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
- name: Compile LSL submodule (Windows)
if: matrix.os == 'windows-2019'
run: |
cd src\applications\mne_scan\plugins\lsladapter\liblsl
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
cmake --build . --config Release --target install
- name: Compile LSL submodule (Linux|MacOS)
if: (matrix.os == 'ubuntu-latest') || (matrix.os == 'macos-11')
run: |
cd src/applications/mne_scan/plugins/lsladapter/liblsl
mkdir build
cd build
cmake ..
cmake --build .
- name: Configure and compile MNE-CPP
run: |
./tools/build_project.bat all
- name: Deploy binaries
run: |
./tools/deploy.bat dynamic pack
QtStatic:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Python 3.7 version
uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- name: Install OpenGL (Linux)
if: matrix.os == 'ubuntu-20.04'
run: |
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt-get update -q
sudo apt-get install build-essential libgl1-mesa-dev libicu55
- name: Install Qt (Linux)
if: matrix.os == 'ubuntu-20.04'
run: |
# Download the pre-built static version of Qt, which was created with the generateBinaries.yml workflow
wget -O qt5_5152_static_binaries_linux.tar.gz https://www.dropbox.com/s/tje7jp6tsn2dxdd/qt5_5152_static_binaries_linux.tar.gz?dl=0
mkdir ../Qt5_binaries
tar xvzf qt5_5152_static_binaries_linux.tar.gz -C ../ -P
- name: Install Qt (MacOS)
if: matrix.os == 'macos-11'
run: |
# Download the pre-built static version of Qt, which was created with the generateBinaries.yml workflow
wget -O qt5_5152_static_binaries_macos.tar.gz https://www.dropbox.com/s/ccigarxk40wlxq0/qt5_5152_static_binaries_macos.tar.gz?dl=1
tar xvzf qt5_5152_static_binaries_macos.tar.gz -P
- name: Install Qt (Windows)
if: matrix.os == 'windows-2019'
run: |
# Download the pre-built static version of Qt, which was created with the generateBinaries.yml workflow
Invoke-WebRequest https://www.dropbox.com/s/47s49smjg499gnm/qt5_5152_static_binaries_win.zip?dl=1 -OutFile .\qt5_5152_static_binaries_win.zip
expand-archive -path "qt5_5152_static_binaries_win.zip" -destinationpath "..\"
- name: Configure and compile MNE-CPP (Linux|MacOS)
if: (matrix.os == 'ubuntu-20.04') || (matrix.os == 'macos-11')
run: |
export QT_DIR="$(pwd)/../Qt5_binaries/lib/cmake/Qt5"
export Qt5_DIR="$(pwd)/../Qt5_binaries/lib/cmake/Qt5"
./tools/build_project.bat static all
- name: Configure and compile MNE-CPP (Windows)
if: matrix.os == 'windows-2019'
run: |
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
$env:QT_DIR += "$PWD\..\Qt5_binaries\lib\cmake\Qt5"
$env:Qt5_DIR += "$PWD\..\Qt5_binaries\lib\cmake\Qt5"
./tools/build_project.bat static all
- name: Deploy binaries
run: |
./tools/deploy.bat static pack
Tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 3
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Clone mne-cpp test data
run: git clone https://github.com/mne-tools/mne-cpp-test-data.git resources/data/mne-cpp-test-data
- name: Install Python 3.7 version
uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- name: Install Codecov
if: matrix.os == 'ubuntu-20.04'
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
echo "${pwd}" >> $GITHUB_PATH
- name: Install Qt (Linux|MacOS)
if: (matrix.os == 'ubuntu-20.04') || (matrix.os == 'macos-11')
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
modules: qtcharts
- name: Install Qt (Windows)
if: matrix.os == 'windows-2019'
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
arch: win64_msvc2019_64
modules: qtcharts
- name: Configure and compile MNE-CPP
if: (matrix.os == 'macos-11') || (matrix.os == 'windows-2019')
run: |
./tools/build_project.bat all
- name: Configure and compile MNE-CPP
if: matrix.os == 'ubuntu-20.04'
run: |
./tools/build_project.bat coverage all
- name: Run tests (Linux)
if: matrix.os == 'ubuntu-20.04'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
QTEST_FUNCTION_TIMEOUT: 900000
run: |
./tools/test_all.bat verbose withCoverage
- name: Run tests (MacOS)
if: matrix.os == 'macos-11'
env:
QTEST_FUNCTION_TIMEOUT: 900000
run: |
./tools/test_all.bat verbose
- name: Run tests (Windows)
if: matrix.os == 'windows-2019'
env:
QTEST_FUNCTION_TIMEOUT: 900000
run: |
./tools/test_all.bat Release verbose
Doxygen:
runs-on: ubuntu-20.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Qt Dev Tools, Doxygen and Graphviz
run: |
sudo apt-get update -q
sudo apt-get install -q qttools5-dev-tools doxygen graphviz
- name: Run Doxygen and package result
run: |
cd doc/doxygen
doxygen mne-cpp_doxyfile