Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2e25071
Update azure-pipelines.yml for Azure Pipelines
angularsen Jun 10, 2022
fc17c70
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
67598dc
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
656d7ad
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
6a2a4cf
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
3e12d4e
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
a7d9710
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
f24515f
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 2, 2022
f31e03e
Merge branch 'master' into azure-pipelines
angularsen Nov 2, 2022
a9956d0
Fix installing .NET nanoFramework msbuild in AZDO pipeline (#1150)
josesimoes Nov 3, 2022
b35e6ba
Fix build of nanoFramework with msbuild in VS2022 (#1151)
josesimoes Nov 4, 2022
174f272
Try remove Any CPU
angularsen Nov 4, 2022
9ada40c
Merge branch 'master' into azure-pipelines
angularsen Nov 4, 2022
72084f7
Revert "Try remove Any CPU"
angularsen Nov 4, 2022
a1ea36c
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 4, 2022
15784e2
codecov fixes
angularsen Nov 4, 2022
60ee205
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 4, 2022
eff15e7
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 4, 2022
a13742b
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 5, 2022
466c985
Update azure-pipelines.yml for Azure Pipelines
angularsen Nov 5, 2022
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
9 changes: 5 additions & 4 deletions Build/build-functions.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ $testReportDir = "$root\Artifacts\Logs"
$testCoverageDir = "$root\Artifacts\Coverage"
$nuget = "$root\Tools\NuGet.exe"
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$msbuild = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
if ($msbuild) {
$msbuild = join-path $msbuild 'MSBuild\Current\Bin\MSBuild.exe'
$msbuildPath = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
if ($msbuildPath) {
$msbuild = join-path $msbuildPath 'MSBuild\Current\Bin\MSBuild.exe'
$msbuildx64 = join-path $msbuildPath 'MSBuild\Current\Bin\amd64\MSBuild.exe'
}

import-module $PSScriptRoot\build-pack-nano-nugets.psm1
Expand Down Expand Up @@ -70,7 +71,7 @@ function Start-Build([boolean] $IncludeWindowsRuntimeComponent = $false, [boolea
# msbuild does not auto-restore nugets for this project type
& "$nuget" restore "$root\UnitsNet.NanoFramework\GeneratedCode\UnitsNet.nanoFramework.sln"
# now build
& "$msbuild" "$root\UnitsNet.NanoFramework\GeneratedCode\UnitsNet.nanoFramework.sln" /verbosity:minimal /p:Configuration=Release $fileLoggerArg $appVeyorLoggerArg
& "$msbuildx64" "$root\UnitsNet.NanoFramework\GeneratedCode\UnitsNet.nanoFramework.sln" /verbosity:minimal /p:Configuration=Release /p:Platform="Any CPU" $fileLoggerArg $appVeyorLoggerArg
if ($lastexitcode -ne 0) { exit 1 }
}

Expand Down
3 changes: 3 additions & 0 deletions Build/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if (-not (Test-Path "$root/Tools/reportgenerator.exe")) {
Write-Host -Foreground Green "Download dotnet-reportgenerator-globaltool...OK."
}

###################################################
## TODO: OK to remove after moving to AZDO pipeline
$VsWherePath = "${env:PROGRAMFILES(X86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$VsPath = $(&$VsWherePath -latest -property installationPath)
$msbuildPath = Join-Path -Path $VsPath -ChildPath "\MSBuild"
Expand Down Expand Up @@ -82,6 +84,7 @@ if (!(Test-Path "$msbuildPath/nanoFramework")) {

Write-Host "Installed VS extension $extensionVersion"
}
###################################################

# Cleanup
[system.io.Directory]::Delete($tempDir, $true) | out-null
Expand Down
57 changes: 38 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,61 @@
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger: none
trigger:
branches:
include:
- master

pool:
vmImage: ubuntu-latest
vmImage: windows-latest

variables:
- group: common

steps:
- checkout: self
fetchDepth: 1
clean: false
lfs: true
submodules: false
fetchTags: false

- task: InstallNanoMSBuildComponents@1
displayName: Install .NET nanoFramework MSBuild components

- task: Bash@3
displayName: 'Generate code'
inputs:
targetType: 'inline'
script: 'dotnet run CodeGen'
failOnStderr: true
- task: PowerShell@2
displayName: 'Build, test, pack'
inputs:
filePath: 'Build/build.ps1'
arguments: '-IncludeWindowsRuntimeComponent -IncludeNanoFramework'
arguments: '-IncludeNanoFramework'
# arguments: '-IncludeWindowsRuntimeComponent -IncludeNanoFramework'
failOnStderr: true
showWarnings: true
pwsh: true
workingDirectory: '$(Build.SourcesDirectory)'

- task: PowerShell@2
displayName: Upload to codecov.io
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
inputs:
targetType: 'inline'
failOnStderr: true
showWarnings: true
pwsh: true
script: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://keybase.io/codecovsecurity/pgp_keys.asc -OutFile codecov.asc
Write-Host -Foreground Green "Downloading codecov binaries..."

Invoke-WebRequest -Uri https://uploader.codecov.io/verification.gpg -OutFile codecov.asc
gpg.exe --import codecov.asc

Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM -Outfile codecov.exe.SHA256SUM
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig

gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
If ($(Compare-Object -ReferenceObject $(($(certUtil -hashfile codecov.exe SHA256)[1], "codecov.exe") -join " ") -DifferenceObject $(Get-Content codecov.exe.SHA256SUM)).length -eq 0) { echo "SHASUM verified" } Else {exit 1}

.\codecov.exe "Artifacts/Coverage" -t $env:codecov_upload_token


Write-Host -Foreground Green "Uploading to codecov..."

.\codecov.exe --dir "Artifacts/Coverage" -t "$env:CODECOV_TOKEN" -b "$(Build.BuildNumber)"

Write-Host -Foreground Green "✅ Uploaded to codecov."
pwsh: true