Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add first draft of a build pipeline #1

Merged
merged 40 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c68368d
Create azure-pipelines.yml
jfversluis Jun 11, 2021
647b8b2
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
f5e8149
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
3f07e89
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
d31bb3a
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
e1fd4b3
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
09b4dc2
Create vs2019.csx
jfversluis Jun 11, 2021
228d23f
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
e9babe2
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
26d47e7
Update azure-pipelines.yml for Azure Pipelines
jfversluis Jun 11, 2021
3c87aab
Merge branch 'main' into nightly-nuget
brminnick Jul 22, 2021
be0138b
Merge branch 'main' into nightly-nuget
brminnick Jul 22, 2021
edd9bf2
Update azure-pipelines.yml
brminnick Jul 22, 2021
7f0c58b
Update azure-pipelines.yml
michael-hawker Aug 3, 2021
c9ce9c9
Merge branch 'main' into nightly-nuget
michael-hawker Aug 4, 2021
5908b86
Merge branch 'main' into nightly-nuget
michael-hawker Aug 4, 2021
482f017
Merge branch 'main' into nightly-nuget
jfversluis Aug 12, 2021
02f5ce7
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
888e116
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
963f445
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
58d1823
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
993b8f0
Delete vs2019.csx
jfversluis Aug 12, 2021
0e5f1be
Update CommunityToolkit.Maui.csproj
jfversluis Aug 12, 2021
fc94a45
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
114e952
Update CommunityToolkit.Maui.csproj
jfversluis Aug 12, 2021
dea5277
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
b5eca04
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
5dbed9a
Update azure-pipelines.yml for Azure Pipelines
jfversluis Aug 12, 2021
2036165
Add icon
jfversluis Aug 13, 2021
37ce1f6
Really add icon
jfversluis Aug 13, 2021
0ef3061
Fix version number
jfversluis Aug 13, 2021
91a3adc
Build sample
jfversluis Aug 13, 2021
4859d50
Revert "Build sample"
jfversluis Aug 13, 2021
67efca2
Set version to start at 1
jfversluis Aug 13, 2021
e4dabb5
Set right target versions
jfversluis Aug 13, 2021
eaed7cc
Update CommunityToolkit.Maui.csproj
jfversluis Aug 13, 2021
07a2fca
Create CommunityToolkit.Maui.sln
jfversluis Aug 13, 2021
b19de29
Revert "Create CommunityToolkit.Maui.sln"
jfversluis Aug 13, 2021
5006262
Update CommunityToolkit.Maui.csproj
jfversluis Aug 13, 2021
0af120f
Remove OS Numbers + App-Specific Settings
brminnick Aug 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 123 additions & 14 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,128 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
variables:
CurrentSemanticVersionBase: '1.0.0'
PreviewNumber: $[counter(variables['CurrentSemanticVersionBase'], 1001)]
CurrentSemanticVersion: '$(CurrentSemanticVersionBase)-preview$(PreviewNumber)'
NugetPackageVersion: '$(CurrentSemanticVersion)'
NET_VERSION: '6.0.x'
RunPoliCheck: 'false'
PathToSolution: 'src/CommunityToolkit.Maui.sln'
PathToCommunityToolkitCsproj: 'src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj'
PathToCommunityToolkitUnitTestCsproj: 'src/CommunityToolkit.Maui.UnitTests/CommunityToolkit.Maui.UnitTests.csproj'

trigger:
- main
branches:
include:
- main
- develop
tags:
include:
- '*'
paths:
exclude:
- README.md

pool:
vmImage: ubuntu-latest
pr:
autoCancel: true
branches:
include:
- main
- develop
paths:
exclude:
- README.md

steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- develop

- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'
jobs:
- job: build_windows
displayName: Build Windows Library
pool:
vmImage: windows-latest
steps:
- task: UseDotNet@2
displayName: 'Install .NET SDK'
inputs:
version: '$(NET_VERSION)'
includePreviewVersions: true

