-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AOT] Added new CI for AOTCompatibility tests and removed unit test (#…
- Loading branch information
Showing
6 changed files
with
56 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Publish AOTCompatibility testApp | ||
|
||
on: | ||
push: | ||
branches: [ 'main*' ] | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
branches: [ 'main*' ] | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
aot-test: | ||
strategy: | ||
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | ||
matrix: | ||
os: [ windows-latest ] | ||
version: [ net7.0 ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # fetching all | ||
|
||
- name: Read publish AOT testApp output and assert warning count | ||
shell: pwsh | ||
run: .\build\assert-publish-aot-testApp-warning-count.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$rootDirectory = Split-Path $PSScriptRoot -Parent | ||
$publishOutput = dotnet publish $rootDirectory\test\OpenTelemetry.AotCompatibility.TestApp\OpenTelemetry.AotCompatibility.TestApp.csproj -nodeReuse:false /p:UseSharedCompilation=false | ||
|
||
$actualWarningCount = 0 | ||
|
||
foreach ($line in $($publishOutput -split "`r`n")) | ||
{ | ||
if ($line -like "*analysis warning IL*") | ||
{ | ||
$actualWarningCount += 1 | ||
} | ||
} | ||
|
||
Write-Host "Actual warning count is:", $actualWarningCount | ||
$expectedWarningCount = 28 | ||
|
||
$testPassed = 0 | ||
if ($actualWarningCount -ne $expectedWarningCount) | ||
{ | ||
$testPassed = 1 | ||
Write-Host "Actual warning count:", actualWarningCount, "is not as expected. Expected warning count is:", $expectedWarningCount | ||
} | ||
|
||
Exit $testPassed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 0 additions & 90 deletions
90
test/OpenTelemetry.AotCompatibility.Tests/AotCompatibilityTests.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
test/OpenTelemetry.AotCompatibility.Tests/OpenTelemetry.AotCompatibility.Tests.csproj
This file was deleted.
Oops, something went wrong.