Skip to content

Commit 622bc01

Browse files
committed
Use new build system.
1 parent 7403086 commit 622bc01

File tree

54 files changed

+393
-358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+393
-358
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*.cs]
2+
3+
# CA1068: CancellationToken parameters must come last
4+
dotnet_diagnostic.CA1068.severity = silent

.github/workflows/build.yml

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# build.yml v1.3
2+
# 1.3 - Include tag workflow in this file.
3+
# 1.2 - Define DOTNET_SKIP_FIRST_TIME_EXPERIENCE/NUGET_XMLDOC_MODE.
4+
# 1.1 - Use actions/cache@v2.
5+
# 1.0 - Initial release.
6+
7+
name: Build
8+
9+
on:
10+
- push
11+
12+
env:
13+
CI: 'true'
14+
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
15+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
16+
NUGET_XMLDOC_MODE: 'skip'
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- name: Dump context
24+
env:
25+
CONTEXT: ${{ toJson(github) }}
26+
run: |
27+
echo "Context: $Env:CONTEXT"
28+
29+
- name: Determine cache fallbacks
30+
if: github.event_name != 'push'
31+
id: cache_fallbacks
32+
run: |
33+
echo "::set-output name=nuget::nuget-"
34+
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
with:
38+
fetch-depth: 0
39+
40+
- name: Cache nuget
41+
uses: actions/cache@v2
42+
with:
43+
path: ~/.nuget/packages
44+
key: nuget-${{ hashFiles('**/*.csproj') }}-${{ hashFiles('**/*.props') }}
45+
restore-keys: ${{ steps.cache_fallbacks.outputs.nuget }}
46+
47+
- name: Get existing tag
48+
id: existingtag
49+
uses: WyriHaximus/github-action-get-previous-tag@0.2.0
50+
continue-on-error: true
51+
52+
- name: Get current version
53+
run: |
54+
dotnet tool install --global Nito.ProjProps
55+
echo ::set-env name=NEWTAG::v$(projprops --name version --output-format SingleValueOnly --project src --project-search)
56+
57+
- name: Build
58+
run: |
59+
dotnet build --configuration Release
60+
dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage"
61+
dotnet pack --configuration Release --no-build
62+
63+
- name: Upload package artifacts
64+
uses: actions/upload-artifact@v2
65+
with:
66+
name: nuget-packages
67+
path: |
68+
**/*.nupkg
69+
**/*.snupkg
70+
71+
- name: Publish code coverage
72+
uses: codecov/codecov-action@v1
73+
74+
- name: Publish packages
75+
if: env.NEWTAG != steps.existingtag.outputs.tag
76+
run: |
77+
dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }}
78+
79+
- name: Create tag
80+
if: env.NEWTAG != steps.existingtag.outputs.tag
81+
run: |
82+
git tag ${{ env.NEWTAG }}
83+
git push --tags

Build.ps1

-1
This file was deleted.

Coverage.ps1

-72
This file was deleted.

Nito.AsyncEx.sln

