-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (57 loc) · 1.98 KB
/
Copy pathci.yml
File metadata and controls
71 lines (57 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 -R hyperliquid_tests --output-on-failure
- name: Integration tests
run: ctest --test-dir build -C Release -R hyperliquid_integration_tests --output-on-failure
timeout-minutes: 5