- task: CmdLine@2
displayName: 'Install .NET MAUI workload'
inputs:
script: 'dotnet workload install maui'
- task: CmdLine@2
displayName: 'Clear Local NuGet Cache' #https://github.com/actions/virtual-environments/issues/1090#issuecomment-748452120
inputs:
script: 'nuget locals all -clear'
- task: CmdLine@2
displayName: 'Clean Solution'
inputs:
script: 'dotnet clean $(PathToSolution)'
# if this is a tagged build, then update the version number
- powershell: |
$buildSourceBranch = "$(Build.SourceBranch)"
$tagVersion = $buildSourceBranch.Substring($buildSourceBranch.LastIndexOf("/") + 1)
Write-Host("Branch = $buildSourceBranch, Version = $tagVersion");
Write-Host ("##vso[task.setvariable variable=NugetPackageVersion;]$tagVersion")
displayName: Set NuGet Version to Tag Number
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
# restore, build and pack the packages
- task: CmdLine@2
displayName: 'Build Community Toolkit'
inputs:
script: 'dotnet build $(PathToCommunityToolkitCsproj) -c Release'
- task: CmdLine@2
displayName: Pack Community Toolkit NuGets
inputs:
script: 'dotnet pack -c Release $(PathToCommunityToolkitCsproj) -p:PackageVersion=$(NugetPackageVersion) --output $(Build.ArtifactStagingDirectory)/nuget'
# publish the packages
- task: PublishBuildArtifacts@1
displayName: 'Publish Unsigned NuGets'
inputs:
artifactName: nuget
pathToPublish: '$(Build.ArtifactStagingDirectory)/nuget'

- job: build_macos
displayName: Build macOS Library
pool:
vmImage: macos-10.15
steps:
# if this is a tagged build, then update the version number
- powershell: |
$buildSourceBranch = "$(Build.SourceBranch)"
$tagVersion = $buildSourceBranch.Substring($buildSourceBranch.LastIndexOf("/") + 1)
Write-Host("Branch = $buildSourceBranch, Version = $tagVersion");
Write-Host ("##vso[task.setvariable variable=NugetPackageVersion;]$tagVersion")
displayName: Set NuGet Version to Tag Number
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- task: UseDotNet@2
displayName: 'Install .NET SDK'
inputs:
version: $(NET_VERSION)
includePreviewVersions: true
- task: CmdLine@2
displayName: 'Install .NET MAUI workload'
inputs:
script: 'dotnet workload install maui'
- task: CmdLine@2
displayName: 'Restore NuGet Packages'
inputs:
script: 'dotnet restore $(PathToCommunityToolkitCsproj)'
- task: CmdLine@2
displayName: 'Build Community Toolkit'
inputs:
script: 'dotnet build $(PathToCommunityToolkitCsproj) -c Release'
# Doesn't seem to work (yet)?
# - task: DotNetCoreCLI@2
# displayName: 'Run Unit Tests'
# inputs:
# command: 'test'
# projects: $(PathToCommunityToolkitUnitTestCsproj)
- task: CmdLine@2
displayName: 'Pack CommunityToolkit NuGets'
inputs:
script: 'dotnet pack -c Release $(PathToCommunityToolkitCsproj) -p:PackageVersion=$(NugetPackageVersion) --output $(Build.ArtifactStagingDirectory)/nuget'
Binary file added build/nuget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<PropertyGroup>
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<UseMaui>true</UseMaui>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -34,13 +35,10 @@
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<InvariantGlobalization Condition="$(TargetFramework.Contains('-maccatalyst'))">true</InvariantGlobalization>
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-ios'))">iossimulator-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
<UseInterpreter Condition="$(TargetFramework.Contains('-android'))">False</UseInterpreter>
</PropertyGroup>
<!-- Files that end up in the nupkg -->
<ItemGroup>
<None Include="..\..\build\nuget.png" PackagePath="icon.png" Pack="true" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="mdoc" Version="5.8.0" PrivateAssets="all" />
Expand Down Expand Up @@ -76,4 +74,4 @@
<Compile Include="**\*.macos.*.cs" />
</ItemGroup>

</Project>
</Project>