Skip to content

Commit e3b8f5e

Browse files
committed
Moved install and test_script to /ci/appveyor/*.bat
1 parent a2949a3 commit e3b8f5e

File tree

3 files changed

+50
-80
lines changed

3 files changed

+50
-80
lines changed

appveyor.yml

Lines changed: 7 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -45,59 +45,11 @@ environment:
4545
GTEST_RELEASE_LIBRARIES: gtest.lib
4646
GTEST_INCLUDE: c:\projects\third_party\googletest\include
4747
GTEST_LIBRARY_DIR: c:\projects\third_party\googletest\msvc2010
48+
PRODUCT_VERSION: 1.4
4849

4950
# scripts that run after cloning repository
5051
install:
51-
- cmd: >-
52-
@echo off
53-
54-
REM ======================================================================
55-
56-
REM Cloning google test repository
57-
58-
REM =======================================================================
59-
60-
git clone https://github.com/google/googletest.git c:\projects\third_party\googletest
61-
62-
cd /d c:\projects\third_party\googletest
63-
64-
git checkout release-1.6.0
65-
66-
REM =======================================================================
67-
68-
REM Generating google test Visual Studio 2010 solution
69-
70-
REM =======================================================================
71-
72-
mkdir msvc2010
73-
74-
cd msvc2010
75-
76-
cmake -G "Visual Studio 10 2010" -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS_DEBUG=/MDd -DCMAKE_CXX_FLAGS_RELEASE=/MD "c:\projects\third_party\googletest"
77-
78-
cd..
79-
80-
REM =======================================================================
81-
82-
REM Displaying Environnment Variables
83-
84-
REM =======================================================================
85-
86-
set
87-
88-
REM =======================================================================
89-
90-
REM Building google test library
91-
92-
REM =======================================================================
93-
94-
msbuild "msvc2010\gtest.sln" /m /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
95-
96-
REM =======================================================================
97-
98-
REM Done
99-
100-
REM =======================================================================
52+
- cmd: call c:\projects\bin2cpp\ci\appveyor\install.bat
10153

10254
#---------------------------------#
10355
# build configuration #
@@ -124,34 +76,7 @@ build:
12476

12577
# to run your custom scripts instead of automatic tests
12678
test_script:
127-
- cmd: >-
128-
REM ======================================================================
129-
130-
REM Running unit tests
131-
132-
REM =======================================================================
133-
134-
cd /d c:\projects\bin2cpp\msvc
135-
136-
set path=%PATH%;c:\projects\bin2cpp\msvc\Win32\Release
137-
138-
bin2cpp_unittest.exe --gtest_filter=-TestExtraction.testRandom100000
139-
140-
REM ======================================================================
141-
142-
REM Uploading test results to AppVeyor
143-
144-
REM =======================================================================
145-
146-
set TEST_RESULT_URL=https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%
147-
148-
set TEST_RESULT_FILE=%CD%\bin2cppTest.x86.release.xml
149-
150-
echo TEST_RESULT_URL=%TEST_RESULT_URL%
151-
152-
echo TEST_RESULT_FILE=%TEST_RESULT_FILE%
153-
154-
powershell "(New-Object 'System.Net.WebClient').UploadFile($($env:TEST_RESULT_URL), $($env:TEST_RESULT_FILE))"
79+
- cmd: call c:\projects\bin2cpp\ci\appveyor\test_script.bat
15580

15681
#---------------------------------#
15782
# artifacts configuration #
@@ -175,8 +100,10 @@ deploy:
175100

176101
# Deploy to GitHub Releases
177102
- provider: GitHub
178-
tag: v$(APPVEYOR_BUILD_VERSION)-win32
179-
release: bin2cpp-v$(APPVEYOR_BUILD_VERSION)-win32
103+
#tag: v$(APPVEYOR_BUILD_VERSION)-win32
104+
tag: v$(PRODUCT_VERSION)-win32
105+
#release: bin2cpp-v$(APPVEYOR_BUILD_VERSION)-win32
106+
release: bin2cpp-v$(PRODUCT_VERSION)-win32
180107
description: Latest successful AppVeyor CI builds of branch '$(APPVEYOR_REPO_BRANCH)'
181108
auth_token:
182109
secure: BgyLisMc154qWpkyBdh8OD+D9HMM+YnBkh7H4MEUShKO3aCU+Fn/XVGJ07fTsRmH

ci/appveyor/install.bat

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
REM ======================================================================
2+
REM Cloning google test repository
3+
REM =======================================================================
4+
git clone https://github.com/google/googletest.git c:\projects\third_party\googletest
5+
cd /d c:\projects\third_party\googletest
6+
git checkout release-1.6.0
7+
8+
REM =======================================================================
9+
REM Generating google test Visual Studio 2010 solution
10+
REM =======================================================================
11+
mkdir msvc2010
12+
cd msvc2010
13+
cmake -G "Visual Studio 10 2010" -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS_DEBUG=/MDd -DCMAKE_CXX_FLAGS_RELEASE=/MD "c:\projects\third_party\googletest"
14+
cd..
15+
16+
REM =======================================================================
17+
REM Displaying Environnment Variables
18+
REM =======================================================================
19+
set
20+
21+
REM =======================================================================
22+
REM Building google test library
23+
REM =======================================================================
24+
msbuild "msvc2010\gtest.sln" /m /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
25+
26+
REM =======================================================================
27+
REM Done
28+
REM =======================================================================

ci/appveyor/test_script.bat

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
REM ======================================================================
2+
REM Running unit tests
3+
REM =======================================================================
4+
cd /d c:\projects\bin2cpp\msvc
5+
set path=%PATH%;c:\projects\bin2cpp\msvc\Win32\Release
6+
bin2cpp_unittest.exe --gtest_filter=-TestExtraction.testRandom100000
7+
8+
REM ======================================================================
9+
REM Uploading test results to AppVeyor
10+
REM =======================================================================
11+
set TEST_RESULT_URL=https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%
12+
set TEST_RESULT_FILE=%CD%\bin2cppTest.x86.release.xml
13+
echo TEST_RESULT_URL=%TEST_RESULT_URL%
14+
echo TEST_RESULT_FILE=%TEST_RESULT_FILE%
15+
powershell "(New-Object 'System.Net.WebClient').UploadFile($($env:TEST_RESULT_URL), $($env:TEST_RESULT_FILE))"

0 commit comments

Comments
 (0)