Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion tests/monotouch-test/AudioUnit/AudioUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void CopyIconTest ()
}

[Test]
public unsafe void TestSizeOf()
public unsafe void TestSizeOf ()
{
Assert.AreEqual (sizeof (AudioFormat), Marshal.SizeOf (typeof (AudioFormat)));
Assert.AreEqual (sizeof (AudioValueRange), Marshal.SizeOf (typeof (AudioValueRange)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ steps:
} catch {
$converted = $inputContents + "`n`nUnable to convert markdown: $_`n`n"
}
$githubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:GIT_HASH
$githubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:COMMENT_HASH
$result = $githubComments.NewCommentFromMessage("", "", $converted)
displayName: 'Publish GitHub comment for change detection'
timeoutInMinutes: 10
continueOnError: true # don't let any failures here stop us
condition: always() # We always want to post something on github
env:
GITHUB_TOKEN: $(GitHub.Token)
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(GIT_HASH)
${{ else }}:
COMMENT_HASH: $(Build.SourceVersion)
7 changes: 6 additions & 1 deletion tools/devops/automation/templates/build/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,15 @@ steps:
# to write a comment.
- pwsh: |
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\xamarin-macios\tools\devops\automation\scripts\MaciosCI.psd1
$githubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $(GitHub.Token) -Hash $Env:GIT_HASH
$githubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $(GitHub.Token) -Hash $Env:COMMENT_HASH
$githubComments.NewCommentFromMessage("Build failed", ":fire:", "Build failed for the job '$(System.JobDisplayName)'")
condition: failed()
displayName: 'Report build failure'
env:
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(GIT_HASH)
${{ else }}:
COMMENT_HASH: $(Build.SourceVersion)

# Upload any crash reports that occurred during the build. This is helpful if we want to file issues about dotnet/csc crashing during the build.
- bash: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/collect-and-upload-crash-reports.sh
Expand Down
6 changes: 5 additions & 1 deletion tools/devops/automation/templates/mac/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ steps:
# Make sure to report any errors
- pwsh: |
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\xamarin-macios\tools\devops\automation\scripts\MaciosCI.psd1
$githubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $(GitHub.Token) -Hash $Env:GIT_HASH
$githubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $(GitHub.Token) -Hash $Env:COMMENT_HASH
$statuses = New-GitHubStatusesObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $(GitHub.Token)

if (Test-Path -Path "$Env:GITHUB_FAILURE_COMMENT_FILE" -PathType Leaf) {
Expand All @@ -290,3 +290,7 @@ steps:
GITHUB_TOKEN: $(GitHub.Token)
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
TEST_BOT: $(Agent.Name)
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(GIT_HASH)
${{ else }}:
COMMENT_HASH: $(Build.SourceVersion)
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ steps:
- pwsh: |
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\xamarin-macios\tools\devops\automation\scripts\MaciosCI.psd1
$artifact = New-ArtifactsFromJsonFile -Path "$Env:ARTIFACTS_JSON_PATH"
$gihubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:GIT_HASH
$gihubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:COMMENT_HASH
$result = $gihubComments.NewCommentFromObject("Artifacts", ":books:", $artifact)
Write-Host $result
env:
BUILD_REVISION: $(Build.SourceVersion)
GITHUB_TOKEN: $(GitHub.Token)
ACCESSTOKEN: $(System.AccessToken)
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(GIT_HASH)
${{ else }}:
COMMENT_HASH: $(Build.SourceVersion)
displayName: 'Create github comment.'
enabled: true
timeoutInMinutes: 10
6 changes: 5 additions & 1 deletion tools/devops/automation/templates/tests/publish-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ steps:
$emoji = ":fire:"
}

$gihubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:GIT_HASH -Debug
$gihubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:COMMENT_HASH -Debug
$result = $gihubComments.NewCommentFromObject("Test results", $emoji, $parallelResults)
} catch {
New-GitHubComment -Header "Failed to compute test summaries on $Env:CONTEXT" -Emoji ":fire:" -Description "Failed to compute test summaries: $_."
Expand All @@ -96,6 +96,10 @@ steps:
TESTS_JOBSTATUS: $(TESTS_JOBSTATUS) # set by the runTests step
TESTS_SUMMARY: $(TEST_SUMMARY_PATH)
ACCESSTOKEN: $(System.AccessToken)
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(GIT_HASH)
${{ else }}:
COMMENT_HASH: $(Build.SourceVersion)
displayName: 'Add summaries'
condition: always()
timeoutInMinutes: 15
6 changes: 5 additions & 1 deletion tools/devops/automation/templates/tests/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ stages:
- pwsh: |
Import-Module $Env:SYSTEM_DEFAULTWORKINGDIRECTORY\xamarin-macios\tools\devops\automation\scripts\MaciosCI.psd1

$gihubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:GIT_HASH -Debug
$gihubComments = New-GitHubCommentsObjectFromUrl -Url "$(Build.Repository.Uri)" -Token $Env:GITHUB_TOKEN -Hash $Env:COMMENT_HASH -Debug
$sb = [System.Text.StringBuilder]::new()
$sb.AppendLine("All tests have been skipped because the label 'skip-all-tests' was set.")
$result = $gihubComments.NewCommentFromMessage("Test results", ":seedling:", $sb.ToString())
Expand All @@ -231,3 +231,7 @@ stages:
DEVICE_PREFIX: ${{ parameters.testPrefix }}
GITHUB_TOKEN: $(GitHub.Token)
ACCESSTOKEN: $(System.AccessToken)
${{ if eq(parameters.repositoryAlias, 'self') }}:
COMMENT_HASH: $(GIT_HASH)
${{ else }}:
COMMENT_HASH: $(Build.SourceVersion)