File tree Expand file tree Collapse file tree 9 files changed +105
-45
lines changed
build-tools/automation/templates
Java.Interop-PerformanceTests Expand file tree Collapse file tree 9 files changed +105
-45
lines changed Original file line number Diff line number Diff line change 5050 <XamarinAndroidToolsDirectory Condition =" '$(XamarinAndroidToolsDirectory)' == '' " >$(MSBuildThisFileDirectory)external\xamarin-android-tools</XamarinAndroidToolsDirectory >
5151 </PropertyGroup >
5252 <PropertyGroup >
53+ <CmakePath Condition =" '$(CmakePath)' == '' " >cmake</CmakePath >
5354 <GradleHome Condition =" '$(GradleHome)' == '' " >$(MSBuildThisFileDirectory)build-tools\gradle</GradleHome >
5455 <GradleWPath Condition =" '$(GradleWPath)' == '' " >$(GradleHome)\gradlew</GradleWPath >
5556 <GradleArgs Condition =" '$(GradleArgs)' == '' " >--stacktrace --no-daemon</GradleArgs >
Original file line number Diff line number Diff line change 66 displayName : Prepare Solution
77 inputs :
88 projects : Java.Interop.sln
9- arguments : ' -c $(Build.Configuration) -target:Prepare'
9+ arguments : ' -c $(Build.Configuration) -target:Prepare /v:diag '
1010
1111- task : DotNetCoreCLI@2
1212 displayName : Build Solution
1313 inputs :
1414 projects : Java.Interop.sln
15- arguments : ' -c $(Build.Configuration) -m:1'
15+ arguments : ' -c $(Build.Configuration) -m:1 /v:diag '
Original file line number Diff line number Diff line change @@ -90,3 +90,19 @@ steps:
9090 command : test
9191 arguments : bin/Test$(Build.Configuration)/Java.Interop.Export-Tests.dll
9292 continueOnError : true
93+
94+ - task : DotNetCoreCLI@2
95+ displayName : ' Tests: Java.Interop'
96+ condition : eq('${{ parameters.runNativeTests }}', 'true')
97+ inputs :
98+ command : test
99+ arguments : bin/Test$(Build.Configuration)/Java.Interop-PerformanceTests.dll
100+ continueOnError : true
101+
102+ - task : DotNetCoreCLI@2
103+ displayName : ' Tests: Java.Interop'
104+ condition : eq('${{ parameters.runNativeTests }}', 'true')
105+ inputs :
106+ command : test
107+ arguments : bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Interop-PerformanceTests.dll
108+ continueOnError : true
Original file line number Diff line number Diff line change 1+ <Project >
2+
3+ <Target Name =" BuildPerformanceTestJar"
4+ BeforeTargets =" BeforeBuild"
5+ Inputs =" @(JavaPerformanceTestJar)"
6+ Outputs =" $(OutputPath)performance-test.jar" >
7+ <MakeDir Directories =" $(IntermediateOutputPath)pt-classes" />
8+ <Exec Command =" " $(JavaCPath)" $(_JavacSourceOptions) -d " $(IntermediateOutputPath)pt-classes" @(JavaPerformanceTestJar->'%(Identity)', ' ')" />
9+ <Exec Command =" " $(JarPath)" cf " $(OutputPath)performance-test.jar" -C " $(IntermediateOutputPath)pt-classes" ." />
10+ </Target >
11+
12+ </Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net472</ TargetFramework >
4+ <TargetFrameworks >net472;netcoreapp3.1</ TargetFrameworks >
55 <IsPackable >false</IsPackable >
66 <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
77 </PropertyGroup >
2525 <ProjectReference Include =" ..\..\src\Java.Interop\Java.Interop.csproj" />
2626 <ProjectReference Include =" ..\..\src\Java.Interop.GenericMarshaler\Java.Interop.GenericMarshaler.csproj" />
2727 <ProjectReference Include =" ..\..\src\Java.Runtime.Environment\Java.Runtime.Environment.csproj" />
28+ <ProjectReference Include =" ..\NativeTiming\NativeTiming.csproj" />
2829 <ProjectReference Include =" ..\TestJVM\TestJVM.csproj" />
2930 </ItemGroup >
3031
3132 <ItemGroup >
3233 <JavaPerformanceTestJar Include =" $(MSBuildThisFileDirectory)java\com\xamarin\interop\performance\JavaTiming.java" />
3334 </ItemGroup >
34-
35- <Target Name =" BuildPerformanceTestJar" BeforeTargets =" BeforeBuild" Inputs =" @(JavaPerformanceTestJar)" Outputs =" $(OutputPath)performance-test.jar" >
36- <MakeDir Directories =" $(IntermediateOutputPath)pt-classes" />
37- <Exec Command =" " $(JavaCPath)" $(_JavacSourceOptions) -d " $(IntermediateOutputPath)pt-classes" @(JavaPerformanceTestJar->'%(Identity)', ' ')" />
38- <Exec Command =" " $(JarPath)" cf " $(OutputPath)performance-test.jar" -C " $(IntermediateOutputPath)pt-classes" ." />
39- </Target >
4035
4136</Project >
Original file line number Diff line number Diff line change 1+ set (CMAKE_OSX_ARCHITECTURES x86_64 arm64)
2+
3+ project (NativeTiming C)
4+
5+ cmake_minimum_required (VERSION 3.10.2)
6+
7+ foreach (dir in ${JDK_INCLUDE_LIST} )
8+ include_directories (${dir} )
9+ endforeach ()
10+
11+ add_library (NativeTiming SHARED timing.c)
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.Build.NoTargets" >
2+
3+ <PropertyGroup >
4+ <NativeTimingLibName Condition =" '$(OS)' != 'Windows_NT' And Exists ('/Library/Frameworks/') " >libNativeTiming.dylib</NativeTimingLibName >
5+ <NativeTimingLibName Condition =" '$(OS)' != 'Windows_NT' And !Exists ('/Library/Frameworks/') " >libNativeTiming.so</NativeTimingLibName >
6+ <NativeTimingLibName Condition =" '$(OS)' == 'Windows_NT' " >NativeTiming.dll</NativeTimingLibName >
7+ <NativeTimingOutputPath >$(OutputPath)$(NativeTimingLibName)</NativeTimingOutputPath >
8+ </PropertyGroup >
9+
10+ <ItemGroup >
11+ <None Include =" $(NativeTimingOutputPath)" >
12+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
13+ </None >
14+ </ItemGroup >
15+
16+
17+ <Target Name =" _BuildLibs"
18+ BeforeTargets =" Build"
19+ DependsOnTargets =" _PrepareCmake;_BuildNativeTiming" >
20+ </Target >
21+
22+ <Target Name =" _PrepareCmake"
23+ Inputs =" CMakeLists.txt;$(MSBuildThisFileFullPath);NativeTiming.csproj"
24+ Outputs =" $(IntermediateOutputPath)CMakeCache.txt" >
25+ <MakeDir Directories =" $(IntermediateOutputPath)" />
26+ <PropertyGroup >
27+ <_JdkDirs >"-DJDK_INCLUDE_LIST=@(JdkIncludePath, ';')"</_JdkDirs >
28+ </PropertyGroup >
29+ <Exec Command =" $(CmakePath) -S . -B $(IntermediateOutputPath) $(_JdkDirs)" />
30+ <Touch Files =" $(IntermediateOutputPath)CMakeCache.txt" />
31+ </Target >
32+
33+ <Target Name =" _BuildNativeTiming"
34+ Inputs =" timing.c"
35+ Outputs =" $(NativeTimingOutputPath)" >
36+ <Exec Command =" make -C $(IntermediateOutputPath)" />
37+ <ItemGroup >
38+ <_Libs Include =" $(IntermediateOutputPath)*NativeTiming*" />
39+ </ItemGroup >
40+ <Copy
41+ SourceFiles =" @(_Libs)"
42+ DestinationFolder =" $(OutputPath)"
43+ />
44+ <Touch Files =" $(NativeTimingOutputPath)" />
45+ </Target >
46+
47+ </Project >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.Build.NoTargets" >
2+ <PropertyGroup >
3+ <TargetFrameworks >netstandard2.0;netcoreapp3.1</TargetFrameworks >
4+ <Configuration Condition =" '$(Configuration)' == '' " >Debug</Configuration >
5+ <Platform Condition =" '$(Platform)' == '' " >AnyCPU</Platform >
6+ <OutputType >Exe</OutputType >
7+ <AppendTargetFrameworkToOutputPath >false</AppendTargetFrameworkToOutputPath >
8+ </PropertyGroup >
9+
10+ <PropertyGroup >
11+ <OutputPath >$(TestOutputFullPath)</OutputPath >
12+ </PropertyGroup >
13+
14+ </Project >
You can’t perform that action at this time.
0 commit comments