diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 872e92e..6b8897e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: with: compiler: ${{ matrix.dc }} - - name: "Windows: install full OpenSSL package, copy & rename import libs, then add to LIB env var" + - name: "Windows: install full OpenSSL package, copy & rename import libs, then set KAL_EXT_LIB_WIN64 env var" if: runner.os == 'Windows' shell: cmd run: | @@ -27,14 +27,7 @@ jobs: mkdir extern_deps || exit /b copy "%PROGRAMFILES%\OpenSSL-Win64\lib\VC\libssl64MT.lib" extern_deps\libssl.lib || exit /b copy "%PROGRAMFILES%\OpenSSL-Win64\lib\VC\libcrypto64MT.lib" extern_deps\libcrypto.lib || exit /b - if "%DC%" == "ldc2" ( - echo LIB=%CD%\extern_deps>> %GITHUB_ENV% - ) else ( - :: https://issues.dlang.org/show_bug.cgi?id=22707 - echo DFLAGS=-L/LIBPATH:%CD%\extern_deps>> %GITHUB_ENV% - :: DFLAGS ignored when building unittests with `--build=unittest-cov` => copy to root - xcopy extern_deps . || exit /b - ) + echo KAL_EXT_LIB_WIN64=%CD%\extern_deps>> %GITHUB_ENV% - name: dub build run: dub build diff --git a/.gitignore b/.gitignore index a560306..56455d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ .dub dub.selections.json +/extra.selections.json libsymmetry-imap.* -symmetry-imap-test-default +/symmetry-imap-test-unittest* example/imap-example tags @@ -12,3 +13,6 @@ replrc SIL.log SIL_user.log history.txt + +# coverage files +*.lst diff --git a/dub.sdl b/dub.sdl index bd9b198..4d0c2e5 100644 --- a/dub.sdl +++ b/dub.sdl @@ -30,5 +30,11 @@ configuration "plugin" { dependency "pegged" version=">=0.0.0" optional=true targetType "dynamicLibrary" targetPath "plugin" + targetName "sil-plugin-imap" versions "SIL_Plugin" "SIL" "MoveSanity" + lflags "/LIBPATH:$KAL_EXT_LIB_WIN64" platform="windows-x86_64" +} +configuration "unittest" { + # Windows: set KAL_EXT_LIB_WIN64 env var to dir containing `lib{ssl,crypto}.lib` + lflags "/LIBPATH:$KAL_EXT_LIB_WIN64" platform="windows-x86_64" } diff --git a/example/dub.sdl b/example/dub.sdl index 2dfe8e7..60d028f 100644 --- a/example/dub.sdl +++ b/example/dub.sdl @@ -7,3 +7,6 @@ dependency "symmetry-imap" path="../" subConfiguration "symmetry-imap" "default" targetType "executable" dependency "arsd-official:email" version="~>8.5" + +# Windows: set KAL_EXT_LIB_WIN64 env var to dir containing `lib{ssl,crypto}.lib` +lflags "/LIBPATH:$KAL_EXT_LIB_WIN64" platform="windows-x86_64" diff --git a/test/dub.json b/test/dub.json index ef778aa..d96cf27 100644 --- a/test/dub.json +++ b/test/dub.json @@ -8,5 +8,8 @@ }, "description": "Functional test application for IMAP.", "license": "MIT", - "name": "imap-d-test" + "name": "imap-d-test", + "lflags-windows-x86_64": [ + "/LIBPATH:$KAL_EXT_LIB_WIN64" + ] }