Skip to content

add catch for Nonetype #10

add catch for Nonetype

add catch for Nonetype #10

Workflow file for this run

name: Run Windows
on: [push, pull_request]
jobs:
RunWindows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [windows-2019]
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- 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: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11.0.3
# compile and prepare everything
- name: Compile x32
run: |
mkdir %GITHUB_WORKSPACE%\build32
cd %GITHUB_WORKSPACE%\build32
cmake -DBUILD_OYMOTION_SDK=ON -DBUILD_BLUETOOTH=ON -DWARNINGS_AS_ERRORS=ON -G "Visual Studio 16 2019" -A Win32 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX=..\installed32\ ..
cmake --build . --target install --config Release -j 2 --parallel 2
shell: cmd
- name: Compile x64
run: |
mkdir %GITHUB_WORKSPACE%\build64
cd %GITHUB_WORKSPACE%\build64
cmake -DBUILD_OYMOTION_SDK=ON -DWARNINGS_AS_ERRORS=ON -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX=..\installed64\ ..
cmake --build . --target install --config Release -j 2 --parallel 2
shell: cmd
- name: C# build
run: |
cd %GITHUB_WORKSPACE%\csharp-package\brainflow
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%\tests\python\requirements.txt
shell: cmd
- name: Build Cpp Get Data Test x64
run: |
mkdir %GITHUB_WORKSPACE%\tests\cpp\get_data_demo\build
cd %GITHUB_WORKSPACE%\tests\cpp\get_data_demo\build
cmake -G "Visual Studio 16 2019" -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%\tests\cpp\signal_processing_demo\build
cd %GITHUB_WORKSPACE%\tests\cpp\signal_processing_demo\build
cmake -G "Visual Studio 16 2019" -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%\tests\cpp\ml_demo\build
cd %GITHUB_WORKSPACE%\tests\cpp\ml_demo\build
cmake -G "Visual Studio 16 2019" -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%\tests\cpp\ml_demo\build32
cd %GITHUB_WORKSPACE%\tests\cpp\ml_demo\build32
cmake -G "Visual Studio 16 2019" -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%\tests\python\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%\tests\python\cyton_commands.py --serial-port
shell: cmd
- name: Cyton Windows Python Test with Streamer
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id 0 --streamer-params file://file_streamer.csv:w --serial-port
shell: cmd
- name: Cyton Multiboard Windows Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\tests\python\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%\tests\cpp\get_data_demo\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\tests\brainflow_get_data\bin\Release\test.exe --board-id 0 --serial-port
shell: cmd
- name: Synthetic Windows Python Test
run: python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id -1
shell: cmd
- name: Synthetic Windows Python Test with Streamer
run: python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id -1 --streamer-params file://file_streamer.csv:w
shell: cmd
- name: Synthetic Windows Cpp Test
run: .\tests\cpp\get_data_demo\build\Release\brainflow_get_data.exe --board-id -1
shell: cmd
- name: Synthetic Windows C# Test
run: |
cd %GITHUB_WORKSPACE%\csharp-package\brainflow\tests\brainflow_get_data\bin\Release
test.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%\tests\python\brainflow_get_data.py --board-id 2 --serial-port
shell: cmd
- name: Cyton Daisy Windows Python Test with Streamer
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id 2 --streamer-params file://file_streamer.csv:w --serial-port
shell: cmd
- name: Cyton Daisy Multiboard Windows Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\cyton_windows.py python %GITHUB_WORKSPACE%\tests\python\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%\tests\cpp\get_data_demo\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\tests\brainflow_get_data\bin\Release\test.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%\tests\cpp\get_data_demo\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\tests\brainflow_get_data\bin\Release\test.exe --board-id 3 --ip-address 127.0.0.1
shell: cmd
#- name: Fascia Python Test
# run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\fascia_emulator_ci.py python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id 12 --ip-port 7789
# shell: cmd
- name: IronBCI Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\ironbci_windows.py python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id 15 --serial-port
shell: cmd
- name: FreeEEG32 Python Test
run: python %GITHUB_WORKSPACE%\emulator\brainflow_emulator\freeeeg32_windows.py python %GITHUB_WORKSPACE%\tests\python\brainflow_get_data.py --board-id 17 --serial-port
shell: cmd
# Signal Processing Testing
- name: Denoising Python Test
run: python %GITHUB_WORKSPACE%\tests\python\denoising.py
shell: cmd
- name: Serialization Python Test
run: python %GITHUB_WORKSPACE%\tests\python\serialization.py
shell: cmd
- name: Filtering Python Test
run: python %GITHUB_WORKSPACE%\tests\python\signal_filtering.py
shell: cmd
- name: Transforms Python Test
run: python %GITHUB_WORKSPACE%\tests\python\transforms.py
shell: cmd
- name: Downsampling Python Test
run: python %GITHUB_WORKSPACE%\tests\python\downsampling.py
shell: cmd
- name: CSP Python Test
run: python %GITHUB_WORKSPACE%\tests\python\csp.py
shell: cmd
- name: Windowing Python Test
run: python %GITHUB_WORKSPACE%\tests\python\windowing.py
shell: cmd
- name: BrainFlow to MNE Python Test
run: python %GITHUB_WORKSPACE%\tests\python\brainflow_to_mne.py
shell: cmd
- name: Denoising Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\denoising.exe
shell: cmd
- name: Downsampling Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\downsampling.exe
shell: cmd
- name: CSP Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\csp.exe
shell: cmd
- name: Windowing Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\windowing.exe
shell: cmd
- name: Transforms Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\transforms.exe
shell: cmd
- name: Filtering Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\signal_filtering.exe
shell: cmd
- name: Serialization Cpp Test
run: .\tests\cpp\signal_processing_demo\build\Release\serialization.exe
shell: cmd
# Tests for MLModule
- name: EEG Metrics Python Test
run: python %GITHUB_WORKSPACE%\tests\python\eeg_metrics.py --board-id -1
shell: cmd
- name: EEG Metrics CI Python Test
run: python %GITHUB_WORKSPACE%\tests\python\eeg_metrics_ci.py --board-id -1 --metric 0 --classifier 2
shell: cmd
- name: EEG Metrics CI Cpp Test
run: .\tests\cpp\ml_demo\build\Release\eeg_metrics_ci.exe --board-id -1 --metric 1 --classifier 2
shell: cmd
- name: EEG Metrics CI Cpp x32 Test
run: .\tests\cpp\ml_demo\build32\Release\eeg_metrics_ci.exe --board-id -1 --metric 1 --classifier 2
shell: cmd
- name: EEG Metrics CI C# Test
run: .\csharp-package\brainflow\tests\eeg_metrics\bin\Release\test.exe
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 }}