Skip to content

Commit

Permalink
Merge branch 'master' into rajan/vs2022-cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
bassmang authored Jul 18, 2024
2 parents 1e344cf + ae37e6c commit dbb2d3d
Show file tree
Hide file tree
Showing 53 changed files with 744 additions and 517 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
strategy:
fail-fast: false
matrix:
#os: [windows-latest, ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest] # Temporarily remove windows asan
#os: [windows-latest, ubuntu-latest, macos-13]
os: [ubuntu-latest, macos-13] # Temporarily remove windows asan
preset: [vcpkg-asan-debug, vcpkg-ubsan-debug]
exclude:
# UBSan not supported by MSVC on Windows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
run: brew install cmake boost flatbuffers ninja
- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DWARNINGS=Off -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_TESTING=On -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On -DVW_INSTALL=Off
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DWARNINGS=Off -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_TESTING=On -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On -DVW_INSTALL=Off -DSTD_INV_SQRT=ON
- name: Build
run: cmake --build build --target all
- name: Unit tests
Expand Down
39 changes: 37 additions & 2 deletions .github/workflows/build_vw_slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,45 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Build VW Slim

- name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y xxd
- name: Configure VW Slim
shell: bash
run: ./.scripts/linux/build-slim.sh
run: |
rm -rf build
cmake -S . -B build -G Ninja \
-DBUILD_TESTING=On \
-DVW_FEAT_FLATBUFFERS=Off \
-DRAPIDJSON_SYS_DEP=Off \
-DFMT_SYS_DEP=Off \
-DSPDLOG_SYS_DEP=Off \
-DVW_ZLIB_SYS_DEP=Off \
-DVW_BOOST_MATH_SYS_DEP=Off
- name: Build VW and VW Slim
shell: bash
run: cmake --build build --target vw_cli_bin vw_slim vw_slim_test

- name: Test VW Slim
shell: bash
working-directory: build
run: ctest --output-on-failure --no-tests=error --tests-regex "VowpalWabbitSlim|ExploreSlim|CommandLineOptionsSlim" --parallel 2

- name: Generate test data with new VW executable
shell: bash
working-directory: vowpalwabbit/slim/test/data/
run: ./generate-data.sh ../../../../build/vowpalwabbit/cli/vw

- name: Build VW Slim again
shell: bash
run: cmake --build build --target vw_slim vw_slim_test

