Tiny fixups (#711) #2250
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
- 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 }} |