-
Notifications
You must be signed in to change notification settings - Fork 700
133 lines (128 loc) · 5.01 KB
/
tests.yml
File metadata and controls
133 lines (128 loc) · 5.01 KB
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
name: Tests
on:
pull_request:
paths:
- 'JuceLibraryCode/**'
- 'Plugins/**'
- 'Resources/**'
- 'Source/**'
- 'CMakeLists.txt'
- 'HelperFunctions.cmake'
branches:
- 'development'
- 'testing'
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: build
env:
CC: gcc-10
CXX: g++-10
run: |
sudo apt update
sudo ./Resources/Scripts/install_linux_dependencies.sh
git apply Resources/Scripts/gha_unit_tests.patch
cd Build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON ..
make -j8
- name: run tests
run: |
chmod +x ./Resources/Scripts/run_unit_tests_linux.sh
./Resources/Scripts/run_unit_tests_linux.sh Build/TestBin
shell: bash
integration-tests:
name: Integration Tests
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Start Windows Audio Engine
run: net start audiosrv
- name: Install Scream
shell: powershell
run: |
Start-Service audio*
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip
Expand-7ZipArchive -Path C:\Scream3.6.zip -DestinationPath C:\Scream
$cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate
$store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine")
$store.Open("ReadWrite")
$store.Add($cert)
$store.Close()
cd C:\Scream\Install\driver
C:\Scream\Install\helpers\devcon install Scream.inf *Scream
- name: Show audio device
run: Get-CimInstance Win32_SoundDevice | fl *
- name: configure
run: |
cd Build
cmake -G "Visual Studio 17 2022" -A x64 ..
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: build
run: |
cd Build
msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m
- name: Install open-ephys-data-format
shell: powershell
run: |
New-Item -Path '..\OEPlugins' -ItemType Directory
git clone --branch main https://github.com/open-ephys-plugins/open-ephys-data-format.git ..\OEPlugins\open-ephys-data-format
cd ..\OEPlugins\open-ephys-data-format\Build
cmake -G "Visual Studio 17 2022" -A x64 ..
msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
- name: Install OpenEphysHDF5Lib
shell: powershell
run: |
git clone --branch main https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git ..\OEPlugins\OpenEphysHDF5Lib
cd ..\OEPlugins\OpenEphysHDF5Lib\Build
cmake -G "Visual Studio 17 2022" -A x64 ..
msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
- name: Install nwb-format
shell: powershell
run: |
git clone --branch main https://github.com/open-ephys-plugins/nwb-format.git ..\OEPlugins\nwb-format
cd ..\OEPlugins\nwb-format\Build
cmake -G "Visual Studio 17 2022" -A x64 ..
msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
- name: Install test-suite
shell: powershell
run: |
git clone --branch main https://github.com/open-ephys/open-ephys-python-tools.git C:\open-ephys-python-tools
cd C:\open-ephys-python-tools
pip install -e .
pip install psutil
- name: Run Tests
shell: powershell
run: |
New-Item -Path 'C:\open-ephys\data' -ItemType Directory
git clone --branch main https://github.com/open-ephys/open-ephys-test-suite.git C:\test-suite
cd C:\test-suite
$process = Start-Process -FilePath "Build\Release\open-ephys.exe" -ArgumentList "Build\Release\configs\file_reader_config.xml" -NoNewWindow -PassThru
Write-Host "Started open-ephys process with ID: $($process.Id)"
Start-Sleep -Seconds 10
Write-Host "Starting Python script..."
python run_all.py 2>&1 | Tee-Object -FilePath "python_output.log"
Write-Host "Python script completed. Output saved to python_output.log"
Stop-Process -Id $process.Id -Force
env:
OE_WINDOWS_GITHUB_RECORD_PATH: C:\open-ephys\data
- name: Set timestamp
shell: powershell
id: timestamp
run: |
$timestamp = Get-Date -Format 'yyyy_MM_dd_HH_mm_ss'
"timestamp=$timestamp" >> $env:GITHUB_OUTPUT
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: windows_${{ steps.timestamp.outputs.timestamp }}.log
path: python_output.log
retention-days: 7