From 5f1f149eddbbf06714034ebbfac095b05fc9dc40 Mon Sep 17 00:00:00 2001 From: mratsim Date: Mon, 5 Feb 2018 22:42:05 +0100 Subject: [PATCH] Add Appveyor continuous integration + Remove lib prefix for Windows DLL --- .appveyor.yml | 39 +++++++++++++++++++++++++++++++++++++++ headers/c.h | 2 +- src/rocksdb_c.nim | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..7af73a4 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,39 @@ +version: '{build}' + +cache: +- nim-0.17.2_x64.zip +- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z +- packages -> **\packages.config +- '%LocalAppData%\NuGet\Cache -> **\packages.config' + +matrix: + fast_finish: true + +environment: + matrix: + - MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z + MINGW_DIR: mingw64 + MINGW_URL: https://ayera.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z + NIM_ARCHIVE: nim-0.17.2_x64.zip + NIM_DIR: nim-0.17.2 + NIM_URL: https://nim-lang.org/download/nim-0.17.2_x64.zip + platform: x64 + +install: + - MKDIR %CD%\tools_tmp + - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" + - 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\tools_tmp"> nul + - IF not exist "%NIM_ARCHIVE%" appveyor DownloadFile "%NIM_URL%" -FileName "%NIM_ARCHIVE%" + - 7z x -y "%NIM_ARCHIVE%" -o"%CD%\tools_tmp"> nul + - SET PATH=%CD%\tools_tmp\%NIM_DIR%\bin;%CD%\tools_tmp\%MINGW_DIR%\bin;%PATH% + - ps: nuget install RocksDbNative -o "${env:APPVEYOR_BUILD_FOLDER}" + - ps: cp rocksdbnative.5.4.6.10/build/native/amd64/rocksdb.dll rocksdb.dll + - SET PATH=%PATH%;%CD% + +build_script: + - nimble.exe refresh + +test_script: + - nimble.exe test_c + +deploy: off diff --git a/headers/c.h b/headers/c.h index 680dc3e..4ac6227 100644 --- a/headers/c.h +++ b/headers/c.h @@ -52,7 +52,7 @@ # dynlib librocksdb # cdecl # if defined(windows) -# define librocksdb "librocksdb.dll" +# define librocksdb "rocksdb.dll" # elif defined(macosx) # define librocksdb "librocksdb.dylib" # else diff --git a/src/rocksdb_c.nim b/src/rocksdb_c.nim index 49dab96..2000b80 100644 --- a/src/rocksdb_c.nim +++ b/src/rocksdb_c.nim @@ -25,7 +25,7 @@ {.deadCodeElim: on.} when defined(windows): - const librocksdb = "librocksdb.dll" + const librocksdb = "rocksdb.dll" elif defined(macosx): const librocksdb = "librocksdb.dylib" else: