Skip to content

Commit

Permalink
[vowpal-wabbit] New port (#27323)
Browse files Browse the repository at this point in the history
* add vowpalwabbit port

* update baseline

* update version

* update baseline after version change

* mark arm64-windows as fail

* Update vowpalwabbit.json

* Update ci.baseline.txt

* Update ci.baseline.txt

* update supports field in manifest

* run x-add-version

* Update ci.baseline.txt

* Add usage and nitpick quotes.

* rename port to vowpal-wabbit and add patch to remove bin targets

* update versions, rename port

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
  • Loading branch information
3 people authored Oct 24, 2022
1 parent 934a99d commit 0c7c52d
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ports/vowpal-wabbit/cmake_remove_bin_targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/vowpalwabbit/CMakeLists.txt b/vowpalwabbit/CMakeLists.txt
index 56cb361ec..ec23fb654 100644
--- a/vowpalwabbit/CMakeLists.txt
+++ b/vowpalwabbit/CMakeLists.txt
@@ -1,9 +1,9 @@
-add_subdirectory(active_interactor)
+# add_subdirectory(active_interactor)
add_subdirectory(allreduce)
if(VW_BUILD_VW_C_WRAPPER)
add_subdirectory(c_wrapper)
endif()
-add_subdirectory(cli)
+# add_subdirectory(cli)
add_subdirectory(common)
add_subdirectory(config)
add_subdirectory(core)
@@ -14,7 +14,7 @@ add_subdirectory(explore)
add_subdirectory(io)
add_subdirectory(model_merger)
add_subdirectory(slim)
-add_subdirectory(spanning_tree_bin)
+# add_subdirectory(spanning_tree_bin)
add_subdirectory(spanning_tree)
if(BUILD_FLATBUFFERS)
add_subdirectory(fb_parser)
30 changes: 30 additions & 0 deletions ports/vowpal-wabbit/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO VowpalWabbit/vowpal_wabbit
REF 9496a6dd5610910a495ca004a93c8ab6913293e4
SHA512 df4da3f3ab763dbd113b0ace0552d676ec905a6ff0d942d9fc1828e36fb8440d1b75a61c1ea6de09879e0f52547366936d02a77dba2bac89503a075da12414db
HEAD_REF master
PATCHES cmake_remove_bin_targets.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DVW_INSTALL=ON
-DRAPIDJSON_SYS_DEP=ON
-DFMT_SYS_DEP=ON
-DSPDLOG_SYS_DEP=ON
-DVW_BOOST_MATH_SYS_DEP=ON
-DVW_ZLIB_SYS_DEP=ON
-DVW_BUILD_VW_C_WRAPPER=OFF
-DBUILD_TESTING=OFF
)
vcpkg_cmake_install()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/VowpalWabbit)
4 changes: 4 additions & 0 deletions ports/vowpal-wabbit/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vowpalwabbit provides CMake targets:

find_package(VowpalWabbit CONFIG REQUIRED)
target_link_libraries(main PRIVATE VowpalWabbit::vw_core)
25 changes: 25 additions & 0 deletions ports/vowpal-wabbit/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "vowpal-wabbit",
"version": "9.5.0",
"description": "Reduction based online learning framework with a focus on contextual bandits and reinforcement learning.",
"homepage": "https://github.com/vowpalwabbit/vowpal_wabbit",
"license": "BSD-3-Clause",
"supports": "!x86 & !uwp & !(windows & arm)",
"dependencies": [
"boost-math",
"flatbuffers",
"fmt",
"rapidjson",
"spdlog",
"string-view-lite",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7804,6 +7804,10 @@
"baseline": "1.3.204",
"port-version": 1
},
"vowpal-wabbit": {
"baseline": "9.5.0",
"port-version": 0
},
"vs-yasm": {
"baseline": "0.5.0",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/v-/vowpal-wabbit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "1c4abceff85b2e9257c68742f509cbf4f4858c7d",
"version": "9.5.0",
"port-version": 0
}
]
}

0 comments on commit 0c7c52d

Please sign in to comment.