Skip to content

Commit

Permalink
Merge pull request #570 from SplinterGU/Linux
Browse files Browse the repository at this point in the history
Add Linux build
  • Loading branch information
monkeyman192 authored Aug 31, 2023
2 parents e96720b + d1e8be6 commit ca356e2
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 26 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
7.0.100
- name: Build Windows binaries
run: |
dotnet publish libMBIN-DLL -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish MBINCompiler -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish SaveFileMapping -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish libMBIN-DLL -c Release -f net7.0-windows -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
dotnet publish MBINCompiler -c Release -f net7.0-windows -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
dotnet publish libMBIN-DLL -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish MBINCompiler -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish SaveFileMapping -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish libMBIN-DLL -c Release -f net7.0 -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
dotnet publish MBINCompiler -c Release -f net7.0 -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
- name: Move the exe so the tests can find it easier
run: |
cp Build/Release/net6/MBINCompiler.exe MBINCompiler.exe
Expand Down
14 changes: 7 additions & 7 deletions MBINCompiler/MBINCompiler.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU;x64</Platforms>
Expand All @@ -20,7 +20,7 @@
<Optimize>false</Optimize>
<OutputPath>..\Build\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;ENABLE_THREADS</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand All @@ -29,23 +29,23 @@
<Optimize>false</Optimize>
<OutputPath>..\Build\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;ENABLE_THREADS</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

Expand All @@ -61,7 +61,7 @@
<Message Text="TargetDir = $(TargetDir)" />
<Message Text="TargetName = $(TargetName)" />

<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; -r win-x64 /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
<Copy SourceFiles="$(TargetDir)stage/$(TargetName).exe" DestinationFolder="$(TargetDir)" />
Expand Down
11 changes: 6 additions & 5 deletions MBINCompilerDocs/MBINCompilerDocs.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Configurations>Release</Configurations>
<Platforms>AnyCPU;x64</Platforms>
Expand All @@ -19,17 +19,18 @@
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\libMBIN-DLL\libMBIN-DLL.csproj" />
</ItemGroup>
Expand All @@ -46,7 +47,7 @@
<Message Text="TargetDir = $(TargetDir)" />
<Message Text="TargetName = $(TargetName)" />

<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; -r win-x64 /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
<Copy SourceFiles="$(TargetDir)stage/$(TargetName).exe" DestinationFolder="$(TargetDir)" />
Expand Down
5 changes: 3 additions & 2 deletions MBINCompilerTests/MBINCompilerTests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU;x64</Platforms>
Expand Down Expand Up @@ -38,6 +38,7 @@
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<!-- <ItemGroup> -->
<!-- <Compile Include="Source\Tests\IntRevTest.cs" /> -->
<!-- <Compile Include="Source\Database\AbstractRecord.cs" /> -->
Expand Down
8 changes: 4 additions & 4 deletions SaveFileMapping/SaveFileMapping.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Configurations>Release</Configurations>
<Platforms>AnyCPU;x64</Platforms>
Expand All @@ -20,15 +20,15 @@
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Build\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion build-net6.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dotnet publish -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish -c Release -f net6.0 -r linux-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
pause
2 changes: 2 additions & 0 deletions build-net6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dotnet publish -c Release -f net6.0 --no-self-contained -r linux-x64 -o Build/Release/net6/ /nowarn:cs0618
dotnet publish -c Release -f net6.0 --no-self-contained -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
3 changes: 2 additions & 1 deletion build-net7.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dotnet publish -c Release -f net7.0-windows -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
dotnet publish -c Release -f net7.0 -r linux-x64 -o Build/Release/net7/ /nowarn:cs0618
dotnet publish -c Release -f net7.0 -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
pause
2 changes: 2 additions & 0 deletions build-net7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dotnet publish -c Release -f net7.0 --no-self-contained -r linux-x64 -o Build/Release/net7/ /nowarn:cs0618
dotnet publish -c Release -f net7.0 --no-self-contained -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
3 changes: 2 additions & 1 deletion libMBIN-DLL/libMBIN-DLL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>libMBIN</RootNamespace>
<AssemblyName>libMBIN</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Configurations>Release;Debug;Release-XML</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down Expand Up @@ -72,6 +72,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<!-- <ItemGroup> -->
<!-- <Reference Include="System" /> -->
<!-- <Reference Include="System.Core" /> -->
Expand Down
File renamed without changes.

0 comments on commit ca356e2

Please sign in to comment.