Skip to content

Commit ac3086b

Browse files
committed
add windows c# ci job
fix #4184
1 parent 78e6f3c commit ac3086b

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

.ci/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,33 @@ jobs:
165165

166166
steps:
167167
- template: ./windows-steps.yml
168+
169+
- job: windows_swig
170+
displayName: Windows SWIG Interface
171+
dependsOn: windows_libshogun
172+
timeoutInMinutes: 120
173+
174+
pool:
175+
vmImage: 'vs2017-win2016'
176+
177+
strategy:
178+
matrix:
179+
csharp:
180+
cmakeOptions: '$(commonSWIGCMakeFlags) -DINTERFACE_CSHARP=ON'
181+
interfaceName: 'csharp'
182+
183+
variables:
184+
targetPrefix: '$(Build.BinariesDirectory)\\opt'
185+
libshogunArtifactName: 'libshogun-vs17'
186+
libshogunArchive: '$(Build.ArtifactStagingDirectory)/libshogun-$(Build.BuildId).tar.gz'
187+
commonSWIGCMakeFlags: '-DLIBSHOGUN=OFF -DDISABLE_UNIT_TESTS=ON -DDISABLE_META_CPP=ON'
188+
clcacheDir: 'C:\\Users\\VssAdministrator\\clcache'
189+
clcacheArtifactName: 'clcache-$(interfaceName)'
190+
clcacheArchive: '$(Build.ArtifactStagingDirectory)/clcache-$(Build.BuildId).tar.gz'
191+
buildConfiguration: Release
192+
buildPlatform: x64
193+
194+
steps:
195+
- template: ./windows-steps.yml
196+
parameters:
197+
swig: true

.ci/windows-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ steps:
4545
displayName: 'Build ($(buildConfiguration) $(buildPlatform))'
4646
workingDirectory: $(Build.SourcesDirectory)\build
4747

48-
- script: ctest -j 2
48+
- script: ctest --output-on-failure -j 2
4949
displayName: Test
5050
workingDirectory: $(Build.SourcesDirectory)\build
5151

cmake/FindCSharp.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ endif( )
6464

6565

6666
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CSharp FOUND_VAR CSHARP_FOUND
67-
REQUIRED_VARS CSHARP_TYPE CSHARP_COMPILER CSHARP_INTERPRETER
67+
REQUIRED_VARS CSHARP_TYPE CSHARP_COMPILER
6868
VERSION_VAR CSHARP_VERSION)
6969

7070
mark_as_advanced( CSHARP_TYPE CSHARP_VERSION CSHARP_COMPILER CSHARP_INTERPRETER CSHARP_PLATFORM CSHARP_SDK )

src/interfaces/csharp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GENERATE_INTERFACE_TARGET(csharp ${CMAKE_CURRENT_SOURCE_DIR} "")
77

88
ADD_CUSTOM_COMMAND(TARGET interface_csharp
99
POST_BUILD
10-
COMMAND "${CSHARP_COMPILER}" /t:library *.cs /out:shogun.dll
10+
COMMAND "${CSHARP_COMPILER}" /t:library /out:shogun.dll *.cs
1111
COMMENT "Creating shogun.dll")
1212
IF(NOT CSHARP_INSTALL_DIR)
1313
SET(CSHARP_INSTALL_DIR "lib/cli/shogun")

0 commit comments

Comments
 (0)