-
Notifications
You must be signed in to change notification settings - Fork 17
/
.appveyor.yml
70 lines (61 loc) · 3.18 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
version: '{branch}.{build}'
branches:
except:
- gh-pages
clone_depth: 5
environment:
# Building with MinGW-w64 version 6.3.0. These env settings are used by the makefile.
MINGW_ROOT: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
matrix:
- es_run_mode: 'dist'
install:
- ps: |
# Update env variables to use the desired MinGW version
Set-AppveyorBuildVariable -Name PATH -Value "$Env:MINGW_ROOT\bin\;$Env:PATH";
Set-AppveyorBuildVariable -Name DIR_MINGW64 -Value "$Env:MINGW_ROOT\x86_64-w64-mingw32";
# Ensure we have the precompiled libraries to link with (SDL, etc.).
if (!(Test-Path 'C:\dev64')) { New-Item 'C:\dev64' -ItemType Directory; }
if (!(Test-Path 'C:\dev64\bin'))
{
Start-FileDownload 'http://endless-sky.github.io/win64-dev.zip' 'C:\dev64.zip'
$zipArgs = 'x C:\dev64.zip -oC:\';
Start-Process '7z.exe' -ArgumentList $zipArgs -Wait;
}
# Ensure we have instructions on how to build our executable.
if (!(Test-Path '.winmake'))
{
if (!(Test-Path 'C:\cbp2make')) { New-Item 'C:\cbp2make' -ItemType Directory; }
$cbp2make_dir = 'C:\cbp2make\cbp2make-stl-rev147-all\bin';
if (!(Test-Path $cbp2make_dir))
{
Start-FileDownload 'https://downloads.sourceforge.net/project/cbp2make/cbp2make-stl-rev147-all.tar.7z?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fcbp2make%2Ffiles%2F%3Fsource%3Dnavbar&ts=1500511318&use_mirror=managedway' 'C:\cbp2make.tar.gz';
$zipArgs = 'x C:\cbp2make.tar.gz -oC:\cbp2make';
Start-Process '7z.exe' -ArgumentList $zipArgs -Wait;
}
(Get-Content 'EndlessSky.cbp') -replace 'C:\\Program Files\\mingw64\\x86_64-w64-mingw32', $Env:DIR_MINGW64 | Set-Content 'EndlessSky.cbp';
$makeExe = "$cbp2make_dir\Release\cbp2make.exe";
$makeArg = '--local -in EndlessSky.cbp -out .winmake';
Start-Process $makeExe -ArgumentList $makeArg -Wait;
}
cache:
- C:\dev64
build_script:
- ps: mingw32-make.exe -k -j2 -e -f .winmake $Env:es_run_mode;
before_test:
- ps: |
$here = (Get-Location).Path;
Copy-Item -Path "bin\*\EndlessSky.exe" -Destination $here;
Copy-Item -Path "C:\dev64\bin\*.dll" -Exclude "libstdc*" -Destination $here;
test_script:
- ps: .\tests\test_parse.ps1 'EndlessSky.exe';
after_test:
- ps: |
$here = (Get-Location).Path;
Copy-Item -Path "$Env:DIR_MINGW64\lib\libstdc++-6.dll" -Destination $here;
Copy-Item -Path "$Env:DIR_MINGW64\lib\libgcc_s_seh-1.dll" -Destination $here;
Copy-Item -Path "$Env:DIR_MINGW64\lib\libwinpthread-1.dll" -Destination $here;
# Zip the directory for release
$ARCHIVE_NAME = "$Env:APPVEYOR_REPO_NAME-$Env:APPVEYOR_REPO_BRANCH-$Env:APPVEYOR_REPO_COMMIT-win64.7z";
$ZIP_ARGS = "a $ARCHIVE_NAME .\*.exe -i!.\*.dll -i!.\data\ -i!.\icons\ -i!.\images\ -i!.\sounds\ -i!.\source\ -i!license.txt -i!copyright -i!README.md -i!changelog -i!credits.txt -i!keys.txt";
Start-Process '7z.exe' -ArgumentList $ZIP_ARGS -Wait;
Push-AppveyorArtifact $ARCHIVE_NAME;