Update rlclientlib and rl.net to support azure credential hooks #957
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Binary Parser | |
on: | |
push: | |
branches: | |
- master | |
- 'releases/**' | |
pull_request: | |
branches: | |
- '*' | |
env: | |
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}/vcpkg_binary_cache | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build-binary-parser: | |
name: binary-parser-${{ matrix.build.build_type }}-${{ startsWith(matrix.config.os, 'macos') && 'macos-latest' || matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { os: "windows-latest", vcpkg_target_triplet: "x64-windows-static" } | |
- { os: "ubuntu-latest", vcpkg_target_triplet: "x64-linux" } | |
- { os: "macos-13", vcpkg_target_triplet: "x64-osx" } | |
build: | |
# Set the appropriate static runtime for MSVC on Windows | |
# CMake ignores the CMAKE_MSVC_RUNTIME_LIBRARY option on other platforms | |
- { build_type: "debug", msvc_runtime: "MultiThreadedDebug" } | |
- { build_type: "release", msvc_runtime: "MultiThreaded" } | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vcpkg_target_triplet }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- run: git -C ${{ github.workspace }}/ext_libs/vcpkg fetch --unshallow | |
- name: Setup MSVC Developer Command Prompt | |
if: ${{ startsWith(matrix.config.os, 'windows') }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- uses: lukka/get-cmake@latest | |
- run: echo "VCPKG_COMMIT=$(git rev-parse :ext_libs/vcpkg)" >> $GITHUB_ENV | |
shell: bash | |
- run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: vcpkg-cache | |
with: | |
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}/* | |
key: ${{ startsWith(matrix.config.os, 'macos') && 'macos-latest' || matrix.config.os }}-build-${{ env.cache-name }}-${{ hashFiles('vcpkg.json') }}-${{ env.VCPKG_COMMIT }}" | |
- uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgDirectory: '${{ github.workspace }}/ext_libs/vcpkg' | |
vcpkgJsonGlob: "${{ github.workspace }}/vcpkg.json" | |
- name: Configure | |
run: > | |
cd external_parser; | |
cmake -S . -B build -G Ninja | |
-DCMAKE_BUILD_TYPE=${{ matrix.build.build_type }} | |
-DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.build.msvc_runtime }} | |
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/ext_libs/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}" | |
-DVCPKG_TARGET_TRIPLET=${{ matrix.config.vcpkg_target_triplet }} | |
-DVCPKG_HOST_TRIPLET=${{ matrix.config.vcpkg_target_triplet }} | |
-DWARNING_AS_ERROR=OFF | |
-Wno-deprecated | |
-DFMT_SYS_DEP=ON | |
-DSPDLOG_SYS_DEP=ON | |
- name: Build | |
run: | | |
cd external_parser | |
cmake --build build | |
- name: Test | |
run: | | |
cd external_parser/build | |
ctest --verbose --output-on-failure | |
- name: Test binary parser VW executable | |
run: | | |
cd external_parser/build | |
./vw --extra_metrics metrics.json -d ../unit_tests/test_files/valid_joined_logs/cb_simple.log --binary_parser --cb_explore_adf | |
python3 -m json.tool metrics.json | |
- name: Test with Valgrind | |
if: ${{ startsWith(matrix.config.os, 'ubuntu') }} | |
run: | | |
cd external_parser/build | |
sudo apt-get update -y | |
sudo apt install -y valgrind | |
valgrind --quiet --error-exitcode=100 --undef-value-errors=no --leak-check=full ./unit_tests/binary_parser_unit_tests |