-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPP-1006 Initial version of a Windows config for Github Actions #567
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Static zlib required for build |
||
- 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_APPLINK_DIR=${{ env.OPENSSL_ROOT_DIR }}/include/openssl" >> $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: Fix name of static zlib dir | ||
run: ln -s ${{ env.ZLIB_LIB_DIR }}/zlib.lib ${{ env.ZLIB_LIB_DIR }}/zlibstatic.lib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. zlibstatic is apparently the expected name but the static build uses the default filename... so we manually fix it here |
||
- name: Build and run tests | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -G "NMake Makefiles" -DCASS_BUILD_UNIT_TESTS=On -DCASS_OPENSSL_APPLINK=${{ env.OPENSSL_APPLINK_DIR }}/applink.c .. | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
#include <string.h> | ||
|
||
#include <gssapi/gssapi.h> | ||
#include <gssapi/gssapi_generic.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This header file isn't included in the krb5 vcpkg build. At least for modern versions of the gssapi lib this header isn't especially interesting so it seemed easy enough to remove. |
||
#include <gssapi/gssapi_krb5.h> | ||
|
||
#define DSE_AUTHENTICATOR "com.datastax.bdp.cassandra.auth.DseAuthenticator" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears to be necessary to setup MSVC env properly. More at the Githubs.