1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00
rufus/appveyor.yml
Pete Batard d9d0feadb6 [pollock] add automatic PO generation and update detection
* Also use Rufus application version in .loc
2018-07-14 23:40:21 +01:00

102 lines
3.6 KiB
YAML

os: Visual Studio 2017
max_jobs: 4
# May choose to enable the following if we get tired of seeing double AppVeyor builds for tagged and untagged
# skip_non_tags: true
skip_commits:
# Don't run AppVeyor for commits that only modify resource or non-code files
files:
- res/*
- '**/*.cmd'
- '**/*.cs'
- '**/*.md'
- '**/*.rc'
- '**/*.sh'
- '**/*.txt'
- '**/*.xml'
environment:
COVERITY_SCAN_PROJECT_NAME: "pbatard/rufus"
COVERITY_SCAN_NOTIFICATION_EMAIL: "pete@akeo.ie"
COVERITY_SCAN_TOKEN:
secure: XZADvwlRFo57sBA54pBH2oVT/eR/OytZYY/sCKq61io=
global:
BITS: 32
matrix:
- CONFIGURATION: Debug
COMPILER: MSVC
PLATFORM: x86_32
- CONFIGURATION: Debug
COMPILER: MSVC
PLATFORM: x86_64
- CONFIGURATION: Release
COMPILER: MSVC
PLATFORM: x86_32
- CONFIGURATION: Release
COMPILER: MSVC
PLATFORM: x86_64
- CONFIGURATION: Release
COMPILER: MinGW
PLATFORM: i686
- CONFIGURATION: Release
COMPILER: MinGW
PLATFORM: x86_64
- CONFIGURATION: Release
COMPILER: Coverity
PLATFORM: x86_32
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";
if ("$env:APPVEYOR_REPO_NAME" -eq "pbatard/rufus" -and "$env:APPVEYOR_REPO_BRANCH" -eq "master") {
Write-Output "Not running dev-build since we expect a tagged commit.";
Exit-AppVeyorBuild;
}
}
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 {
$PUBLISHCOVERITY = "$env:APPVEYOR_BUILD_FOLDER\PublishCoverity\tools\PublishCoverity.exe";
if (!"$env:COVERITY_SCAN_TOKEN") {
Write-Output "Not running Coverity due to missing credential.";
return;
}
if ($env:APPVEYOR_REPO_TAG -eq "false") {
Write-Output "Not running Coverity due to missing tag.";
return;
}
& nuget install PublishCoverity -o "$env:APPVEYOR_BUILD_FOLDER" -excludeversion;
& cov-build.exe --dir cov-int msbuild rufus.sln /m /p:Configuration=$env:CONFIGURATION,Platform=$env:PLATFORM /l:$APPVEYOR_LOGGER;
& $PUBLISHCOVERITY compress --nologo -i "$env:APPVEYOR_BUILD_FOLDER\cov-int" -o "$env:APPVEYOR_BUILD_FOLDER\coverity.zip" --overwrite;
& $PUBLISHCOVERITY publish --nologo -t $env:COVERITY_SCAN_TOKEN -e $env:COVERITY_SCAN_NOTIFICATION_EMAIL -r $env:COVERITY_SCAN_PROJECT_NAME -z "$env:APPVEYOR_BUILD_FOLDER\coverity.zip" -d "Appveyor build." --codeVersion $env:APPVEYOR_BUILD_VERSION;
Get-ChildItem -Path ./ -Recurse | Remove-Item -Force -Recurse;
}
}