Skip to content

Commit 69edd67

Browse files
committed
add CI coverage for all 3 OSs; add CI banner in README
1 parent ef20b23 commit 69edd67

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,58 @@ permissions:
1111

1212
jobs:
1313
build-and-test:
14-
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
fail-fast: false
18+
19+
runs-on: ${{ matrix.os }}
20+
21+
defaults:
22+
run:
23+
shell: bash
1524

1625
steps:
1726
- name: Checkout
1827
uses: actions/checkout@v4
1928

2029
- name: Set up vcpkg
2130
run: |
22-
git clone https://github.com/microsoft/vcpkg.git ${{ github.workspace }}/vcpkg
23-
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
24-
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $GITHUB_ENV
31+
git clone https://github.com/microsoft/vcpkg.git "$GITHUB_WORKSPACE/vcpkg"
32+
mkdir -p "$GITHUB_WORKSPACE/vcpkg-binary-cache"
33+
echo "VCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg" >> $GITHUB_ENV
34+
echo "VCPKG_DEFAULT_BINARY_CACHE=$GITHUB_WORKSPACE/vcpkg-binary-cache" >> $GITHUB_ENV
35+
36+
- name: Bootstrap vcpkg (Unix)
37+
if: runner.os != 'Windows'
38+
run: "$VCPKG_ROOT/bootstrap-vcpkg.sh" -disableMetrics
39+
40+
- name: Bootstrap vcpkg (Windows)
41+
if: runner.os == 'Windows'
42+
shell: pwsh
43+
run: .\vcpkg\bootstrap-vcpkg.bat -disableMetrics
2544

2645
- name: Cache vcpkg packages
2746
uses: actions/cache@v4
2847
with:
2948
path: |
3049
${{ github.workspace }}/vcpkg/installed
31-
~/.cache/vcpkg
50+
${{ github.workspace }}/vcpkg-binary-cache
3251
key: vcpkg-${{ runner.os }}-${{ hashFiles('CMakeLists.txt') }}
3352
restore-keys: vcpkg-${{ runner.os }}-
3453

3554
- name: Install dependencies
3655
run: |
37-
$VCPKG_ROOT/vcpkg install nlohmann-json openssl gtest slick-net
56+
"$VCPKG_ROOT/vcpkg" install nlohmann-json openssl gtest slick-net
3857
3958
- name: Configure
4059
run: |
4160
cmake -S . -B build \
42-
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
61+
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
4362
-DCMAKE_BUILD_TYPE=Release
4463
4564
- name: Build
46-
run: cmake --build build --config Release -j $(nproc)
65+
run: cmake --build build --config Release --parallel
4766

4867
- name: Unit tests
4968
run: ctest --test-dir build -R hyperliquid_tests --output-on-failure

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
A C++20 SDK for the [Hyperliquid](https://hyperliquid.xyz) DEX API — REST market data, authenticated trading, and real-time WebSocket subscriptions, with native EIP-712 signing.
44

5+
[![CI](https://github.com/SlickQuant/hyperliquid-cpp/actions/workflows/ci.yml/badge.svg)](https://github.com/SlickQuant/hyperliquid-cpp/actions/workflows/ci.yml)
56
![C++20](https://img.shields.io/badge/C%2B%2B-20-blue)
67
![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey)
78
![License](https://img.shields.io/badge/license-MIT-green)

0 commit comments

Comments
 (0)