Linker optimizations (#681)

* Linker optimizations

* Test

* One step forward

* One step forward

* And final step forward

* Misc
This commit is contained in:
Łukasz Domeradzki 2017-10-26 23:05:47 +02:00 committed by GitHub
parent c5776f0895
commit 9006b368b0
9 changed files with 23 additions and 6 deletions

View file

@ -44,7 +44,7 @@ script:
publish() {
if [ "$1" = 'generic' ]; then
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" --no-restore /nologo /p:LinkDuringPublish=false
else
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -o "out/${1}" -r "$1" --no-restore /nologo
fi

View file

@ -33,6 +33,7 @@
<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.6.2" />
<PackageReference Include="Humanizer" Version="2.2.0" />
<PackageReference Include="ILLink.Tasks" Version="0.1.4-preview-981901" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="NLog" Version="5.0.0-beta11" />
<PackageReference Include="SteamKit2" Version="2.0.0-Beta.1" />
@ -42,6 +43,10 @@
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<LinkerRootDescriptors Include="rootDescriptor.xml" />
</ItemGroup>
<ItemGroup>
<Compile Update="Localization\Strings.Designer.cs">
<DesignTime>True</DesignTime>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<linker>
<assembly fullname="System.Dynamic.Runtime">
<type fullname="System.Runtime.CompilerServices.CallSite`1" required="true" />
</assembly>
<assembly fullname="System.Linq.Expressions">
<type fullname="System.Dynamic.DynamicObject" required="true" />
<type fullname="System.Runtime.CompilerServices.CallSiteOps" required="true" />
</assembly>
</linker>

View file

@ -1,7 +1,7 @@
FROM microsoft/dotnet:2.0-sdk AS build-env
WORKDIR /app
COPY . ./
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo && \
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo /p:LinkDuringPublish=false && \
echo "generic" > "ArchiSteamFarm/out/ArchiSteamFarm.version" && \
cp "ArchiSteamFarm/scripts/generic/ArchiSteamFarm-Service.sh" "ArchiSteamFarm/out/ArchiSteamFarm-Service.sh"

View file

@ -1,7 +1,7 @@
FROM microsoft/dotnet:2.0-sdk AS build-env
WORKDIR /app
COPY . ./
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo && \
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo /p:LinkDuringPublish=false && \
echo "generic" > "ArchiSteamFarm/out/ArchiSteamFarm.version" && \
cp "ArchiSteamFarm/scripts/generic/ArchiSteamFarm-Service.sh" "ArchiSteamFarm/out/ArchiSteamFarm-Service.sh"

View file

@ -1,7 +1,7 @@
FROM microsoft/dotnet:2.0-sdk AS build-env
WORKDIR /app
COPY . ./
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo && \
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo /p:LinkDuringPublish=false && \
cp "ArchiSteamFarm/scripts/generic/ArchiSteamFarm.sh" "ArchiSteamFarm/out/ArchiSteamFarm.sh"
FROM microsoft/dotnet:2.0-runtime-stretch-arm32v7

View file

@ -1,7 +1,7 @@
FROM microsoft/dotnet:2.0-sdk AS build-env
WORKDIR /app
COPY . ./
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo && \
RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo /p:LinkDuringPublish=false && \
cp "ArchiSteamFarm/scripts/generic/ArchiSteamFarm.sh" "ArchiSteamFarm/out/ArchiSteamFarm.sh"
FROM microsoft/dotnet:2.0-runtime

View file

@ -66,7 +66,7 @@ after_test:
Set-Location -Path "$env:APPVEYOR_BUILD_FOLDER"
if ($RUNTIME -eq 'generic') {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" --no-restore /nologo
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" --no-restore /nologo /p:LinkDuringPublish=false
} else {
dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" -r "$RUNTIME" --no-restore /nologo
}

View file

@ -2,5 +2,6 @@
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <!-- As a workaround until https://github.com/appveyor/ci/issues/1869 is fixed -->
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
</packageSources>
</configuration>