3
3
# Add steps that build, run tests, deploy, and more:
4
4
# https://aka.ms/yaml
5
5
6
- trigger : none
6
+ trigger :
7
+ branches :
8
+ include :
9
+ - master
7
10
8
11
pool :
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
10
27
11
- - task : Bash@3
12
- displayName : ' Generate code'
13
- inputs :
14
- targetType : ' inline'
15
- script : ' dotnet run CodeGen'
16
- failOnStderr : true
17
28
- task : PowerShell@2
18
29
displayName : ' Build, test, pack'
19
30
inputs :
20
31
filePath : ' Build/build.ps1'
21
- arguments : ' -IncludeWindowsRuntimeComponent -IncludeNanoFramework'
32
+ arguments : ' -IncludeNanoFramework'
33
+ # arguments: '-IncludeWindowsRuntimeComponent -IncludeNanoFramework'
22
34
failOnStderr : true
23
35
showWarnings : true
24
36
pwsh : true
37
+ workingDirectory : ' $(Build.SourcesDirectory)'
38
+
25
39
- task : PowerShell@2
40
+ displayName : Upload to codecov.io
41
+ env :
42
+ CODECOV_TOKEN : $(CODECOV_TOKEN)
26
43
inputs :
27
44
targetType : ' inline'
28
- failOnStderr : true
29
- showWarnings : true
30
- pwsh : true
31
45
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
34
49
gpg.exe --import codecov.asc
35
-
50
+
36
51
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe
37
52
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM -Outfile codecov.exe.SHA256SUM
38
53
Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe.SHA256SUM.sig -Outfile codecov.exe.SHA256SUM.sig
39
-
54
+
40
55
gpg.exe --verify codecov.exe.SHA256SUM.sig codecov.exe.SHA256SUM
41
56
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