forked from pbatard/rufus
-
Notifications
You must be signed in to change notification settings - Fork 4
/
appveyor.yml
88 lines (82 loc) · 2.73 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
os: Visual Studio 2019
skip_commits:
# Don't run AppVeyor for commits that only modify resource or non-code files
files:
- .gitignore
- .gitattributes
- .github/
- res/
- '**/*.cmd'
- '**/*.md'
- '**/*.rc'
- '**/*.sh'
- '**/*.txt'
- '**/*.xml'
environment:
COVERITY_SCAN_EMAIL: "[email protected]"
COVERITY_SCAN_TOKEN:
secure: XZADvwlRFo57sBA54pBH2oVT/eR/OytZYY/sCKq61io=
global:
BITS: 32
matrix:
- CONFIGURATION: Release
COMPILER: Coverity
PLATFORM: x86
- CONFIGURATION: Debug
COMPILER: MSVC
PLATFORM: x86
- CONFIGURATION: Debug
COMPILER: MSVC
PLATFORM: x64
- CONFIGURATION: Release
COMPILER: MSVC
PLATFORM: x86
- CONFIGURATION: Release
COMPILER: MSVC
PLATFORM: x64
- CONFIGURATION: Release
COMPILER: MinGW
PLATFORM: i686
- CONFIGURATION: Release
COMPILER: MinGW
PLATFORM: x86_64
init:
# Set the AppVeyor build version number to our tag or, if untagged, to the commit hash
# See https://github.com/appveyor/ci/issues/691
# Also include the build number, to distinguish between rebuilds of the same commit
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "true") {
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)_#$env:APPVEYOR_BUILD_NUMBER";
} else {
Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0,8))_#$env:APPVEYOR_BUILD_NUMBER";
}
build:
project: rufus.sln
parallel: true
verbosity: detailed
install:
ps: |
if ($env:PLATFORM -eq "x86_64") {
$env:BITS = 64
}
build_script:
ps: |
$APPVEYOR_LOGGER = "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll";
switch ($env:COMPILER) {
MSVC {
msbuild rufus.sln /m /p:Configuration=$env:CONFIGURATION,Platform=$env:PLATFORM /l:$APPVEYOR_LOGGER;
}
MinGW {
C:\msys64\usr\bin\bash -lc "export PATH=/mingw$env:BITS/bin:`$PATH; cd /c/projects/rufus; mkdir -p m4; ./configure --build=$env:PLATFORM-w64-mingw32 --host=$env:PLATFORM-w64-mingw32 --disable-debug; make -j4";
}
Coverity {
if (!"$env:COVERITY_SCAN_TOKEN") {
Write-Output "Not running Coverity due to missing credential.";
return;
}
cov-build.exe --dir cov-int msbuild rufus.sln /m /p:Configuration=$env:CONFIGURATION,Platform=$env:PLATFORM /l:$APPVEYOR_LOGGER;
7z a -r cov-int.zip cov-int
# MUST use 'curl.exe' since 'curl' is a PowerShell alias to Invoke-Webrequest. Also MUST use @ sign before uploaded file.
curl.exe -s --form email=$env:COVERITY_SCAN_EMAIL --form token=$env:COVERITY_SCAN_TOKEN --form [email protected] --form version="$env:APPVEYOR_BUILD_VERSION" --form description="Rufus" https://scan.coverity.com/builds?project=pbatard%2Frufus
}
}