Skip to content

Commit ca356e2

Browse files
authored
Merge pull request #570 from SplinterGU/Linux
Add Linux build
2 parents e96720b + d1e8be6 commit ca356e2

File tree

12 files changed

+35
-26
lines changed

12 files changed

+35
-26
lines changed

.github/workflows/pipeline.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
7.0.100
2424
- name: Build Windows binaries
2525
run: |
26-
dotnet publish libMBIN-DLL -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
27-
dotnet publish MBINCompiler -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
28-
dotnet publish SaveFileMapping -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
29-
dotnet publish libMBIN-DLL -c Release -f net7.0-windows -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
30-
dotnet publish MBINCompiler -c Release -f net7.0-windows -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
26+
dotnet publish libMBIN-DLL -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
27+
dotnet publish MBINCompiler -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
28+
dotnet publish SaveFileMapping -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
29+
dotnet publish libMBIN-DLL -c Release -f net7.0 -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
30+
dotnet publish MBINCompiler -c Release -f net7.0 -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
3131
- name: Move the exe so the tests can find it easier
3232
run: |
3333
cp Build/Release/net6/MBINCompiler.exe MBINCompiler.exe

MBINCompiler/MBINCompiler.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
66
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
77
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
8-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
8+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
99
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
1010
<Configurations>Debug;Release</Configurations>
1111
<Platforms>AnyCPU;x64</Platforms>
@@ -20,7 +20,7 @@
2020
<Optimize>false</Optimize>
2121
<OutputPath>..\Build\Debug\</OutputPath>
2222
<DefineConstants>TRACE;DEBUG;ENABLE_THREADS</DefineConstants>
23-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
23+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
2424
<UseVSHostingProcess>true</UseVSHostingProcess>
2525
</PropertyGroup>
2626
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -29,23 +29,23 @@
2929
<Optimize>false</Optimize>
3030
<OutputPath>..\Build\Debug\</OutputPath>
3131
<DefineConstants>TRACE;DEBUG;ENABLE_THREADS</DefineConstants>
32-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
32+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
3333
<UseVSHostingProcess>true</UseVSHostingProcess>
3434
</PropertyGroup>
3535
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3636
<DebugType>pdbonly</DebugType>
3737
<Optimize>true</Optimize>
3838
<OutputPath>..\Build\Release\</OutputPath>
3939
<DefineConstants>TRACE</DefineConstants>
40-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
40+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
4141
<PlatformTarget>x64</PlatformTarget>
4242
</PropertyGroup>
4343
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
4444
<DebugType>pdbonly</DebugType>
4545
<Optimize>true</Optimize>
4646
<OutputPath>..\Build\Release\</OutputPath>
4747
<DefineConstants>TRACE</DefineConstants>
48-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
48+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
4949
<PlatformTarget>x64</PlatformTarget>
5050
</PropertyGroup>
5151

@@ -61,7 +61,7 @@
6161
<Message Text="TargetDir = $(TargetDir)" />
6262
<Message Text="TargetName = $(TargetName)" />
6363

64-
<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; -r win-x64 /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
64+
<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
6565
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
6666
</Exec>
6767
<Copy SourceFiles="$(TargetDir)stage/$(TargetName).exe" DestinationFolder="$(TargetDir)" />

MBINCompilerDocs/MBINCompilerDocs.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
66
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
77
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
8-
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
8+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
99
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
1010
<Configurations>Release</Configurations>
1111
<Platforms>AnyCPU;x64</Platforms>
@@ -19,17 +19,18 @@
1919
<Optimize>true</Optimize>
2020
<OutputPath>..\Build\Release\</OutputPath>
2121
<DefineConstants>TRACE</DefineConstants>
22-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
22+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
2323
<PlatformTarget>x64</PlatformTarget>
2424
</PropertyGroup>
2525
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
2626
<DebugType>pdbonly</DebugType>
2727
<Optimize>true</Optimize>
2828
<OutputPath>..\Build\Release\</OutputPath>
2929
<DefineConstants>TRACE</DefineConstants>
30-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
30+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
3131
<PlatformTarget>x64</PlatformTarget>
3232
</PropertyGroup>
33+
3334
<ItemGroup>
3435
<ProjectReference Include="..\libMBIN-DLL\libMBIN-DLL.csproj" />
3536
</ItemGroup>
@@ -46,7 +47,7 @@
4647
<Message Text="TargetDir = $(TargetDir)" />
4748
<Message Text="TargetName = $(TargetName)" />
4849

