Skip to content

Commit

Permalink
remove versions for linux / macos runtimes, add version to win test
Browse files Browse the repository at this point in the history
  • Loading branch information
galabovaa committed Mar 26, 2024
1 parent 1617a82 commit e7f4faa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-nuget-package.yml
Expand Up @@ -186,5 +186,5 @@ jobs:
dotnet new console
rm Program.cs
cp $GITHUB_WORKSPACE/examples/call_highs_from_csharp.cs .
dotnet add package Highs -s name
dotnet add package Highs -s name --version=1.6.96
dotnet run
2 changes: 1 addition & 1 deletion Version.txt
@@ -1,4 +1,4 @@
HIGHS_MAJOR=1
HIGHS_MINOR=6
HIGHS_PATCH=97
HIGHS_PATCH=96
#PRE_RELEASE=YES
11 changes: 10 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -310,10 +310,19 @@ else()
set(DOTNET_PROJECT Highs)
set(DOTNET_PROJECT_DIR ${PROJECT_BINARY_DIR}/dotnet/${DOTNET_PROJECT})
file(MAKE_DIRECTORY ${DOTNET_PROJECT_DIR}/runtimes/${DOTNET_RID}/native)

if (APPLE)
set(TARGET_FILE_NAME "libhighs.dylib")
elseif(UNIX)
set(TARGET_FILE_NAME "libhighs.so")
elseif(WIN32)
set(TARGET_FILE_NAME "highs.dll")
endif()

add_custom_command(TARGET highs POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:highs>"
${DOTNET_PROJECT_DIR}/runtimes/${DOTNET_RID}/native
${DOTNET_PROJECT_DIR}/runtimes/${DOTNET_RID}/native/${TARGET_FILE_NAME}
COMMENT "Copying to output directory")
endif()

Expand Down

0 comments on commit e7f4faa

Please sign in to comment.