Skip to content

Commit

Permalink
Github Actions 1: Cross Platform Build (#2398)
Browse files Browse the repository at this point in the history
* Create build.yml

started github actions

* Update build.yml

* Update build.yml

* Update build.yml

* enabled windows targeting to gui and guifunctions

* Update build.yml

* windows targeting

* added new configuration

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* added test.yml from vs

* reverterd commit

* updated some csproj files

* touched up GUI.csproj

* Update build.yml

* fixed the test?

* Changes at alex's suggestion

* added back in guifunctions for tests

* removed windows targeting from GUI as it is no longer being built on windows and mac

* cleaned up alot

* did the thing

---------

Co-authored-by: trishorts <mshort@chem.wisc.edu>
  • Loading branch information
nbollis and trishorts authored Aug 23, 2024
1 parent 22c8fe0 commit c0bb0a0
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
configuration: UbuntuMac
- os: macos-latest
configuration: UbuntuMac
- os: windows-latest
configuration: Release

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.204
- name: Restore dependencies
run: dotnet restore ./MetaMorpheus/MetaMorpheus.sln
- name: Build
run: dotnet build --no-restore ./MetaMorpheus/MetaMorpheus.sln --configuration ${{ matrix.configuration }}
1 change: 1 addition & 0 deletions MetaMorpheus/GUI/GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<ApplicationIcon>Icons\MMnice.ico</ApplicationIcon>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/GuiFunctions/GuiFunctions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
<UseWPF>true</UseWPF>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand Down
14 changes: 14 additions & 0 deletions MetaMorpheus/MetaMorpheus.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,54 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
UbuntuMac|Any CPU = UbuntuMac|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FD20EBBA-F4C5-40D6-AD61-48A7EB255DAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD20EBBA-F4C5-40D6-AD61-48A7EB255DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD20EBBA-F4C5-40D6-AD61-48A7EB255DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD20EBBA-F4C5-40D6-AD61-48A7EB255DAE}.Release|Any CPU.Build.0 = Release|Any CPU
{FD20EBBA-F4C5-40D6-AD61-48A7EB255DAE}.UbuntuMac|Any CPU.ActiveCfg = Release|Any CPU
{FD20EBBA-F4C5-40D6-AD61-48A7EB255DAE}.UbuntuMac|Any CPU.Build.0 = Release|Any CPU
{C654FC97-FBD1-43D7-9F61-35FDD1A4E0AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C654FC97-FBD1-43D7-9F61-35FDD1A4E0AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C654FC97-FBD1-43D7-9F61-35FDD1A4E0AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C654FC97-FBD1-43D7-9F61-35FDD1A4E0AD}.Release|Any CPU.Build.0 = Release|Any CPU
{C654FC97-FBD1-43D7-9F61-35FDD1A4E0AD}.UbuntuMac|Any CPU.ActiveCfg = Release|Any CPU
{FFAE3A5E-B5AE-4CD0-ABF9-703C91F1C7D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFAE3A5E-B5AE-4CD0-ABF9-703C91F1C7D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFAE3A5E-B5AE-4CD0-ABF9-703C91F1C7D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FFAE3A5E-B5AE-4CD0-ABF9-703C91F1C7D6}.Release|Any CPU.Build.0 = Release|Any CPU
{FFAE3A5E-B5AE-4CD0-ABF9-703C91F1C7D6}.UbuntuMac|Any CPU.ActiveCfg = Release|Any CPU
{FFAE3A5E-B5AE-4CD0-ABF9-703C91F1C7D6}.UbuntuMac|Any CPU.Build.0 = Release|Any CPU
{9CD3D75C-4E3C-40AC-A3D8-C32DD528DB7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CD3D75C-4E3C-40AC-A3D8-C32DD528DB7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CD3D75C-4E3C-40AC-A3D8-C32DD528DB7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CD3D75C-4E3C-40AC-A3D8-C32DD528DB7F}.Release|Any CPU.Build.0 = Release|Any CPU
{9CD3D75C-4E3C-40AC-A3D8-C32DD528DB7F}.UbuntuMac|Any CPU.ActiveCfg = Release|Any CPU
{9CD3D75C-4E3C-40AC-A3D8-C32DD528DB7F}.UbuntuMac|Any CPU.Build.0 = Release|Any CPU
{BE72541A-66A4-4958-9D19-56ACC7D3876B}.Debug|Any CPU.ActiveCfg = Debug|x64
{BE72541A-66A4-4958-9D19-56ACC7D3876B}.Debug|Any CPU.Build.0 = Debug|x64
{BE72541A-66A4-4958-9D19-56ACC7D3876B}.Release|Any CPU.ActiveCfg = Release|x64
{BE72541A-66A4-4958-9D19-56ACC7D3876B}.Release|Any CPU.Build.0 = Release|x64
{BE72541A-66A4-4958-9D19-56ACC7D3876B}.UbuntuMac|Any CPU.ActiveCfg = Release|x64
{653015B3-CC5A-4D1C-AAD3-1CE2A0C4D197}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{653015B3-CC5A-4D1C-AAD3-1CE2A0C4D197}.Debug|Any CPU.Build.0 = Debug|Any CPU
{653015B3-CC5A-4D1C-AAD3-1CE2A0C4D197}.Release|Any CPU.ActiveCfg = Release|Any CPU
{653015B3-CC5A-4D1C-AAD3-1CE2A0C4D197}.Release|Any CPU.Build.0 = Release|Any CPU
{653015B3-CC5A-4D1C-AAD3-1CE2A0C4D197}.UbuntuMac|Any CPU.ActiveCfg = Release|Any CPU
{653015B3-CC5A-4D1C-AAD3-1CE2A0C4D197}.UbuntuMac|Any CPU.Build.0 = Release|Any CPU
{7EE028A9-75A2-450F-A9A7-76559ED15419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7EE028A9-75A2-450F-A9A7-76559ED15419}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7EE028A9-75A2-450F-A9A7-76559ED15419}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7EE028A9-75A2-450F-A9A7-76559ED15419}.Release|Any CPU.Build.0 = Release|Any CPU
{7EE028A9-75A2-450F-A9A7-76559ED15419}.UbuntuMac|Any CPU.ActiveCfg = Release|Any CPU
{7EE028A9-75A2-450F-A9A7-76559ED15419}.UbuntuMac|Any CPU.Build.0 = Release|Any CPU
{E0EA5AC4-24A9-43DC-8FBC-CCEB3B9935B6}.Debug|Any CPU.ActiveCfg = Debug|x64
{E0EA5AC4-24A9-43DC-8FBC-CCEB3B9935B6}.Debug|Any CPU.Build.0 = Debug|x64
{E0EA5AC4-24A9-43DC-8FBC-CCEB3B9935B6}.Release|Any CPU.ActiveCfg = Release|x64
{E0EA5AC4-24A9-43DC-8FBC-CCEB3B9935B6}.Release|Any CPU.Build.0 = Release|x64
{E0EA5AC4-24A9-43DC-8FBC-CCEB3B9935B6}.UbuntuMac|Any CPU.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 3 additions & 1 deletion MetaMorpheus/Test/SpectralRecoveryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ public static void MiniClassicSearchEngineTest()
[Test]
public static void SpectralWriterTest()
{
foreach (var specLibPath in Directory.GetFiles(outputFolder, "*.msp", SearchOption.AllDirectories))
File.Delete(specLibPath);

PostSearchAnalysisTask postSearchTask = new PostSearchAnalysisTask()
{
Expand Down Expand Up @@ -377,7 +379,7 @@ public static void SpectralWriterTest()
postSearchTask.Run();

var libraryList = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories);
string updateLibraryPath = libraryList.First(p => p.Contains("SpectralLibrary") && !p.Contains(matchingvalue)).ToString();
string updateLibraryPath = libraryList.First(p => p.Contains("updateSpectralLibrary") && !p.Contains(matchingvalue)).ToString();
var updatedLibraryWithoutDecoy = new SpectralLibrary(new List<string> { Path.Combine(path, updateLibraryPath) });
Assert.That(updatedLibraryWithoutDecoy.TryGetSpectrum("EESGKPGAHVTVK", 2, out spectrum));

Expand Down
1 change: 1 addition & 0 deletions MetaMorpheus/Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<IsPackable>false</IsPackable>
<Configurations>Debug;Release</Configurations>
<DebugType>full</DebugType>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down

0 comments on commit c0bb0a0

Please sign in to comment.