49-
<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; -r win-x64 /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
50+
<Exec ConsoleToMSBuild="true" Command="dotnet build &quot;$(ProjectPath)&quot; /p:CopyLocalLockFileAssemblies=false;IsNestedBuild=true --output &quot;$(TargetDir)stage/&quot;">
5051
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
5152
</Exec>
5253
<Copy SourceFiles="$(TargetDir)stage/$(TargetName).exe" DestinationFolder="$(TargetDir)" />

MBINCompilerTests/MBINCompilerTests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
44
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
55
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
66
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
7-
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
7+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
88
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
99
<Configurations>Debug;Release</Configurations>
1010
<Platforms>AnyCPU;x64</Platforms>
@@ -38,6 +38,7 @@
3838
<OutputPath>bin\Release\</OutputPath>
3939
<DefineConstants>TRACE</DefineConstants>
4040
</PropertyGroup>
41+
4142
<!-- <ItemGroup> -->
4243
<!-- <Compile Include="Source\Tests\IntRevTest.cs" /> -->
4344
<!-- <Compile Include="Source\Database\AbstractRecord.cs" /> -->

SaveFileMapping/SaveFileMapping.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
5+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
77
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
88
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
9-
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
9+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
1010
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
1111
<Configurations>Release</Configurations>
1212
<Platforms>AnyCPU;x64</Platforms>
@@ -20,15 +20,15 @@
2020
<Optimize>true</Optimize>
2121
<OutputPath>..\Build\Release\</OutputPath>
2222
<DefineConstants>TRACE</DefineConstants>
23-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
23+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
2424
<PlatformTarget>x64</PlatformTarget>
2525
</PropertyGroup>
2626
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
2727
<DebugType>pdbonly</DebugType>
2828
<Optimize>true</Optimize>
2929
<OutputPath>..\Build\Release\</OutputPath>
3030
<DefineConstants>TRACE</DefineConstants>
31-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
31+
<RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
3232
<PlatformTarget>x64</PlatformTarget>
3333
</PropertyGroup>
3434

build-net6.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
dotnet publish -c Release -f net6.0-windows -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
1+
dotnet publish -c Release -f net6.0 -r linux-x64 -o Build/Release/net6/ /nowarn:cs0618
2+
dotnet publish -c Release -f net6.0 -r win-x64 -o Build/Release/net6/ /nowarn:cs0618
23
pause

build-net6.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dotnet publish -c Release -f net6.0 --no-self-contained -r linux-x64 -o Build/Release/net6/ /nowarn:cs0618
2+
dotnet publish -c Release -f net6.0 --no-self-contained -r win-x64 -o Build/Release/net6/ /nowarn:cs0618

build-net7.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
dotnet publish -c Release -f net7.0-windows -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
1+
dotnet publish -c Release -f net7.0 -r linux-x64 -o Build/Release/net7/ /nowarn:cs0618
2+
dotnet publish -c Release -f net7.0 -r win-x64 -o Build/Release/net7/ /nowarn:cs0618
23
pause

build-net7.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dotnet publish -c Release -f net7.0 --no-self-contained -r linux-x64 -o Build/Release/net7/ /nowarn:cs0618
2+
dotnet publish -c Release -f net7.0 --no-self-contained -r win-x64 -o Build/Release/net7/ /nowarn:cs0618

libMBIN-DLL/libMBIN-DLL.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<RootNamespace>libMBIN</RootNamespace>
55
<AssemblyName>libMBIN</AssemblyName>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
7-
<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
7+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
88
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
99
<Configurations>Release;Debug;Release-XML</Configurations>
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -72,6 +72,7 @@
7272
<PlatformTarget>AnyCPU</PlatformTarget>
7373
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
7474
</PropertyGroup>
75+
7576
<!-- <ItemGroup> -->
7677
<!-- <Reference Include="System" /> -->
7778
<!-- <Reference Include="System.Core" /> -->

0 commit comments

Comments
 (0)