-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
78 lines (69 loc) · 2.78 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
environment:
matrix:
- job_name: Windows
appveyor_build_worker_image: Visual Studio 2017
job_group: Build
- job_name: Linux
appveyor_build_worker_image: Ubuntu
job_group: Build
- job_name: Pack
appveyor_build_worker_image: Visual Studio 2019
job_depends_on: Build
version: 2017RC5-{build}
for:
-
matrix:
only:
- job_name: Windows
build_script:
- mkdir build
- cd build
- cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=win32-msvc-xp-static-ipo.cmake ..
- cd ..
- cmake --build build --config Release --parallel -- /p:XPDeprecationWarning=false
artifacts:
- path: 'build\*.dll'
-
matrix:
only:
- job_name: Linux
install:
- sudo apt-get update
- sudo apt-get --assume-yes install gcc-multilib g++-multilib
build_script:
- mkdir build
- cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=linux-i686-gcc-noGNUunique-gold-static-excludeSTDexport-oldGLIBC-noPIC-hidden-ipo-sections.cmake -DCMAKE_BUILD_TYPE=Release ..
- cd ..
- cmake --build build --config Release --parallel
artifacts:
- path: 'build/*.so'
-
matrix:
only:
- job_name: Pack
build_script:
- ps: >-
$baseArtifactsFolder = "addons";
$localArtifactsLocation = Join-Path $baseArtifactsFolder -ChildPath $env:appveyor_project_name;
New-Item $localArtifactsLocation -ItemType Directory | Out-Null;
$buildJobNames = @("Windows", "Linux");
$currentBuildInfo = Invoke-RestMethod -Method Get -Uri "$env:appveyor_url/api/projects/$env:appveyor_account_name/$env:appveyor_project_slug/builds/$env:appveyor_build_id";
foreach ($job in $currentBuildInfo.build.jobs) {
if (-not ($job.name -in $buildJobNames)) {
continue;
}
if (-not ($job.status -eq "success")) {
throw;
}
$artifacts = Invoke-RestMethod -Method Get -Uri "$env:appveyor_url/api/buildjobs/$($job.jobId)/artifacts";
foreach ($artifact in $artifacts) {
$localArtifactPath = Join-Path $localArtifactsLocation -ChildPath $(Split-Path $artifact.fileName -Leaf);
Invoke-RestMethod -Method Get -Uri "$env:appveyor_url/api/buildjobs/$($job.jobId)/artifacts/$($artifact.fileName)" -OutFile $localArtifactPath;
}
}
Copy-Item "$env:appveyor_project_name.cfg" -Destination $localArtifactsLocation
Compress-Archive $baseArtifactsFolder -DestinationPath "$($env:appveyor_project_name)_$env:appveyor_build_version.zip";
Compress-Archive "$($env:appveyor_project_name)_$env:appveyor_build_version.zip" -DestinationPath "$($env:appveyor_project_name).zip";
artifacts:
- path: '*.zip'