Added support for bruker qTOF files #1328
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: Install and Run | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| DOTNET_VERSION: 10.0.x | |
| DOTNET_FRAMEWORK: net10.0 | |
| jobs: | |
| install: | |
| name: Create Installer Artifact | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Restore dependencies | |
| run: dotnet restore ./MetaMorpheus/MetaMorpheus.sln | |
| - name: Build solution | |
| run: dotnet msbuild -v:minimal -p:Configuration=Release -p:UseSharedCompilation=false ./MetaMorpheus/ | |
| - name: Build installer | |
| run: | | |
| msbuild ./MetaMorpheus/MetaMorpheusSetup/MetaMorpheusSetup.wixproj /p:Configuration=Release /verbosity=minimal /p:UseSharedCompilation=false | |
| msbuild ./MetaMorpheus/Bootstrapper/Bootstrapper.wixproj /p:Configuration=Release /p:UseSharedCompilation=false | |
| - name: Verify installer exists | |
| run: | | |
| if (!(Test-Path "./MetaMorpheus/MetaMorpheusSetup/bin/Release/MetaMorpheusInstaller.msi")) { | |
| Write-Host "❌ Installer build failed: MetaMorpheusInstaller.msi not found." -ForegroundColor Red | |
| exit 1 | |
| } | |
| - name: Zip command-line version | |
| run: | | |
| 7z a MetaMorpheus_CommandLine.zip .\MetaMorpheus\CMD\bin\Release\$env:DOTNET_FRAMEWORK\* "-x!*.xml" | |
| # check that installer is greater than 1 kb to avoid pushing an empty artifact | |
| - name: Validate command-line zip artifact | |
| run: | | |
| if ((Get-Item MetaMorpheus_CommandLine.zip).length -lt 1kb) { | |
| Write-Host "❌ The build failed because the command-line .zip did not build properly; it is empty." -ForegroundColor Red | |
| exit 1 | |
| } | |
| - name: Upload installer artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MetaMorpheusInstaller | |
| path: ./MetaMorpheus/MetaMorpheusSetup/bin/Release/MetaMorpheusInstaller.msi | |
| - name: Upload command-line zip artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MetaMorpheus_CommandLine | |
| path: MetaMorpheus_CommandLine.zip | |
| test_installer: | |
| name: Search with Installed | |
| runs-on: windows-latest | |
| needs: install | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Download installer artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: MetaMorpheusInstaller | |
| - name: Install MetaMorpheus MSI | |
| run: | | |
| Start-Process -FilePath msiexec.exe -ArgumentList "/i `"$(Get-Location)\MetaMorpheusInstaller.msi`" /qn /l*v install.log" -Wait | |
| - name: Display workspace directory tree | |
| run: | | |
| function Show-Tree ($path, $indent = "") { | |
| Get-ChildItem -LiteralPath $path | ForEach-Object { | |
| Write-Host "$indent|- $($_.Name)" | |
| if ($_.PSIsContainer) { | |
| Show-Tree -path $_.FullName -indent ("$indent ") | |
| } | |
| } | |
| } | |
| $workspace = Get-Location | |
| Write-Host "Workspace directory tree for: $workspace" | |
| Show-Tree $workspace | |
| - name: Microvinette with installed CMD.exe | |
| run: | | |
| $dataDir = "$(Get-Location)\MetaMorpheus\MetaMorpheus\Test\TestData" | |
| & "C:\Program Files\MetaMorpheus\CMD.exe" --test -o "$dataDir\exe_output" -v minimal | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "❌ CMD.exe search failed with exit code $LASTEXITCODE" -ForegroundColor Red | |
| exit $LASTEXITCODE | |
| } | |
| - name: Generate Default TOMLs with installed CMD.dll | |
| run: | | |
| dotnet "C:\Program Files\MetaMorpheus\CMD.dll" -g -o "$(Get-Location)\MetaMorpheus\EngineLayer\Data" | |
| - name: Run search with installed CMD.dll | |
| run: | | |
| $dataDir = "$(Get-Location)\MetaMorpheus\EngineLayer\Data" | |
| dotnet "C:\Program Files\MetaMorpheus\CMD.dll" -s "$dataDir\SmallCalibratible_Yeast.mzML" -d "$dataDir\SmallYeast.fasta" -t "$dataDir\SearchTask.toml" -o "$dataDir\dll_output" -v minimal | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "❌ CMD.dll search failed with exit code $LASTEXITCODE" -ForegroundColor Red | |
| exit $LASTEXITCODE | |
| } | |
| test_build: | |
| name: Search with Built | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore ./MetaMorpheus/MetaMorpheus.sln | |
| - name: Build solution | |
| run: dotnet msbuild -v:minimal -p:Configuration=Release -p:UseSharedCompilation=false ./MetaMorpheus/ | |
| - name: Generate Default TOMLs | |
| run: | | |
| dotnet "$(Get-Location)\MetaMorpheus\CMD\bin\Release\$env:DOTNET_FRAMEWORK\CMD.dll" -g -o "$(Get-Location)\MetaMorpheus\CMD\bin\Release\$env:DOTNET_FRAMEWORK\Data" | |
| - name: Run search with built CMD.dll | |
| run: | | |
| $dataDir = "$(Get-Location)\MetaMorpheus\CMD\bin\Release\$env:DOTNET_FRAMEWORK\Data" | |
| dotnet "$(Get-Location)\MetaMorpheus\CMD\bin\Release\$env:DOTNET_FRAMEWORK\CMD.dll" -s "$dataDir\SmallCalibratible_Yeast.mzML" -d "$dataDir\SmallYeast.fasta" -t "$dataDir\SearchTask.toml" -o "$dataDir\built_dll_output" -v minimal | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Host "❌ Built CMD.dll search failed with exit code $LASTEXITCODE" -ForegroundColor Red | |
| exit $LASTEXITCODE | |
| } | |
| ## Installs and builds. Verifies that the same dlls exist | |
| validate_installer_contents: | |
| name: Validate Installer Contents | |
| runs-on: windows-latest | |
| needs: install | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Download installer artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: MetaMorpheusInstaller | |
| - name: Install MetaMorpheus MSI | |
| run: | | |
| Start-Process -FilePath msiexec.exe -ArgumentList "/i `"$(Get-Location)\MetaMorpheusInstaller.msi`" /qn /l*v install.log" -Wait | |
| - name: Restore dependencies | |
| run: dotnet restore ./MetaMorpheus/MetaMorpheus.sln | |
| - name: Build solution | |
| run: dotnet msbuild -v:minimal -p:Configuration=Release -p:UseSharedCompilation=false ./MetaMorpheus/ | |
| - name: Compare built DLLs to installed DLLs | |
| run: | | |
| $buildDir = $repoDir = Get-Location | |
| $installDir = "C:\Program Files\MetaMorpheus" | |
| # Get DLL names | |
| $buildDlls = Get-ChildItem -Path $buildDir -Filter *.dll | Select-Object -ExpandProperty Name | |
| $installedDlls = Get-ChildItem -Path $installDir -Filter *.dll | Select-Object -ExpandProperty Name | |
| # Define whitelist for missing DLLs (build-only) - Okay to not be installed | |
| $whitelistedMissingDlls = @( | |
| "System.Configuration.ConfigurationManager.dll", | |
| "System.Security.Cryptography.ProtectedData.dll", | |
| # Same EntityFramework 4.7.0 chain as the two below, and it reaches the build only | |
| # through mzLib's nuspec. Installing it would ship a 2019 binary in place of the | |
| # 8.0.0.0 the MSI used to carry; smith-chem-wisc/mzLib#1142 removes it at source. | |
| "System.Drawing.Common.dll", | |
| "System.Security.Permissions.dll", | |
| "System.Windows.Extensions.dll", | |
| # The EF6 chain itself, no longer shipped in the MSI. Nothing in MetaMorpheus uses | |
| # EntityFramework, and #2710 dropped the System.Data.SQLite metapackage that was its | |
| # only direct source; it now reaches the build only transitively, through mzLib | |
| # 1.0.584, whose published nuspec predates smith-chem-wisc/mzLib#1142. These four | |
| # entries become dead and should be swept when MetaMorpheus moves to a post-#1142 | |
| # mzLib. sni.dll rides the same chain but lives in runtimes\win-x64\native\, which | |
| # the non-recursive scan below never sees -- it needs an entry only if #2690 lands. | |
| "EntityFramework.dll", | |
| "EntityFramework.SqlServer.dll", | |
| "System.Data.SqlClient.dll", | |
| "System.Data.SQLite.EF6.dll", | |
| "Microsoft.Win32.SystemEvents.dll", | |
| "Microsoft.Extensions.DependencyInjection.Abstractions.dll", | |
| "Microsoft.Extensions.DependencyInjection.dll", | |
| "Microsoft.Extensions.Logging.Abstractions.dll", | |
| "Microsoft.Extensions.Logging.dll", | |
| "Microsoft.Extensions.Options.dll", | |
| "Microsoft.Extensions.Primitives.dll" | |
| ) | |
| # Define whitelist for extra DLLs (install-only) | |
| $whitelistedExtraDlls = @( | |
| ) | |
| # Get all unique DLLs in the entire build repository | |
| # Define which folders to check in the repo | |
| $foldersToCheck = @( | |
| "$(Get-Location)\MetaMorpheus\EngineLayer\bin\Release\$env:DOTNET_FRAMEWORK", | |
| "$(Get-Location)\MetaMorpheus\CMD\bin\Release\$env:DOTNET_FRAMEWORK", | |
| "$(Get-Location)\MetaMorpheus\TaskLayer\bin\Release\$env:DOTNET_FRAMEWORK", | |
| "$(Get-Location)\MetaMorpheus\GUI\bin\Release\$env:DOTNET_FRAMEWORK-windows", | |
| "$(Get-Location)\MetaMorpheus\GuiFunctions\bin\Release\$env:DOTNET_FRAMEWORK-windows" | |
| ) | |
| # Collect DLLs and their source folders | |
| $buildDlls = @() | |
| $buildDllLocations = @{} | |
| # A folder that is not there means this list has drifted from where the projects | |
| # actually build, and the check quietly covers less than it claims. GuiFunctions was | |
| # in that state: it targets net<n>.0-windows but was looked for under net<n>.0, so | |
| # nothing it produces was ever validated. | |
| $missingFolders = $foldersToCheck | Where-Object { -not (Test-Path $_) } | |
| if ($missingFolders) { | |
| Write-Host "::error::Build folders not found, so this check would be incomplete:" | |
| $missingFolders | ForEach-Object { Write-Host " - $_" } | |
| exit 1 | |
| } | |
| foreach ($folder in $foldersToCheck) { | |
| if (Test-Path $folder) { | |
| Get-ChildItem -Path $folder -Filter *.dll | ForEach-Object { | |
| $dllName = $_.Name | |
| $buildDlls += $dllName | |
| $buildDllLocations[$dllName] = $folder | |
| } | |
| } | |
| } | |
| $buildDlls = $buildDlls | Sort-Object -Unique | |
| # Get installed DLLs | |
| $installedDlls = Get-ChildItem -Path $installDir -Filter *.dll | Select-Object -ExpandProperty Name -Unique | |
| # Find missing DLLs (in build, not in install), ignoring whitelist | |
| $missingDlls = $buildDlls | Where-Object { $_ -notin $installedDlls -and $_ -notin $whitelistedMissingDlls } | |
| # Find extra DLLs (in install, not in build), ignoring whitelist | |
| $extraDlls = $installedDlls | Where-Object { $_ -notin $buildDlls -and $_ -notin $whitelistedExtraDlls } | |
| $hasError = $false | |
| if ($missingDlls.Count -gt 0) { | |
| Write-Host "❌ Missing DLLs from installer (not whitelisted):" -ForegroundColor Red | |
| $missingDlls | ForEach-Object { | |
| $sourceFolder = $buildDllLocations[$_] | |
| Write-Host "- $_ (from $sourceFolder)" | |
| } | |
| $hasError = $true | |
| } | |
| if ($extraDlls.Count -gt 0) { | |
| Write-Host "❌ Extra/unexpected DLLs in installer:" -ForegroundColor Red | |
| $extraDlls | ForEach-Object { Write-Host "- $_" } | |
| $hasError = $true | |
| } | |
| if ($hasError) { | |
| exit 1 | |
| } else { | |
| Write-Host "✅ Installer DLLs match build output exactly." -ForegroundColor Green | |
| } |