Skip to content

Add market_data_websocket example and update CMake configuration; enh… #21

Add market_data_websocket example and update CMake configuration; enh…

Add market_data_websocket example and update CMake configuration; enh… #21

Workflow file for this run

name: CI
on:
push:
branches: ['**']
pull_request:
branches: ['**']
permissions:
contents: read
jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git "$GITHUB_WORKSPACE/vcpkg"
mkdir -p "$GITHUB_WORKSPACE/vcpkg-binary-cache"
echo "VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg" >> $GITHUB_ENV
echo "VCPKG_DEFAULT_BINARY_CACHE=$GITHUB_WORKSPACE/vcpkg-binary-cache" >> $GITHUB_ENV
- name: Bootstrap vcpkg (Unix)
if: runner.os != 'Windows'
run: $VCPKG_ROOT/bootstrap-vcpkg.sh -disableMetrics
- name: Bootstrap vcpkg (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: .\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Cache vcpkg packages
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/vcpkg/installed
${{ github.workspace }}/vcpkg-binary-cache
key: vcpkg-${{ runner.os }}-${{ hashFiles('CMakeLists.txt') }}
restore-keys: vcpkg-${{ runner.os }}-
- name: Install dependencies
run: |
"$VCPKG_ROOT/vcpkg" install nlohmann-json openssl gtest slick-net
- name: Configure
run: |
cmake -S . -B build \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --config Release --parallel
- name: Unit tests
run: ctest --test-dir build -C Release -L unit --output-on-failure
- name: Integration tests
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
build/tests/Release/hyperliquid_integration_tests.exe --gtest_color=yes
else
build/tests/hyperliquid_integration_tests --gtest_color=yes
fi
timeout-minutes: 10