mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Compare commits
2 Commits
v2.326.0
...
users/eric
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cc6ccee7e | ||
|
|
f40f2e4219 |
13
src/TestDotNet8/Program.cs
Normal file
13
src/TestDotNet8/Program.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace TestDotNet8
|
||||||
|
{
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public static int Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello from .NET 8!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
src/TestDotNet8/TestDotNet8.csproj
Normal file
20
src/TestDotNet8/TestDotNet8.csproj
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RuntimeIdentifiers>win-x64;win-x86;linux-x64;linux-arm64;linux-arm;osx-x64;osx-arm64;win-arm64</RuntimeIdentifiers>
|
||||||
|
<SelfContained>true</SelfContained>
|
||||||
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
|
<NoWarn>NU1701;NU1603;SYSLIB0050;SYSLIB0051</NoWarn>
|
||||||
|
<Version>$(Version)</Version>
|
||||||
|
<PredefinedCulturesOnly>false</PredefinedCulturesOnly>
|
||||||
|
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
|
<DebugType>portable</DebugType>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
41
src/dir.proj
41
src/dir.proj
@@ -1,52 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build"
|
<Project ToolsVersion="14.0" DefaultTargets="Build"
|
||||||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Target Name="GenerateConstant">
|
|
||||||
<Exec Command="git rev-parse HEAD" ConsoleToMSBuild="true">
|
|
||||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
|
|
||||||
</Exec>
|
|
||||||
<Message Text="Building $(Product): $(GitInfoCommitHash) --- $(PackageRuntime)" Importance="high"/>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<BuildConstants Include="namespace GitHub.Runner.Sdk"/>
|
|
||||||
<BuildConstants Include="{"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20public static class BuildConstants"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20{"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20public static class Source"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20{"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20%20%20%20%20public static readonly string CommitHash = %22$(GitInfoCommitHash)%22%3B"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20}%0A"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20public static class RunnerPackage"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20{"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20%20%20%20%20public static readonly string PackageName = %22$(PackageRuntime)%22%3B"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20%20%20%20%20public static readonly string Version = %22$(RunnerVersion)%22%3B"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20%20%20%20%20}"/>
|
|
||||||
<BuildConstants Include="%20%20%20%20}"/>
|
|
||||||
<BuildConstants Include="}"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile File="Runner.Sdk/BuildConstants.cs" Lines="@(BuildConstants)" Overwrite="true" />
|
|
||||||
|
|
||||||
<Exec Command="git update-index --assume-unchanged ./Runner.Sdk/BuildConstants.cs" ConsoleToMSBuild="true" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectFiles Include="Sdk/Sdk.csproj" />
|
<ProjectFiles Include="TestDotNet8/TestDotNet8.csproj" />
|
||||||
<ProjectFiles Include="Runner.Common/Runner.Common.csproj" />
|
|
||||||
<ProjectFiles Include="Runner.Listener/Runner.Listener.csproj" />
|
|
||||||
<ProjectFiles Include="Runner.Worker/Runner.Worker.csproj" />
|
|
||||||
<ProjectFiles Include="Runner.PluginHost/Runner.PluginHost.csproj" />
|
|
||||||
<ProjectFiles Include="Runner.Sdk/Runner.Sdk.csproj" />
|
|
||||||
<ProjectFiles Include="Runner.Plugins/Runner.Plugins.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="Build" DependsOnTargets="GenerateConstant">
|
<Target Name="Build">
|
||||||
<MSBuild Targets="Restore" Projects="@(ProjectFiles)" StopOnFirstFailure="true" />
|
<MSBuild Targets="Restore" Projects="@(ProjectFiles)" StopOnFirstFailure="true" />
|
||||||
<MSBuild Targets="Publish" Projects="@(ProjectFiles)" BuildInParallel="false" StopOnFirstFailure="true" Properties="Configuration=$(BUILDCONFIG);PackageRuntime=$(PackageRuntime);Version=$(RunnerVersion);RuntimeIdentifier=$(PackageRuntime);PublishDir=$(MSBuildProjectDirectory)/../_layout/bin" />
|
<MSBuild Targets="Publish" Projects="@(ProjectFiles)" BuildInParallel="false" StopOnFirstFailure="true" Properties="Configuration=$(BUILDCONFIG);PackageRuntime=$(PackageRuntime);Version=$(RunnerVersion);RuntimeIdentifier=$(PackageRuntime);PublishDir=$(MSBuildProjectDirectory)/../_layout/bin" />
|
||||||
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
|
<Exec Command="%22$(DesktopMSBuild)%22 Runner.Service/Windows/RunnerService.csproj /p:Configuration=$(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime) /p:OutputPath=%22$(MSBuildProjectDirectory)/../_layout/bin%22" ConsoleToMSBuild="true" Condition="'$(PackageRuntime)' == 'win-x64' Or '$(PackageRuntime)' == 'win-x86' Or '$(PackageRuntime)' == 'win-arm64'" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="Test" DependsOnTargets="GenerateConstant">
|
<Target Name="Test">
|
||||||
<Exec Command="dotnet build Test/Test.csproj -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" />
|
<Exec Command="dotnet build Test/Test.csproj -c $(BUILDCONFIG) /p:PackageRuntime=$(PackageRuntime)" ConsoleToMSBuild="true" />
|
||||||
<Exec Command="dotnet test Test/Test.csproj -c $(BUILDCONFIG) --no-build --logger:trx" ConsoleToMSBuild="true" />
|
<Exec Command="dotnet test Test/Test.csproj -c $(BUILDCONFIG) --no-build --logger:trx" ConsoleToMSBuild="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|||||||
Reference in New Issue
Block a user