33# Add steps that build, run tests, deploy, and more:
44# https://aka.ms/yaml
55
6- trigger : none
6+ trigger :
7+ branches :
8+ include :
9+ - master
710
811pool :
9- vmImage : ubuntu-latest
12+ vmImage : windows-latest
13+
14+ variables :
15+ - group : common
16+
17+ steps :
18+ - checkout : self
19+ fetchDepth : 1
20+ clean : false
21+ lfs : true
22+ submodules : false
23+ fetchTags : false
24+
25+ - task : InstallNanoMSBuildComponents@1
26+ displayName : Install .NET nanoFramework MSBuild components
1027
11- - task : Bash@3
12- displayName : ' Generate code'
13- inputs :
14- targetType : ' inline'
15- script : ' dotnet run CodeGen'
16- failOnStderr : true
1728- task : PowerShell@2
1829 displayName : ' Build, test, pack'
1930 inputs :
2031 filePath : ' Build/build.ps1'
21- arguments : ' -IncludeWindowsRuntimeComponent -IncludeNanoFramework'
32+ arguments : ' -IncludeNanoFramework'
33+ # arguments: '-IncludeWindowsRuntimeComponent -IncludeNanoFramework'
2234 failOnStderr : true
2335 showWarnings : true
2436 pwsh : true
37+ workingDirectory : ' $(Build.SourcesDirectory)'
38+
2539- task : PowerShell@2
40+ displayName : Upload to codecov.io
41+ env :
42+ CODECOV_TOKEN : $(CODECOV_TOKEN)
2643 inputs :
2744 targetType : ' inline'
28- failOnStderr : true
29- showWarnings : true
30- pwsh : true
3145 script : |
32- $ProgressPreference = 'SilentlyContinue'
33- Invoke-WebRequest -Uri https://keybase.io/codecovsecurity/pgp_keys.asc -OutFile codecov.asc
46+ Write-Host -Foreground Green "Downloading codecov binaries..."
47+
48+ Invoke-WebRequest -Uri https://uploader.codecov.io/verification.gpg -OutFile codecov.asc
3449 gpg.exe --import codecov.asc
35-
50+
3651 Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
3752 Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM -Outfile codecov.exe.SHA256SUM
3853 Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig
39-
54+
4055 gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
4156 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}
42-
43- .\codecov.exe "Artifacts/Coverage" -t $env:codecov_upload_token
44-
57+
58+ Write-Host -Foreground Green "Uploading to codecov..."
59+
60+ .\codecov.exe --dir "Artifacts/Coverage" -t "$env:CODECOV_TOKEN" -b "$(Build.BuildNumber)"
61+
62+ Write-Host -Foreground Green "✅ Uploaded to codecov."
63+ pwsh : true
0 commit comments