-
Notifications
You must be signed in to change notification settings - Fork 43
/
appveyor.yml
103 lines (91 loc) · 2.92 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: 0.3.0_b{build}-{branch}
init:
- git config --global core.autocrlf input
- set MSYSTEM=MINGW64
- ps: |
$ErrorActionPreference='silentlycontinue'
if ($env:COMPILER -eq "mingw") {
$env:PATH = "C:\msys64\usr\bin;" + $env:PATH
if ($env:PLATFORM -eq "x86") {
$env:PATH = "C:\msys64\mingw32\bin;" + $env:PATH
pacman --noconfirm --needed -S cmake make mingw-w64-i686-toolchain mingw-w64-i686-cmake 2> $NULL
} elseif ($env:PLATFORM -eq "x64") {
$env:PATH = "C:\msys64\mingw64\bin;" + $env:PATH
pacman --noconfirm --needed -S cmake make mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake 2> $NULL
}
} else {
if ($env:PLATFORM -ne "x86") {
$env:CMAKE_OPTS = $env:CMAKE_OPTS + " -A $env:PLATFORM"
}
}
$error.Clear()
- echo CMAKE_OPTS = %CMAKE_OPTS%
- set "PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\build;%APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%"
environment:
COVERALLS_REPO_TOKEN:
secure: 5nuCg+faxFPeppoNNcSwVobswAVFUf8ut83vw8CX/4W2y0kZkGmwEfCUxSQWiQDU
CI_NAME: appveyor
CI_JOB_ID: $(APPVEYOR_JOB_ID)
GCOV_PREFIX: $(APPVEYOR_BUILD_FOLDER)
matrix:
- COMPILER: mingw
GENERATOR: "MSYS Makefiles"
CMAKE_OPTS: -DCMAKE_TOOLCHAIN_FILE="../.cmake/Toolchains/Toolchain-mingw-w64.cmake"
- COMPILER: msvc
GENERATOR: "Visual Studio 14 2015"
CFLAGS: /MP
CXXFLAGS: /MP
clone_depth: 5
platform:
- x86
- x64
configuration:
- Debug
- Release
- RelWithDebInfo
install:
- ps: $env:RELEASE_NAME = $env:APPVEYOR_REPO_BRANCH -replace "/", "-"
# Hack to make git think it is on the tip of the repo branch
- 'git checkout -B %APPVEYOR_REPO_BRANCH%'
# Configure project
- 'mkdir build && cd build'
- >
cmake
-Wno-dev
-DCMAKE_INSTALL_PREFIX="mimick-%RELEASE_NAME%"
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
-DCMAKE_SYSTEM_PROCESSOR="%PLATFORM%"
-DCMAKE_C_FLAGS="-Werror"
%CMAKE_OPTS%
-G "%GENERATOR%"
..
build_script:
- cmake --build .
before_deploy:
- ps: |
$archive = "mimick-$env:RELEASE_NAME-windows-$env:COMPILER-$env:PLATFORM"
cmake --build . --target install
7z a -ttar "$archive.tar" "mimick-$env:RELEASE_NAME"
7z a -tbzip2 "../$archive.tar.bz2" "$archive.tar"
Push-AppveyorArtifact "../$archive.tar.bz2"
test_script:
- ps: |
ctest --output-on-failure --timeout 10
if (-not $lastexitcode -eq 0) {
type Testing/Temporary/LastTest.log
$host.setshouldexit(1)
}
notifications:
- provider: Email
to: [[email protected]]
on_build_status_changed: true
deploy:
provider: GitHub
auth_token:
secure: MnZZQeoxBVnpV9GSSvVok5Je0/N2d/fzG4+ITw95/tYSgZ8rleBV23a5sCwAea3r
artifact: 'mimick-$(RELEASE_NAME)-windows-$(COMPILER)-$(PLATFORM).tar.bz2'
draft: false
prerelease: false
on:
appveyor_repo_tag: true
configuration: RelWithDebInfo