8000 Merge pull request #49 from fancycode/appveyor-script · fancycode/MemoryModule@cfba548 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfba548

Browse files
authored
Merge pull request #49 from fancycode/appveyor-script
Move AppVeyor test code to script.
2 parents c4074af + af2c521 commit cfba548

File tree

3 files changed

+52
-16
lines changed

3 files changed

+52
-16
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto
2+
3+
# Native line endings.
4+
*.c text
5+
*.cpp text
6+
*.h text
7+
*.rc text
8+
9+
# Windows line endings.
10+
*.bat text eol=crlf
11+
*.eln text eol=crlf

appveyor.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,9 @@ platform:
3131
configuration:
3232
- Debug
3333

34-
build:
35-
verbosity: normal
34+
install:
35+
- call scripts\run-appveyor.bat
3636

37-
build_script:
38-
- ps: if($env:PLATFORM -eq "x64") { $env:CMAKE_GEN_SUFFIX=" Win64" }
39-
- cmake "-G%GENERATOR%%CMAKE_GEN_SUFFIX%" -H. -Bbuild
40-
- cmake --build build --config %CONFIGURATION%
41-
42-
before_test:
43-
- copy /y build\example\DllLoader\%CONFIGURATION%\DllLoader.exe build\example\DllLoader\
44-
- copy /y build\example\DllLoader\%CONFIGURATION%\DllLoaderLoader.exe build\example\DllLoader\
45-
- copy /y build\example\SampleDLL\%CONFIGURATION%\SampleDLL.dll build\example\SampleDLL\
46-
47-
test_script:
48-
- cd build\example\DllLoader
49-
- DllLoader.exe
50-
- DllLoaderLoader.exe
37+
build: off
38+
test: off
39+
deploy: off

scripts/run-appveyor.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@echo off
2+
setlocal
3+
4+
if /I "%PLATFORM" == "x64" (
5+
set CMAKE_GEN_SUFFIX= Win64
6+
) else (
7+
set CMAKE_GEN_SUFFIX=
8+
)
9+
10+
echo.
11+
echo Preparing %CONFIGURATION% build environment for %GENERATOR%%CMAKE_GEN_SUFFIX% ...
12+
cmake "-G%GENERATOR%%CMAKE_GEN_SUFFIX%" -H. -Bbuild
13+
if %errorlevel% neq 0 exit /b %errorlevel%
14+
15+
echo.
16+
echo Building ...
17+
cmake --build build --config %CONFIGURATION%
18+
if %errorlevel% neq 0 exit /b %errorlevel%
19+
20+
echo.
21+
echo Copying generated files ...
22+
copy /y build\example\DllLoader\%CONFIGURATION%\DllLoader.exe build\example\DllLoader\ > NUL
23+
copy /y build\example\DllLoader\%CONFIGURATION%\DllLoaderLoader.exe build\example\DllLoader\ > NUL
24+
copy /y build\example\SampleDLL\%CONFIGURATION%\SampleDLL.dll build\example\SampleDLL\ > NUL
25+
26+
cd build\example\DllLoader
27+
28+
echo.
29+
echo Running DllLoader.exe ...
30+
DllLoader.exe
31+
if %errorlevel% neq 0 exit /b %errorlevel%
32+
33+
echo.
34+
echo Running DllLoaderLoader.exe ...
35+
DllLoaderLoader.exe
36+
if %errorlevel% neq 0 exit /b %errorlevel%

0 commit comments

Comments
 (0)
0