This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Move MMI to netstandard2.0 and include OMI v1.6.0 #37
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7dc3d09
Build MMI with netstandard 2.0
adityapatwardhan c745eb6
Add more properties in csproj
adityapatwardhan 1b56cef
Attemp to enable tests
adityapatwardhan c0cb135
Add test fixes
adityapatwardhan 052f999
Remove copy of OMI deb package
adityapatwardhan eb911de
Fix more tests
adityapatwardhan 1288a79
Add named log file
adityapatwardhan b436cb0
Remove csproj specialization
adityapatwardhan 31213ae
Set up CI with Azure Pipelines
adityapatwardhan 53c1f19
Update azure-pipelines.yml for Azure Pipelines
adityapatwardhan 2b53660
Add artifact publish and execute tests
adityapatwardhan 99b9789
Add publishing of PDB as artifact
adityapatwardhan 85eb7c0
Cleanup commented code
adityapatwardhan ddff88f
Address Travis's comments
adityapatwardhan eda3868
Fix script path syntax
adityapatwardhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,42 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
|
||
trigger: | ||
- master | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
steps: | ||
- checkout: self | ||
submodules: recursive | ||
- script: sudo apt-get install libpam0g-dev libssl-dev libcurl4-openssl-dev | ||
displayName: 'apt-get dependencies' | ||
|
||
- task: ShellScript@2 | ||
inputs: | ||
scriptPath: build.sh | ||
displayName: 'Build MMI' | ||
|
||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: 'release' | ||
targetPath: src/Microsoft.Management.Infrastructure/bin/Microsoft.Management.Infrastructure.dll | ||
|
||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: 'release' | ||
targetPath: src/Microsoft.Management.Infrastructure/bin/Microsoft.Management.Infrastructure.pdb | ||
|
||
- task: ShellScript@2 | ||
inputs: | ||
scriptPath: test.sh | ||
displayName: 'Execute Tests' | ||
|
||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFormat: 'VSTest' | ||
testResultsFiles: '**/*TestResults.trx' | ||
|
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 |
---|---|---|
@@ -1,16 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Build OMI | ||
( | ||
cd src/omi/Unix | ||
./configure --dev | ||
make -j | ||
) | ||
|
||
# Copy libmi | ||
mkdir -p bin | ||
cp src/omi/Unix/output/lib/libmi.so bin | ||
# Install OMI | ||
wget https://github.com/microsoft/omi/releases/download/v1.6.0/omi-1.6.0-0.ssl_110.ulinux.x64.deb -O omi-1.6.0-0.ssl_110.ulinux.x64.deb | ||
sudo apt-get install cron -y | ||
sudo apt install ./omi-1.6.0-0.ssl_110.ulinux.x64.deb | ||
|
||
# Build MMI | ||
PATH=$PATH:~/.dotnet dotnet restore -v Warning | ||
PATH=$PATH:~/.dotnet dotnet build -f netstandard1.5 src/Microsoft.Management.Infrastructure/ -c Linux -o bin | ||
PATH=$PATH:~/.dotnet dotnet build -f netstandard2.0 src/Microsoft.Management.Infrastructure/ -c Linux -o bin |
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
24 changes: 24 additions & 0 deletions
24
src/Microsoft.Management.Infrastructure/Microsoft.Management.Infrastructure.csproj
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 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<Version>2.0.0-preview.1</Version> | ||
<DelaySign>true</DelaySign> | ||
<AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk"</AssemblyOriginatorKeyFile> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<NoWarn>0649</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' == 'Linux' "> | ||
<DefineConstants>$(DefineConstants);_CORECLR;_LINUX</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Security.SecureString" Version="4.3.0"/> | ||
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" /> | ||
<PackageReference Include="System.Threading.ThreadPool" Version="4.3.0"/> | ||
<PackageReference Include="System.Security.Permissions" Version="4.5.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env sh | ||
src/omi/Unix/output/bin/omiserver -i -d --livetime 120 --httpport 0 --httpsport 0 | ||
PATH=$PATH:~/.dotnet dotnet test test/Microsoft.Management.Infrastructure.Tests/ -c Linux -o bin | ||
mkdir -p test/Microsoft.Management.Infrastructure.Tests/bin/ | ||
cp /opt/omi/lib/libmi.so test/Microsoft.Management.Infrastructure.Tests/bin/ | ||
/opt/omi/bin/omiserver -i -d --livetime 120 --httpport 0 --httpsport 0 | ||
PATH=$PATH:~/.dotnet dotnet test test/Microsoft.Management.Infrastructure.Tests/ -c Linux -o bin --logger "trx;LogFileName=TestResults.trx" |
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
36 changes: 36 additions & 0 deletions
36
...icrosoft.Management.Infrastructure.Tests/Microsoft.Management.Infrastructure.Tests.csproj
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,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
<DelaySign>true</DelaySign> | ||
<AssemblyOriginatorKeyFile>../../signing/visualstudiopublic.snk"</AssemblyOriginatorKeyFile> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<NoWarn>0649</NoWarn> | ||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' == 'Linux' "> | ||
<DefineConstants>$(DefineConstants);_CORECLR;_LINUX</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../../src/Microsoft.Management.Infrastructure/Microsoft.Management.Infrastructure.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="*.cs" /> | ||
<Compile Include="Helpers/**/*.cs" /> | ||
<Compile Include="InternalTests/**/*.cs" /> | ||
<Compile Include="NativeTests/**/*.cs" /> | ||
<Compile Include="SerializationTests/**/*.cs" /> | ||
<Compile Include="UnitTests/**/*.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | ||
<PackageReference Include="xunit" Version="2.4.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the simple task name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other shell task too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed