Increase estimate update time #16
Workflow file for this run
This file contains hidden or 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: 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: 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: Get source hash | |
| id: source-hash | |
| run: | | |
| hash=$(git ls-tree -r HEAD --name-only Source Plugins JuceLibraryCode CMakeLists.txt HelperFunctions.cmake | sha256sum | cut -d' ' -f1 | cut -c1-16) | |
| echo "hash=$hash" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Restore build cache | |
| uses: actions/cache@v4 | |
| id: build-cache | |
| with: | |
| path: Build | |
| key: windows-build-${{ steps.source-hash.outputs.hash }} | |
| restore-keys: | | |
| windows-build- | |
| - 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 | |
| if: steps.build-cache.outputs.cache-hit != 'true' | |
| run: | | |
| cd Build | |
| msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m | |
| - name: Save build cache | |
| if: steps.build-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: Build | |
| key: windows-build-${{ steps.source-hash.outputs.hash }} | |
| - name: Get plugin commit hashes | |
| id: plugin-hashes | |
| shell: bash | |
| run: | | |
| data_format_hash=$(git ls-remote https://github.com/open-ephys-plugins/open-ephys-data-format.git main | cut -f1 | cut -c1-16 | tr -d '\n') | |
| hdf5_hash=$(git ls-remote https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git main | cut -f1 | cut -c1-16 | tr -d '\n') | |
| nwb_hash=$(git ls-remote https://github.com/open-ephys-plugins/nwb-format.git main | cut -f1 | cut -c1-16 | tr -d '\n') | |
| echo "data-format=$data_format_hash" >> $GITHUB_OUTPUT | |
| echo "hdf5=$hdf5_hash" >> $GITHUB_OUTPUT | |
| echo "nwb=$nwb_hash" >> $GITHUB_OUTPUT | |
| - name: Restore open-ephys-data-format cache | |
| uses: actions/cache@v4 | |
| id: cache-data-format | |
| with: | |
| path: OEPlugins/open-ephys-data-format | |
| key: plugin-data-format-${{ steps.plugin-hashes.outputs.data-format }} | |
| restore-keys: | | |
| plugin-data-format- | |
| - name: Build open-ephys-data-format | |
| if: steps.cache-data-format.outputs.cache-hit != 'true' | |
| shell: powershell | |
| run: | | |
| New-Item -Path 'OEPlugins' -ItemType Directory -Force | |
| 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 | |
| $mainRepoPath = (Resolve-Path "..\..\").Path | |
| cmake -G "Visual Studio 17 2022" -A x64 -DPLUGIN_HEADER_PATH="$mainRepoPath\Plugins\Headers" -DJUCE_DIRECTORY="$mainRepoPath\JuceLibraryCode" .. | |
| msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m | |
| - name: Install open-ephys-data-format | |
| shell: powershell | |
| run: | | |
| cd OEPlugins\open-ephys-data-format\Build | |
| msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64 | |
| - name: Save open-ephys-data-format cache | |
| if: steps.cache-data-format.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: OEPlugins/open-ephys-data-format | |
| key: plugin-data-format-${{ steps.plugin-hashes.outputs.data-format }} | |
| - name: Restore OpenEphysHDF5Lib cache | |
| uses: actions/cache@v4 | |
| id: cache-hdf5 | |
| with: | |
| path: OEPlugins/OpenEphysHDF5Lib | |
| key: plugin-hdf5-${{ steps.plugin-hashes.outputs.hdf5 }} | |
| restore-keys: | | |
| plugin-hdf5- | |
| - name: Build OpenEphysHDF5Lib | |
| if: steps.cache-hdf5.outputs.cache-hit != 'true' | |
| shell: powershell | |
| run: | | |
| New-Item -Path 'OEPlugins' -ItemType Directory -Force | |
| git clone --branch main https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git OEPlugins\OpenEphysHDF5Lib | |
| cd OEPlugins\OpenEphysHDF5Lib\Build | |
| $mainRepoPath = (Resolve-Path "..\..\").Path | |
| cmake -G "Visual Studio 17 2022" -A x64 -DPLUGIN_HEADER_PATH="$mainRepoPath\Plugins\Headers" -DJUCE_DIRECTORY="$mainRepoPath\JuceLibraryCode" .. | |
| msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m | |
| - name: Install OpenEphysHDF5Lib | |
| shell: powershell | |
| run: | | |
| cd OEPlugins\OpenEphysHDF5Lib\Build | |
| msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64 | |
| - name: Save OpenEphysHDF5Lib cache | |
| if: steps.cache-hdf5.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: OEPlugins/OpenEphysHDF5Lib | |
| key: plugin-hdf5-${{ steps.plugin-hashes.outputs.hdf5 }} | |
| - name: Restore nwb-format cache | |
| uses: actions/cache@v4 | |
| id: cache-nwb | |
| with: | |
| path: OEPlugins/nwb-format | |
| key: plugin-nwb-${{ steps.plugin-hashes.outputs.nwb }} | |
| restore-keys: | | |
| plugin-nwb- | |
| - name: Build nwb-format | |
| if: steps.cache-nwb.outputs.cache-hit != 'true' | |
| shell: powershell | |
| run: | | |
| New-Item -Path 'OEPlugins' -ItemType Directory -Force | |
| git clone --branch main https://github.com/open-ephys-plugins/nwb-format.git OEPlugins\nwb-format | |
| cd OEPlugins\nwb-format\Build | |
| $mainRepoPath = (Resolve-Path "..\..\").Path | |
| cmake -G "Visual Studio 17 2022" -A x64 -DPLUGIN_HEADER_PATH="$mainRepoPath\Plugins\Headers" -DJUCE_DIRECTORY="$mainRepoPath\JuceLibraryCode" .. | |
| msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m | |
| - name: Install nwb-format | |
| shell: powershell | |
| run: | | |
| cd OEPlugins\nwb-format\Build | |
| msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64 | |
| - name: Save nwb-format cache | |
| if: steps.cache-nwb.outputs.cache-hit != 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: OEPlugins/nwb-format | |
| key: plugin-nwb-${{ steps.plugin-hashes.outputs.nwb }} | |
| - 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: Display Full Traceback | |
| if: failure() | |
| shell: powershell | |
| run: Get-Content "python_output.log" | |
| - name: Set timestamp | |
| shell: powershell | |
| id: timestamp | |
| run: | | |
| $timestamp = (Get-Date -Format 'yyyy_MM_dd_HH_mm_ss').Trim() | |
| "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 |