-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and publish AutoDiscovery in this repository too (#2)
- Loading branch information
Showing
18 changed files
with
343 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Redpoint.AutoDiscovery | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
UET_FRAMEWORK_TARGET: net8.0 | ||
UET_BUILDING_ON_BUILD_SERVER: "true" | ||
|
||
jobs: | ||
autodiscovery: | ||
name: "Build and Publish" | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install .NET SDK | ||
uses: ./.github/actions/dotnet-sdk | ||
with: | ||
UET_FRAMEWORK_TARGET: ${{ env.UET_FRAMEWORK_TARGET }} | ||
- name: Build Redpoint.AutoDiscovery | ||
shell: pwsh | ||
run: | | ||
$Timestamp = ([DateTime]::UtcNow) | ||
$PackageVersion = "$($Timestamp.Year).$($Timestamp.DayOfYear + 1000).$(($Timestamp.Hour * 60) + $Timestamp.Minute)" | ||
Write-Host "Package version: $PackageVersion" | ||
Write-Host "Building Redpoint.AutoDiscovery version '$PackageVersion'..." | ||
dotnet ` | ||
msbuild ` | ||
-restore ` | ||
-p:RuntimeIdentifier=win-x86 ` | ||
-p:Configuration=Release ` | ||
-p:Platform=x86 ` | ||
"-p:BaseUetVersion=$PackageVersion" ` | ||
"-p:PackageVersion=$PackageVersion" ` | ||
Redpoint.AutoDiscovery.Win32/Redpoint.AutoDiscovery.Win32.csproj | ||
if ($LastExitCode -ne 0) { exit $LastExitCode } | ||
dotnet ` | ||
msbuild ` | ||
-restore ` | ||
-p:RuntimeIdentifier=win-x64 ` | ||
-p:Configuration=Release ` | ||
-p:Platform=x64 ` | ||
"-p:BaseUetVersion=$PackageVersion" ` | ||
"-p:PackageVersion=$PackageVersion" ` | ||
Redpoint.AutoDiscovery.Win64/Redpoint.AutoDiscovery.Win64.csproj | ||
if ($LastExitCode -ne 0) { exit $LastExitCode } | ||
- name: Publish Redpoint.AutoDiscovery | ||
shell: pwsh | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | ||
run: | | ||
dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key $env:NUGET_API_KEY (Get-ChildItem -Recurse -Filter "Redpoint.AutoDiscovery.Win32/bin/Release/Redpoint.AutoDiscovery.Win32.*.nupkg" | % { $_.FullName }) | ||
if ($LastExitCode -ne 0) { exit $LastExitCode } | ||
dotnet nuget push --source https://api.nuget.org/v3/index.json --api-key $env:NUGET_API_KEY (Get-ChildItem -Recurse -Filter "Redpoint.AutoDiscovery.Win64/bin/Release/Redpoint.AutoDiscovery.Win64.*.nupkg" | % { $_.FullName }) | ||
if ($LastExitCode -ne 0) { exit $LastExitCode } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.sln | ||
bin/ | ||
obj/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)./Framework.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<IsPackable Condition="'$(UetSkipNuGetPackaging)' == 'true'">false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsTrimmable> | ||
<EnableTrimAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</EnableTrimAnalyzer> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</EnableSingleFileAnalyzer> | ||
<AnalysisLevel>latest</AnalysisLevel> | ||
<AnalysisMode>All</AnalysisMode> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<NoWarn>$(NoWarn);SYSLIB1224</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)../.analyzerconfig" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<!-- CsWin32 does not add the 'in' keyword properly yet. --> | ||
<NoWarn>$(NoWarn);CS9195</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta" NoWarn="NU5104"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.Windows.SDK.Win32Docs" Version="0.1.42-alpha" NoWarn="NU5104" /> | ||
<PackageReference Include="Microsoft.Windows.SDK.Win32Metadata" Version="54.0.44-preview" NoWarn="NU5104" /> | ||
<PackageReference Include="Microsoft.Windows.WDK.Win32Metadata" Version="0.8.2-experimental" NoWarn="NU5104" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
|
||
<!-- This is used for libraries that we want to make available to .NET Framework. --> | ||
<RedpointTargetFrameworks>net8.0;net48</RedpointTargetFrameworks> | ||
|
||
<RedpointSystemLibraryVersion>8.*</RedpointSystemLibraryVersion> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> | ||
<Copyright>Redpoint Games</Copyright> | ||
<PackageProjectUrl></PackageProjectUrl> | ||
<RepositoryUrl>https://src.redpoint.games/redpointgames/uet</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<Authors>June Rhodes</Authors> | ||
<Company>Redpoint Games</Company> | ||
<PackageIcon>PackageIcon.png</PackageIcon> | ||
<PackageReadmeFile Condition="Exists('$(ProjectDir)README.md')">README.md</PackageReadmeFile> | ||
|
||
<PackageYear>$([System.DateTime]::UtcNow.Year)</PackageYear> | ||
<PackageDayOfYear>$([System.DateTime]::UtcNow.DayOfYear)</PackageDayOfYear> | ||
<PackageHour>$([System.DateTime]::UtcNow.Hour)</PackageHour> | ||
<PackageMinute>$([System.DateTime]::UtcNow.Minute)</PackageMinute> | ||
<PackageVersionMajor>$(PackageYear)</PackageVersionMajor> | ||
<PackageVersionMinor>$([MSBuild]::Add($(PackageDayOfYear), 1000))</PackageVersionMinor> | ||
<PackageVersionPatch>$([MSBuild]::Add($([MSBuild]::Multiply($(PackageHour), 60)), $(PackageMinute)))</PackageVersionPatch> | ||
|
||
<PackageVersion Condition="'$(PackageVersion)' == ''">$(PackageVersionMajor).$(PackageVersionMinor).$(PackageVersionPatch)-pre</PackageVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="$(MSBuildThisFileDirectory)PackageIcon.png" Pack="True" PackagePath="" /> | ||
<None Condition="Exists('$(ProjectDir)README.md')" Include="$(ProjectDir)README.md" Pack="True" PackagePath="" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)Framework.Build.props" Condition="'$(TargetFramework)' == ''" /> | ||
|
||
<PropertyGroup> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch> | ||
<RestoreAdditionalProjectSources>$(MSBuildThisFileDirectory)../Redpoint.Logging.Mac/bin;$(MSBuildThisFileDirectory)../Redpoint.AutoDiscovery/bin/$(Configuration)</RestoreAdditionalProjectSources> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging" Version="$(RedpointSystemLibraryVersion)" /> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)Redpoint.ThirdParty.Microsoft.Extensions.Logging.Console\Redpoint.ThirdParty.Microsoft.Extensions.Logging.Console.csproj" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(RedpointSystemLibraryVersion)" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" /> | ||
<PackageReference Include="xunit" Version="2.9.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="6.0.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" /> | ||
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.4.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)../Redpoint.XunitFramework/Redpoint.XunitFramework.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="$(MSBuildThisFileDirectory)../Redpoint.XunitFramework/xunit.runner.json" CopyToOutputDirectory="PreserveNewest"> | ||
<Link>xunit.runner.json</Link> | ||
</None> | ||
<Compile Include="$(MSBuildThisFileDirectory)../Redpoint.XunitFramework/UseRedpointTestFramework.cs"> | ||
<Link>UseRedpointTestFramework.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://aka.ms/CsWin32.schema.json", | ||
"public": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
DnsServiceRegister | ||
DnsServiceRegisterCancel | ||
DnsServiceDeRegister | ||
DnsServiceBrowse | ||
DnsServiceBrowseCancel | ||
DnsServiceConstructInstance | ||
DnsServiceFreeInstance | ||
DnsFree | ||
DNS_QUERY_OPTIONS | ||
DNS_REQUEST_PENDING | ||
DNS_TYPE | ||
WIN32_ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Redpoint.AutoDiscovery.Win32 | ||
|
||
Provides native binaries for the Redpoint.AutoDiscovery library. | ||
|
||
You should depend on `Redpoint.AutoDiscovery` instead of this NuGet package. |
23 changes: 23 additions & 0 deletions
23
Redpoint.AutoDiscovery.Win32/Redpoint.AutoDiscovery.Win32.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)../Lib/Common.Build.props" /> | ||
<Import Project="$(MSBuildThisFileDirectory)../Lib/LibraryPackaging.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<RootNamespace>Redpoint.AutoDiscovery.Win32</RootNamespace> | ||
<AssemblyName>Redpoint.AutoDiscovery.Win32</AssemblyName> | ||
<Platforms>x86</Platforms> | ||
<Platform>x86</Platform> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)../Lib/CsWin32.Build.props" /> | ||
|
||
<ItemGroup> | ||
<None Remove="NativeMethods.json" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<AdditionalFiles Include="NativeMethods.json" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://aka.ms/CsWin32.schema.json", | ||
"public": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
DnsServiceRegister | ||
DnsServiceRegisterCancel | ||
DnsServiceDeRegister | ||
DnsServiceBrowse | ||
DnsServiceBrowseCancel | ||
DnsServiceConstructInstance | ||
DnsServiceFreeInstance | ||
DnsFree | ||
DNS_QUERY_OPTIONS | ||
DNS_REQUEST_PENDING | ||
DNS_TYPE | ||
WIN32_ERROR |
Oops, something went wrong.