-
-
Notifications
You must be signed in to change notification settings - Fork 330
304 lines (300 loc) · 14.3 KB
/
run_windows.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
297
298
299
300
301
302
303
304
name: Run Windows
on: [push, pull_request]
jobs:
RunWindows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [windows-2022]
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Install dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Set Version
id: version
run: if ("tag" -eq $Env:GITHUB_REF_TYPE) { echo "::set-output name=version::$Env:GITHUB_REF_NAME" } else { echo "::set-output name=version::$Env:GITHUB_SHA" }
- name: Check Version
run: echo ${{ steps.version.outputs.version }}
- name: Set Path
run: |
echo %GITHUB_WORKSPACE%\tools>>%GITHUB_PATH%
echo %GITHUB_WORKSPACE%\installed64\lib>>%GITHUB_PATH%
echo %GITHUB_WORKSPACE%\installed32\lib>>%GITHUB_PATH%
shell: cmd
- name: Install JDK 11
uses: actions/setup-java@v1
with:
java-version: 11.0.3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly
components: cargo,rustc,rust-std
# compile and prepare everything
- name: Compile x32
run: |
mkdir %GITHUB_WORKSPACE%\build32
cd %GITHUB_WORKSPACE%\build32
cmake -DBRAINFLOW_VERSION=%BRAINFLOW_VERSION% -DBUILD_OYMOTION_SDK=ON -DBUILD_ONNX=ON -DBUILD_BLE=ON -DBUILD_BLUETOOTH=ON -DWARNINGS_AS_ERRORS=ON -G "Visual Studio 17 2022" -A Win32 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX=..\installed32\ ..
cmake --build . --target install --config Release -j 2 --parallel 2
env:
BRAINFLOW_VERSION: ${{ steps.version.outputs.version }}
shell: cmd
- name: Compile x64
run: |
mkdir %GITHUB_WORKSPACE%\build64
cd %GITHUB_WORKSPACE%\build64
cmake -DBRAINFLOW_VERSION=%BRAINFLOW_VERSION% -DBUILD_OYMOTION_SDK=ON -DBUILD_ONNX=ON -DBUILD_BLE=ON -DBUILD_BLUETOOTH=ON -DWARNINGS_AS_ERRORS=ON -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX=..\installed64\ ..
cmake --build . --target install --config Release -j 2 --parallel 2
env:
BRAINFLOW_VERSION: ${{ steps.version.outputs.version }}
shell: cmd
- name: C# build
run: |
cd %GITHUB_WORKSPACE%\csharp_package\brainflow
dotnet restore brainflow.sln
msbuild brainflow.sln /p:Configuration=Release /p:Platform="Any CPU"
shell: cmd
- name: Install Emulator
run: |
pip install %GITHUB_WORKSPACE%\emulator\
cd %GITHUB_WORKSPACE%
.\emulator\brainflow_emulator\com0com\certmgr.exe /add %GITHUB_WORKSPACE%\emulator\brainflow_emulator\com0com\com0com.cer /s /r localMachine root
.\emulator\brainflow_emulator\com0com\certmgr.exe /add %GITHUB_WORKSPACE%\emulator\brainflow_emulator\com0com\com0com.cer /s /r localMachine trustedpublisher
shell: cmd
- name: Install Python package
run: |
pip install %GITHUB_WORKSPACE%\python_package\
pip install -r %GITHUB_WORKSPACE%\python_package\examples\tests\requirements.txt
shell: cmd
- name: Install Rust package
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
rustup toolchain install nightly
cargo +nightly build
shell: cmd
- name: Build Cpp Get Data Test x64
run: |
mkdir %GITHUB_WORKSPACE%\cpp_package\examples\get_data\build
cd %GITHUB_WORKSPACE%\cpp_package\examples\get_data\build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_PREFIX_PATH=%GITHUB_WORKSPACE%\installed64\ ..
cmake --build . --config Release -j 2 --parallel 2
shell: cmd
- name: Build Cpp Signal Processing Test x64
run: |
mkdir %GITHUB_WORKSPACE%\cpp_package\examples\signal_processing\build
cd %GITHUB_WORKSPACE%\cpp_package\examples\signal_processing\build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_PREFIX_PATH=%GITHUB_WORKSPACE%\installed64\ ..
cmake --build . --config Release -j 2 --parallel 2
shell: cmd
- name: Build Cpp ML Test x64
run: |
mkdir %GITHUB_WORKSPACE%\cpp_package\examples\ml\build
cd %GITHUB_WORKSPACE%\cpp_package\examples\ml\build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_PREFIX_PATH=%GITHUB_WORKSPACE%\installed64\ ..
cmake --build . --config Release -j 2 --parallel 2
shell: cmd
- name: Build Cpp ML Test x32
run: |
mkdir %GITHUB_WORKSPACE%\cpp_package\examples\ml\build32
cd %GITHUB_WORKSPACE%\cpp_package\examples\ml\build32
cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_PREFIX_PATH=%GITHUB_WORKSPACE%\installed32\ ..
cmake --build . --config Release -j 2 --parallel 2
shell: cmd
- name: Build Java Package
run: |
cd %GITHUB_WORKSPACE%\java_package\brainflow
mvn package
shell: cmd
- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
version: 1.3.1
# BoardController testing
- name: Run Julia Tests
run: |
cd %GITHUB_WORKSPACE%\julia_package\brainflow
julia --project=. -e "import Pkg; Pkg.test()"
shell: cmd
- name: Cyton Windows Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_get_data.py --board-id 0 --serial-port
shell: cmd
- name: Cyton Windows Python Test Commands
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\python_package\examples\tests\cyton_commands.py --serial-port
shell: cmd
- name: Cyton Multiboard Windows Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_multiboard_get_data.py --board-id 0 --serial-port
shell: cmd
- name: Cyton Windows Cpp Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py %GITHUB_WORKSPACE%\cpp_package\examples\get_data\build\Release\brainflow_get_data.exe --board-id 0 --serial-port
shell: cmd
- name: Cyton Windows C# Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py %GITHUB_WORKSPACE%\csharp_package\brainflow\examples\brainflow_get_data\bin\Release\net7.0\brainflow_get_data.exe --board-id 0 --serial-port
shell: cmd
- name: Synthetic Windows Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_get_data.py --board-id -1
shell: cmd
- name: Synthetic Windows Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=get_data
shell: cmd
- name: Synthetic Windows Rust Test Markers
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=markers
shell: cmd
- name: Synthetic Windows Cpp Test
run: .\cpp_package\examples\get_data\build\Release\brainflow_get_data.exe --board-id -1
shell: cmd
- name: Synthetic Windows C# Test
run: |
cd %GITHUB_WORKSPACE%\csharp_package\brainflow\examples\brainflow_get_data\bin\Release\net7.0\
brainflow_get_data.exe --board-id -1
shell: cmd
- name: Cyton Daisy Windows Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_get_data.py --board-id 2 --serial-port
shell: cmd
- name: Cyton Daisy Multiboard Windows Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_multiboard_get_data.py --board-id 2 --serial-port
shell: cmd
- name: Cyton Daisy Windows Cpp Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py %GITHUB_WORKSPACE%\cpp_package\examples\get_data\build\Release\brainflow_get_data.exe --board-id 2 --serial-port
shell: cmd
- name: Cyton Daisy Windows C# Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py %GITHUB_WORKSPACE%\csharp_package\brainflow\examples\brainflow_get_data\bin\Release\net7.0\brainflow_get_data.exe --board-id 2 --serial-port
shell: cmd
- name: Galea Windows Cpp Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\galea_udp.py %GITHUB_WORKSPACE%\cpp_package\examples\get_data\build\Release\brainflow_get_data.exe --board-id 3 --ip-address 127.0.0.1
shell: cmd
- name: Galea Windows C# Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\galea_udp.py %GITHUB_WORKSPACE%\csharp_package\brainflow\examples\brainflow_get_data\bin\Release\net7.0\brainflow_get_data.exe --board-id 3 --ip-address 127.0.0.1
shell: cmd
- name: FreeEEG32 Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\freeeeg32_windows.py python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_get_data.py --board-id 17 --serial-port
shell: cmd
# Signal Processing Testing
- name: Serialization Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=read_write_file
shell: cmd
- name: Denoising Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=denoising
shell: cmd
- name: Downsampling Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=downsampling
shell: cmd
- name: Filtering Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=signal_filtering
shell: cmd
- name: Transforms Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=transforms
shell: cmd
- name: Denoising Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\denoising.py
shell: cmd
- name: Serialization Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\serialization.py
shell: cmd
- name: Filtering Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\signal_filtering.py
shell: cmd
- name: Transforms Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\transforms.py
shell: cmd
- name: Downsampling Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\downsampling.py
shell: cmd
- name: CSP Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\csp.py
shell: cmd
- name: Windowing Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\windowing.py
shell: cmd
- name: BrainFlow to MNE Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\brainflow_to_mne.py
shell: cmd
- name: Denoising Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\denoising.exe
shell: cmd
- name: Downsampling Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\downsampling.exe
shell: cmd
- name: CSP Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\csp.exe
shell: cmd
- name: Windowing Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\windowing.exe
shell: cmd
- name: Transforms Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\transforms.exe
shell: cmd
- name: Filtering Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\signal_filtering.exe
shell: cmd
- name: Serialization Cpp Test
run: .\cpp_package\examples\signal_processing\build\Release\serialization.exe
shell: cmd
- name: ICA C# Test
run: .\csharp_package\brainflow\examples\ica\bin\Release\net7.0\ica.exe
shell: cmd
# Tests for MLModule
- name: EEG Metrics Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\eeg_metrics.py --board-id -1
shell: cmd
- name: EEG Metrics CI Python Test
run: python %GITHUB_WORKSPACE%\python_package\examples\tests\eeg_metrics_ci.py --board-id -1 --metric 2 --classifier 2 --model-file %GITHUB_WORKSPACE%\src\ml\train\logreg_mindfulness.onnx
shell: cmd
- name: EEG Metrics CI Cpp Test
run: .\cpp_package\examples\ml\build\Release\eeg_metrics_ci.exe --board-id -1 --metric 2 --classifier 2 --model-file %GITHUB_WORKSPACE%\src\ml\train\logreg_mindfulness.onnx
shell: cmd
- name: EEG Metrics CI Cpp x32 Test
run: .\cpp_package\examples\ml\build32\Release\eeg_metrics_ci.exe --board-id -1 --metric 2 --classifier 2 --model-file %GITHUB_WORKSPACE%\src\ml\train\logreg_mindfulness.onnx
shell: cmd
- name: EEG Metrics C# Test
run: .\csharp_package\brainflow\examples\eeg_metrics\bin\Release\net7.0\eeg_metrics.exe
shell: cmd
- name: EEG Metrics CI C# Test
run: .\csharp_package\brainflow\examples\eeg_metrics_ci\bin\Release\net7.0\eeg_metrics_ci.exe --board-id -1 --metric 2 --classifier 2 --model-file %GITHUB_WORKSPACE%\src\ml\train\logreg_mindfulness.onnx
shell: cmd
- name: EEG Metrics CI Rust Test
run: |
cd %GITHUB_WORKSPACE%\rust_package\brainflow
cargo run --example=eeg_metrics
shell: cmd
# Start Deploy Stage
- name: Install Python AWS Tools
run: |
python -m pip install awscli
shell: cmd
- name: Upload x86 Libs to AWS
if: ${{ github.event_name == 'push' && github.repository == 'brainflow-dev/brainflow' }}
run: |
aws s3 cp %GITHUB_WORKSPACE%\installed32\ s3://brainflow/%GITHUB_SHA%/win32 --recursive
shell: cmd
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Upload x64 Libs to AWS
if: ${{ github.event_name == 'push' && github.repository == 'brainflow-dev/brainflow' }}
run: |
aws s3 cp %GITHUB_WORKSPACE%\installed64\ s3://brainflow/%GITHUB_SHA%/win64 --recursive
shell: cmd
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}