1+ name : Tests
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' JuceLibraryCode/**'
7+ - ' Plugins/**'
8+ - ' Resources/**'
9+ - ' Source/**'
10+ - ' CMakeLists.txt'
11+ - ' HelperFunctions.cmake'
12+ branches :
13+ - ' development'
14+ - ' testing'
15+
16+ jobs :
17+ unit-tests :
18+ name : Unit Tests
19+ runs-on : ubuntu-22.04
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+ - name : build
24+ env :
25+ CC : gcc-10
26+ CXX : g++-10
27+ run : |
28+ sudo apt update
29+ sudo ./Resources/Scripts/install_linux_dependencies.sh
30+ git apply Resources/Scripts/gha_unit_tests.patch
31+ cd Build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON ..
32+ make -j8
33+ - name : run tests
34+ run : |
35+ chmod +x ./Resources/Scripts/run_unit_tests_linux.sh
36+ ./Resources/Scripts/run_unit_tests_linux.sh Build/TestBin
37+ shell : bash
38+
39+ integration-tests :
40+ name : Integration Tests
41+ runs-on : windows-2022
42+
43+ steps :
44+ - uses : actions/checkout@v4
45+ with :
46+ fetch-depth : 0
47+ - name : Setup Python
48+ uses : actions/setup-python@v5
49+ with :
50+ python-version : ' 3.13'
51+ - name : Start Windows Audio Engine
52+ run : net start audiosrv
53+ - name : Install Scream
54+ shell : powershell
55+ run : |
56+ Start-Service audio*
57+ Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip
58+ Expand-7ZipArchive -Path C:\Scream3.6.zip -DestinationPath C:\Scream
59+ $cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate
60+ $store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine")
61+ $store.Open("ReadWrite")
62+ $store.Add($cert)
63+ $store.Close()
64+ cd C:\Scream\Install\driver
65+ C:\Scream\Install\helpers\devcon install Scream.inf *Scream
66+ - name : Show audio device
67+ run : Get-CimInstance Win32_SoundDevice | fl *
68+ - name : configure
69+ run : |
70+ cd Build
71+ cmake -G "Visual Studio 17 2022" -A x64 ..
72+ - name : Add msbuild to PATH
73+ 74+ - name : build
75+ run : |
76+ cd Build
77+ msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m
78+ - name : Install open-ephys-data-format
79+ shell : powershell
80+ run : |
81+ New-Item -Path '..\OEPlugins' -ItemType Directory
82+ git clone --branch main https://github.com/open-ephys-plugins/open-ephys-data-format.git ..\OEPlugins\open-ephys-data-format
83+ cd ..\OEPlugins\open-ephys-data-format\Build
84+ cmake -G "Visual Studio 17 2022" -A x64 ..
85+ msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
86+ - name : Install OpenEphysHDF5Lib
87+ shell : powershell
88+ run : |
89+ git clone --branch main https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git ..\OEPlugins\OpenEphysHDF5Lib
90+ cd ..\OEPlugins\OpenEphysHDF5Lib\Build
91+ cmake -G "Visual Studio 17 2022" -A x64 ..
92+ msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
93+ - name : Install nwb-format
94+ shell : powershell
95+ run : |
96+ git clone --branch main https://github.com/open-ephys-plugins/nwb-format.git ..\OEPlugins\nwb-format
97+ cd ..\OEPlugins\nwb-format\Build
98+ cmake -G "Visual Studio 17 2022" -A x64 ..
99+ msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
100+ - name : Install test-suite
101+ shell : powershell
102+ run : |
103+ git clone --branch main https://github.com/open-ephys/open-ephys-python-tools.git C:\open-ephys-python-tools
104+ cd C:\open-ephys-python-tools
105+ pip install -e .
106+ pip install psutil
107+ - name : Run Tests
108+ shell : powershell
109+ run : |
110+ New-Item -Path 'C:\open-ephys\data' -ItemType Directory
111+ git clone --branch main https://github.com/open-ephys/open-ephys-test-suite.git C:\test-suite
112+ cd C:\test-suite
113+ $process = Start-Process -FilePath "Build\Release\open-ephys.exe" -ArgumentList "Build\Release\configs\file_reader_config.xml" -NoNewWindow -PassThru
114+ Write-Host "Started open-ephys process with ID: $($process.Id)"
115+ Start-Sleep -Seconds 10
116+ Write-Host "Starting Python script..."
117+ python run_all.py 2>&1 | Tee-Object -FilePath "python_output.log"
118+ Write-Host "Python script completed. Output saved to python_output.log"
119+ Stop-Process -Id $process.Id -Force
120+ env :
121+ OE_WINDOWS_GITHUB_RECORD_PATH : C:\open-ephys\data
122+ - name : Set timestamp
123+ shell : powershell
124+ id : timestamp
125+ run : |
126+ $timestamp = Get-Date -Format 'yyyy_MM_dd_HH_mm_ss'
127+ "timestamp=$timestamp" >> $env:GITHUB_OUTPUT
128+ - name : Upload test results
129+ uses : actions/upload-artifact@v4
130+ with :
131+ name : windows_${{ steps.timestamp.outputs.timestamp }}.log
132+ path : python_output.log
133+ retention-days : 7
0 commit comments