- name: Test VW Slim again
shell: bash
working-directory: build
run: ctest --output-on-failure --no-tests=error --tests-regex "VowpalWabbitSlim|ExploreSlim|CommandLineOptionsSlim" --parallel 2
4 changes: 2 additions & 2 deletions .github/workflows/dotnet_nugets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
config:
- { os: "windows-latest", runtime_id: "win-x64" }
- { os: "ubuntu-latest", runtime_id: "linux-x64" }
- { os: "macos-latest", runtime_id: "osx-x64" }
- { os: "macos-13", runtime_id: "osx-x64" }
runs-on: ${{matrix.config.os}}
steps:
# Setup for build
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
config:
- { os: "windows-latest", runtime_id: "win-x64" }
- { os: "ubuntu-latest", runtime_id: "linux-x64" }
- { os: "macos-latest", runtime_id: "osx-x64" }
- { os: "macos-13", runtime_id: "osx-x64" }
runs-on: ${{matrix.config.os}}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
submodules: recursive
- name: Build C++ VW binary
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On -DSTD_INV_SQRT=ON
cmake --build build
- name: Upload vw binary
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vcpkg_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
preset: [vcpkg-debug, vcpkg-release]
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/vendor_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
-DWARNINGS=On
-DWARNING_AS_ERROR=On
-DVW_CXX_STANDARD=17
-DSTD_INV_SQRT=ON
- name: Build
run: cmake --build build
- name: Unit tests
Expand Down Expand Up @@ -85,6 +86,7 @@ jobs:
-DVW_ZLIB_SYS_DEP=Off
-DVW_BOOST_MATH_SYS_DEP=Off
-DVW_INSTALL=Off
-DSTD_INV_SQRT=ON
- name: Build
run: cmake --build "${{ env.CMAKE_BUILD_DIR }}" --config ${{ matrix.build_type }}
- name: Test run_tests.py
Expand Down Expand Up @@ -118,6 +120,7 @@ jobs:
-DVW_ZLIB_SYS_DEP=Off
-DVW_BOOST_MATH_SYS_DEP=Off
-DVW_INSTALL=Off
-DSTD_INV_SQRT=ON
- name: Build
run: cmake --build build
- name: Unit tests
Expand Down
19 changes: 0 additions & 19 deletions .scripts/linux/build-slim.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .scripts/linux/build-static-java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ cd build
# /usr/local/bin/gcc + g++ is 9.2.0 version
cmake -E env LDFLAGS="-Wl,--exclude-libs,ALL -static-libgcc -static-libstdc++" cmake .. -DCMAKE_BUILD_TYPE=Release -DWARNINGS=Off -DBUILD_JAVA=On -DBUILD_DOCS=Off -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On\
-DBUILD_PYTHON=Off -DSTATIC_LINK_VW_JAVA=On -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ \
-DBUILD_TESTING=Off -DVW_ZLIB_SYS_DEP=Off -DBUILD_SHARED_LIBS=Off -DVW_BUILD_LAS_WITH_SIMD=Off
-DBUILD_TESTING=Off -DVW_ZLIB_SYS_DEP=Off -DBUILD_SHARED_LIBS=Off -DVW_BUILD_LAS_WITH_SIMD=Off -DSTD_INV_SQRT=ON
NUM_PROCESSORS=$(nproc)
make vw_jni -j ${NUM_PROCESSORS}
2 changes: 1 addition & 1 deletion .scripts/linux/build-with-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_DIR=$SCRIPT_DIR/../../
cd $REPO_DIR

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVW_GCOV=ON -DWARNINGS=OFF -DBUILD_JAVA=Off -DBUILD_PYTHON=Off -DBUILD_TESTING=On -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVW_GCOV=ON -DWARNINGS=OFF -DBUILD_JAVA=Off -DBUILD_PYTHON=Off -DBUILD_TESTING=On -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On -DSTD_INV_SQRT=ON
cmake --build build
2 changes: 1 addition & 1 deletion .scripts/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ cd $REPO_DIR
# If parameter 1 is not supplied, it defaults to Release
BUILD_CONFIGURATION=${1:-Release}

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_CONFIGURATION} -DWARNINGS=Off -DWARNING_AS_ERROR=On -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_JAVA=On -DBUILD_PYTHON=Off -DBUILD_TESTING=On -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${BUILD_CONFIGURATION} -DWARNINGS=Off -DWARNING_AS_ERROR=On -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_JAVA=On -DBUILD_PYTHON=Off -DBUILD_TESTING=On -DBUILD_EXPERIMENTAL_BINDING=On -DVW_FEAT_FLATBUFFERS=On -DVW_FEAT_CSV=On -DVW_FEAT_CB_GRAPH_FEEDBACK=On -DSTD_INV_SQRT=ON
cmake --build build --target all
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
],
"url": "./test/vwtest.schema.json"
}
]
],
"files.associations": {
"limits": "cpp"
}
}
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ option(VW_BUILD_VW_C_WRAPPER "Enable building the c_wrapper project" ON)
option(vw_BUILD_NET_CORE "Build .NET Core targets" OFF)
option(vw_BUILD_NET_FRAMEWORK "Build .NET Framework targets" OFF)
option(VW_BUILD_WASM "Add WASM target" OFF)
option(STD_INV_SQRT "Use standard library inverse square root" OFF)

if(VW_INSTALL AND NOT VW_ZLIB_SYS_DEP)
message(WARNING "Installing with a vendored version of zlib is not recommended. Use VW_ZLIB_SYS_DEP to use a system dependency or specify VW_INSTALL=OFF to silence this warning.")
Expand Down
8 changes: 8 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
"VW_FEAT_CB_GRAPH_FEEDBACK": {
"type": "BOOL",
"value": "On"
},
"STD_INV_SQRT": {
"type": "BOOL",
"value": "On"
}
}
},
Expand Down Expand Up @@ -208,6 +212,10 @@
"VCPKG_TARGET_TRIPLET": {
"type": "STRING",
"value": "wasm32-emscripten"
},
"STD_INV_SQRT": {
"type": "BOOL",
"value": "On"
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions ext_libs/string-view-lite/nonstd/string_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@

#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS

#include <string>

namespace nonstd {

template< class CharT, class Traits, class Allocator = std::allocator<CharT> >
Expand Down
Loading

0 comments on commit dbb2d3d

Please sign in to comment.