facepalm #66
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
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 | |
OPENSSL_ROOT_DIR: C:\vcpkg\packages\openssl_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 openssl | |
- name: Setup env vars | |
run: | | |
echo "ZLIB_LIB_DIR=${{ env.ZLIB_ROOT_DIR }}\lib" >> $env:GITHUB_ENV | |
echo "LIBUV_BIN_DIR=${{ env.LIBUV_ROOT_DIR }}\bin" >> $env:GITHUB_ENV | |
echo "KERBEROS_BIN_DIR=${{ env.KERBEROS_ROOT_DIR }}\bin" >> $env:GITHUB_ENV | |
echo "OPENSSL_BIN_DIR=${{ env.OPENSSL_ROOT_DIR }}\bin" >> $env:GITHUB_ENV | |
echo "OPENSSL_INCLUDE_DIR=${{ env.OPENSSL_ROOT_DIR }}\include" >> $env:GITHUB_ENV | |
- name: Set PATH to find vcpkg dependencies | |
run: | | |
echo "PATH=${{ env.PATH }};${{ env.LIBUV_BIN_DIR }};${{ env.KERBEROS_BIN_DIR }};${{ env.OPENSSL_BIN_DIR }}" >> $env:GITHUB_ENV | |
- name: Link OpenSSL applink.c into src | |
run: | | |
echo "OPENSSL_INCLUDE_DIR contents:" | |
ls ${{ env.OPENSSL_INCLUDE_DIR }}\openssl | |
ln -s ${{ env.OPENSSL_INCLUDE_DIR }}\openssl\applink.c .\src\applink.c | |
- name: Fix name of static zlib dir | |
run: ln -s ${{ env.ZLIB_LIB_DIR }}\zlib.lib ${{ env.ZLIB_LIB_DIR }}\zlibstatic.lib | |
- 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 |