+9-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26403.3
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30517.126
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3322A27B-E7FF-49A9-8E91-429051BF7EF6}"
7-
ProjectSection(SolutionItems) = preProject
8-
appveyor.yml = appveyor.yml
9-
Build.ps1 = Build.ps1
10-
Coverage.ps1 = Coverage.ps1
11-
global.json = global.json
12-
nuspec\Nito.AsyncEx.nuspec = nuspec\Nito.AsyncEx.nuspec
13-
README.md = README.md
14-
Version.ps1 = Version.ps1
15-
EndProjectSection
16-
EndProject
176
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FBBB0AFC-0473-47AC-A5F8-235524DF8A8A}"
187
EndProject
198
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nito.AsyncEx.Tasks", "src\Nito.AsyncEx.Tasks\Nito.AsyncEx.Tasks.csproj", "{3817C77D-0C9D-4B57-8C00-27C7BC398E61}"
@@ -38,6 +27,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsyncEx.Oop.UnitTests", "te
3827
EndProject
3928
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsyncEx.Tasks.UnitTests", "test\AsyncEx.Tasks.UnitTests\AsyncEx.Tasks.UnitTests.csproj", "{8B6341C7-AF1F-4713-B7C9-D097B2378142}"
4029
EndProject
30+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nito.AsyncEx", "src\Nito.AsyncEx\Nito.AsyncEx.csproj", "{EC1B4E56-E379-44BE-8662-77C1CB9E773A}"
31+
EndProject
4132
Global
4233
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4334
Debug|Any CPU = Debug|Any CPU
@@ -84,6 +75,10 @@ Global
8475
{8B6341C7-AF1F-4713-B7C9-D097B2378142}.Debug|Any CPU.Build.0 = Debug|Any CPU
8576
{8B6341C7-AF1F-4713-B7C9-D097B2378142}.Release|Any CPU.ActiveCfg = Release|Any CPU
8677
{8B6341C7-AF1F-4713-B7C9-D097B2378142}.Release|Any CPU.Build.0 = Release|Any CPU
78+
{EC1B4E56-E379-44BE-8662-77C1CB9E773A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
79+
{EC1B4E56-E379-44BE-8662-77C1CB9E773A}.Debug|Any CPU.Build.0 = Debug|Any CPU
80+
{EC1B4E56-E379-44BE-8662-77C1CB9E773A}.Release|Any CPU.ActiveCfg = Release|Any CPU
81+
{EC1B4E56-E379-44BE-8662-77C1CB9E773A}.Release|Any CPU.Build.0 = Release|Any CPU
8782
EndGlobalSection
8883
GlobalSection(SolutionProperties) = preSolution
8984
HideSolutionNode = FALSE
@@ -99,6 +94,7 @@ Global
9994
{8EF01C49-665F-481A-AF19-1335292BE59A} = {89C049C2-1211-4BB8-A2FA-D8ECB60676A1}
10095
{F85ECD63-74E0-49EA-910F-0A27A915FDA2} = {89C049C2-1211-4BB8-A2FA-D8ECB60676A1}
10196
{8B6341C7-AF1F-4713-B7C9-D097B2378142} = {89C049C2-1211-4BB8-A2FA-D8ECB60676A1}
97+
{EC1B4E56-E379-44BE-8662-77C1CB9E773A} = {FBBB0AFC-0473-47AC-A5F8-235524DF8A8A}
10298
EndGlobalSection
10399
GlobalSection(ExtensibilityGlobals) = postSolution
104100
SolutionGuid = {B4638CC6-F431-4430-8FD0-C51DF9E9B77F}

Version.ps1

-2
This file was deleted.

appveyor.yml

-25
This file was deleted.

global.json

-5
This file was deleted.

nuspec/Nito.AsyncEx.nuspec

-26
This file was deleted.

src/Directory.Build.props

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<Project>
2+
<!--
3+
Directory.Build.props (src) v2.1
4+
- 2.1 Specify LangVersion (required by Nullable for most libraries).
5+
- 2.0 Move project-specific properties to `project.props`.
6+
- 1.1 Remove workaround for .NET SDK bug that was necesary for coverlet to work.
7+
- 1.0 Initial release.
8+
-->
9+
10+
<Import Project="$(MSBuildThisFileDirectory)project.props" />
11+
12+
<!-- Project quality settings -->
13+
<PropertyGroup>
14+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
15+
<LangVersion>latest</LangVersion>
16+
<Nullable>enable</Nullable>
17+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
18+
</PropertyGroup>
19+
<PropertyGroup Condition="'$(CI)'=='true'">
20+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
21+
</PropertyGroup>
22+
<ItemGroup>
23+
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
24+
<PrivateAssets>all</PrivateAssets>
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
</PackageReference>
27+
</ItemGroup>
28+
29+
<!-- Package settings -->
30+
<PropertyGroup>
31+
<PackageProjectUrl>https://github.com/$(GITHUB_REPOSITORY)</PackageProjectUrl>
32+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
33+
</PropertyGroup>
34+
35+
<!-- Icon file -->
36+
<PropertyGroup>
37+
<PackageIcon>icon.png</PackageIcon>
38+
</PropertyGroup>
39+
<ItemGroup>
40+
<None Include="..\icon.png" Pack="true" PackagePath="\"/>
41+
</ItemGroup>
42+
43+
<!-- Source debugging -->
44+
<PropertyGroup>
45+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
46+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
47+
<IncludeSymbols>true</IncludeSymbols>
48+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
49+
</PropertyGroup>
50+
<ItemGroup>
51+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
52+
</ItemGroup>
53+
54+
<!-- Include reference assemblies -->
55+
<ItemGroup>
56+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All"/>
57+
</ItemGroup>
58+
59+
<!-- Versioning -->
60+
<PropertyGroup Condition="'$(CI)'!='true'">
61+
<VersionSuffix>dev</VersionSuffix>
62+
</PropertyGroup>
63+
64+
<!-- Enable coverlet analysis on deterministic builds: https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md -->
65+
<ItemGroup>
66+
<SourceRoot Include="$(NuGetPackageRoot)" />
67+
</ItemGroup>
68+
<Target Name="CoverletGetPathMap"
69+
DependsOnTargets="InitializeSourceRootMappedPaths"
70+
Returns="@(_LocalTopLevelSourceRoot)"
71+
Condition="'$(DeterministicSourcePaths)' == 'true'">
72+
<ItemGroup>
73+
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/>
74+
</ItemGroup>
75+
</Target>
76+
</Project>

src/Directory.Build.targets

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Project>
2+
<!--
3+
Directory.Build.targets v1.1
4+
- 1.1 Add support for tool packages.
5+
- 1.0 Initial release.
6+
-->
7+
8+
<!-- Metapackage settings -->
9+
<PropertyGroup Condition="'$(IsMetapackage)'=='true'">
10+
<IncludeBuildOutput>false</IncludeBuildOutput>
11+
<IncludeSymbols>false</IncludeSymbols>
12+
<NoWarn>NU5128</NoWarn>
13+
</PropertyGroup>
14+
15+
<PropertyGroup Condition="'$(ToolCommandName)'!=''">
16+
<PackAsTool>true</PackAsTool>
17+
</PropertyGroup>
18+
</Project>

0 commit comments

Comments
 (0)