Skip to content

Commit ad288d5

Browse files
Add the .appveyor.yml file for testing MSVC on AppVeyor CI
Signed-off-by: Thiago Macieira <[email protected]>
1 parent eb4bedb commit ad288d5

File tree

3 files changed

+50
-3
lines changed

3 files changed

+50
-3
lines changed

.appveyor.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 0.5-build-{build}
2+
pull_requests:
3+
do_not_increment_build_number: true
4+
image:
5+
- Visual Studio 2015
6+
- Visual Studio 2013
7+
- Visual Studio 2017
8+
install:
9+
- cmd: >-
10+
set tests=1
11+
12+
if /i "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64) & (set tests=0)
13+
14+
if /i "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64) & (set QTDIR=C:\Qt\5.9\msvc2015_64)
15+
16+
if /i "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64) & (set QTDIR=C:\Qt\5.9\msvc2017_64)
17+
18+
set path=%PATH%;%QTDIR%\bin
19+
build_script:
20+
- cmd: >-
21+
nmake -f Makefile.nmake -nologo CFLAGS="-W3 -Os -MDd"
22+
23+
cd tests
24+
25+
if /i "%tests%"=="1" qmake CONFIG-=release CONFIG+=debug
26+
27+
if /i "%tests%"=="1" nmake -nologo -s
28+
test_script:
29+
- cmd: >-
30+
if /i "%tests%"=="1" nmake -s -nologo check
31+
32+
if /i "%tests%"=="0" echo Tests skipped.
33+
artifacts:
34+
- path: lib\tinycbor.lib
35+
deploy: off

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.tag export-subst
22
.gitignore export-ignore
33
.gitattributes export-ignore
4+
.appveyor.yml text

maketag.pl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,22 @@ (@)
7070
close VERSION;
7171

7272
open VERSION, ">", "src/tinycbor-version.h" or die("Cannot open src/tinycbor-version.h: $!");
73-
print VERSION, "#define TINYCBOR_VERSION_MAJOR ", $v[0], "\n";
74-
print VERSION, "#define TINYCBOR_VERSION_MINOR ", $v[1], "\n";
75-
print VERSION, "#define TINYCBOR_VERSION_PATCH ", $v[2], "\n";
73+
print VERSION "#define TINYCBOR_VERSION_MAJOR ", $v[0], "\n";
74+
print VERSION "#define TINYCBOR_VERSION_MINOR ", $v[1], "\n";
75+
print VERSION "#define TINYCBOR_VERSION_PATCH ", $v[2], "\n";
7676
close VERSION;
7777

78+
if (open APPVEYORYML, "<", ".appveyor.yml") {
79+
my @contents = map {
80+
s/^version:.*/version: $v[0].$v[1].$v[2]-build-{build}/;
81+
$_;
82+
} <APPVEYORYML>;
83+
close APPVEYORYML;
84+
open APPVEYORYML, ">", ".appveyor.yml";
85+
print APPVEYORYML join('', @contents);
86+
close APPVEYORYML;
87+
}
88+
7889
# Print summary
7990
print "Tag created and next versions updated.\n";
8091
print "Don't forget to create the docs.\n" if $v[2] == 1;

0 commit comments

Comments
 (0)