Skip to content

Commit

Permalink
Simplify build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Bret Johnson committed Feb 16, 2024
1 parent 5061125 commit 6a535de
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 94 deletions.
1 change: 0 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ parameters:
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
#codecov_token: # Get a new one from https://codecov.io/
ci_feed: https://pkgs.dev.azure.com/bretjohn-public/_packaging/bretjohn-public/nuget/v3/index.json # Azure Artifacts feed URL
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages/

Expand Down
35 changes: 0 additions & 35 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ parameters:
type: object
default:
vmImage: windows-2022
- name: includeMacOS
type: boolean
- name: RunTests
type: boolean
default: true
Expand All @@ -25,38 +23,9 @@ jobs:
parameters:
RunTests: ${{ parameters.RunTests }}

- job: Linux
pool:
vmImage: Ubuntu 20.04
steps:
- checkout: self
fetchDepth: 0 # avoid shallow clone so nbgv can do its work.
clean: true
- template: install-dependencies.yml
- template: dotnet.yml
parameters:
RunTests: ${{ parameters.RunTests }}
- script: dotnet format --verify-no-changes --no-restore
displayName: 💅 Verify formatted code

- job: macOS
condition: ${{ parameters.includeMacOS }}
pool:
vmImage: macOS-12
steps:
- checkout: self
fetchDepth: 0 # avoid shallow clone so nbgv can do its work.
clean: true
- template: install-dependencies.yml
- template: dotnet.yml
parameters:
RunTests: ${{ parameters.RunTests }}

- job: WrapUp
dependsOn:
- Windows
- Linux
- macOS
pool: ${{ parameters.windowsPool }} # Use Windows agent because PublishSymbols task requires it (https://github.com/microsoft/azure-pipelines-tasks/issues/13821).
condition: succeededOrFailed()
steps:
Expand All @@ -67,10 +36,6 @@ jobs:
parameters:
initArgs: -NoRestore
- template: publish-symbols.yml
parameters:
includeMacOS: ${{ parameters.includeMacOS }}
- ${{ if parameters.RunTests }}:
- template: publish-codecoverage.yml
parameters:
includeMacOS: ${{ parameters.includeMacOS }}
- template: publish-deployables.yml
12 changes: 0 additions & 12 deletions azure-pipelines/publish-codecoverage.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
parameters:
includeMacOS:

steps:
- download: current
artifact: coverageResults-Windows
displayName: 🔻 Download Windows code coverage results
continueOnError: true
- download: current
artifact: coverageResults-Linux
displayName: 🔻 Download Linux code coverage results
continueOnError: true
- download: current
artifact: coverageResults-macOS
displayName: 🔻 Download macOS code coverage results
continueOnError: true
condition: and(succeeded(), ${{ parameters.includeMacOS }})
- powershell: azure-pipelines/Merge-CodeCoverage.ps1 -Path '$(Pipeline.Workspace)' -OutputFile coveragereport/merged.cobertura.xml -Format Cobertura -Verbose
displayName: ⚙ Merge coverage
- task: PublishCodeCoverageResults@1
Expand Down
44 changes: 0 additions & 44 deletions azure-pipelines/publish-symbols.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,10 @@
parameters:
includeMacOS:

steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: symbols-Windows
path: $(Pipeline.Workspace)/symbols/Windows
displayName: 🔻 Download Windows symbols
continueOnError: true
- task: DownloadPipelineArtifact@2
inputs:
artifact: symbols-Linux
path: $(Pipeline.Workspace)/symbols/Linux
displayName: 🔻 Download Linux symbols
continueOnError: true
- task: DownloadPipelineArtifact@2
inputs:
artifact: symbols-macOS
path: $(Pipeline.Workspace)/symbols/macOS
displayName: 🔻 Download macOS symbols
continueOnError: true
condition: ${{ parameters.includeMacOS }}

- task: DownloadPipelineArtifact@2
inputs:
artifact: test_symbols-Windows
path: $(Pipeline.Workspace)/test_symbols/Windows
displayName: 🔻 Download Windows test symbols
continueOnError: true
- task: DownloadPipelineArtifact@2
inputs:
artifact: test_symbols-Linux
path: $(Pipeline.Workspace)/test_symbols/Linux
displayName: 🔻 Download Linux test symbols
continueOnError: true
- task: DownloadPipelineArtifact@2
inputs:
artifact: test_symbols-macOS
path: $(Pipeline.Workspace)/test_symbols/macOS
displayName: 🔻 Download macOS test symbols
continueOnError: true
condition: ${{ parameters.includeMacOS }}

- task: PublishSymbols@2
inputs:
Expand All @@ -49,11 +13,3 @@ steps:
IndexSources: false
SymbolServerType: TeamServices
displayName: 📢 Publish symbols

- task: PublishSymbols@2
inputs:
SymbolsFolder: $(Pipeline.Workspace)/test_symbols
SearchPattern: '**/*.pdb'
IndexSources: false
SymbolServerType: TeamServices
displayName: 📢 Publish test symbols
4 changes: 2 additions & 2 deletions azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pr: none
resources:
pipelines:
- pipeline: CI
source: Library # TODO: This should match the name of your CI pipeline
source: maui-aspire # TODO: This should match the name of your CI pipeline
trigger:
tags:
- auto-release
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
- task: GitHubRelease@1
displayName: 📢 GitHub release (create)
inputs:
gitHubConnection: # TODO: fill in service connection here
gitHubConnection: github.com_BretJohnson # TODO: fill in service connection here
repositoryName: $(Build.Repository.Name)
target: $(resources.pipeline.CI.sourceCommit)
tagSource: userSpecifiedTag
Expand Down

0 comments on commit 6a535de

Please sign in to comment.