-
Notifications
You must be signed in to change notification settings - Fork 284
50 lines (50 loc) · 2.05 KB
/
test.yml
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
on: [push]
name: Test
jobs:
test:
name: Build and test driver on windows-2022
runs-on: windows-2019
env:
CASS_DRIVER_LIBEV_INCLUDES: C:\vcpkg\packages\libev_x64-windows\include\libev
CASS_DRIVER_LIBEV_LIBS: C:\vcpkg\packages\libev_x64-windows\lib
LIBUV_ROOT_DIR: C:\vcpkg\packages\libuv_x64-windows
ZLIB_ROOT_DIR: C:\vcpkg\packages\zlib_x64-windows-static
KERBEROS_ROOT_DIR: C:\vcpkg\packages\krb5_x64-windows
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
run: vcpkg install libuv zlib:x64-windows-static krb5
- name: Setup env vars
run: |
echo "LIBUV_LIB_DIR=${{ env.LIBUV_ROOT_DIR }}\lib" >> $env:GITHUB_ENV
echo "LIBUV_BIN_DIR=${{ env.LIBUV_ROOT_DIR }}\bin" >> $env:GITHUB_ENV
echo "ZLIB_LIB_DIR=${{ env.ZLIB_ROOT_DIR }}\lib" >> $env:GITHUB_ENV
echo "KERBEROS_LIB_DIR=${{ env.KERBEROS_ROOT_DIR }}\lib" >> $env:GITHUB_ENV
- name: Setup env
run: |
ln -s C:\vcpkg\packages\zlib_x64-windows-static\lib\zlib.lib C:\vcpkg\packages\zlib_x64-windows-static\lib\zlibstatic.lib
echo "LIB=${{ env.LIB }};${{ env.LIBUV_BIN_DIR }};${{ env.ZLIB_LIB_DIR }};${{ env.KERBEROS_LIB_DIR }}" >> $env:GITHUB_ENV
- name: Debug stuff
run: |
echo "LIB is ${{ env.LIB }}"
echo "LIBUV_LIB_DIR: ${{ env.LIBUV_LIB_DIR }}"
echo "LIBUV_LIB_DIR contents:"
ls ${{ env.LIBUV_LIB_DIR }}
echo "LIBUV_BIN_DIR contents:"
ls ${{ env.LIBUV_BIN_DIR }}
- name: Build and run tests
run: |
mkdir build
cd build
cmake -G "NMake Makefiles" -DCASS_BUILD_UNIT_TESTS=On ..
nmake
ls .
ldd ./cassandra-unit-tests.exe
./cassandra-unit-tests.exe --gtest_output=xml:gtest-results.xml
ls .
- name: Publish test results
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: build\gtest-results.xml