forked from enigma-dev/enigma-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
110 lines (98 loc) · 3.87 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
104
105
106
107
108
109
110
# fetch repository as zip archive
shallow_clone: true
# disable automatic tests
test: off
# only increment the build number when building master
pull_requests:
do_not_increment_build_number: true
# don't build "feature" branches
skip_branch_with_pr: true
branches:
only:
- master
environment:
OUTPUT: /tmp/test.exe
MSYS2_FC_CACHE_SKIP: yes
# These variables apply to all jobs in the matrix
# Each job overrides a subet of them to test
COMPILER: gcc
PLATFORM: Win32
MODE: Debug
GRAPHICS: Direct3D9
AUDIO: None
COLLISION: None
NETWORK: None
WIDGETS: None
EXTENSIONS: "None"
PACKAGES: ""
matrix:
# Game Modes
- {MODE: Run}
- {MODE: Debug}
- {MODE: Compile}
# Platforms
- {PLATFORM: SDL, PACKAGES: "SDL2:x"}
# Graphics
- {GRAPHICS: Direct3D11, PACKAGES: "glm:x"}
- {GRAPHICS: OpenGL1, PACKAGES: "glew:x"}
# Audio
- {AUDIO: DirectSound}
- {AUDIO: OpenAL, PACKAGES: "openal:x dumb:x alure:x libmodplug:x libvorbis:x libogg:x flac:x mpg123:x libsndfile:x libgme:x"}
#TODO: Fix SFML on Windows
#- {AUDIO: SFML, PACKAGES: "sfml:x"}
# Widgets
- {WIDGETS: Win32}
- {WIDGETS: DlgMod}
#TODO: Fix GTK+ on Windows
#- {WIDGETS: GTK+, PACKAGES: "gtk2:x"}
# Extensions
- {EXTENSIONS: "DirectShow"}
- {EXTENSIONS: "WindowsTouch"}
- {EXTENSIONS: "XInput"}
- {EXTENSIONS: "MediaControlInterface"}
- {EXTENSIONS: "Box2DPhysics", PACKAGES: "box2d:x"}
- {EXTENSIONS: "StudioPhysics", PACKAGES: "box2d:x"}
#TODO: Fix Bullet Physics on Windows
#- {EXTENSIONS: "BulletDynamics", PACKAGES: "bullet:x"}
init:
- echo "%APPVEYOR_JOB_ID%"
# store the name of the archive job in an environment variable
# this designates the first job of every build as the archive job
- ps: |
$apiURL = "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG"
$project = Invoke-RestMethod -Method Get -Uri $apiURL/build/$env:APPVEYOR_BUILD_VERSION
$env:ARCHIVE_JOB = $project.build.jobs[0].jobId
- echo "%ARCHIVE_JOB%"
- cd %APPVEYOR_BUILD_FOLDER%
install:
- set PATH=C:\msys64;C:\msys64\mingw64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;%PATH%
- > # Install packages common to all builds
bash -lc "pacboy --noconfirm -S boost:x pugixml:x rapidjson:x yaml-cpp:x grpc:x protobuf:x glm:x %PACKAGES%"
- gcc -v
- ps: |
If ($env:APPVEYOR_JOB_NUMBER -eq 1) {
# use our first job to build JDI and the CLI
C:\msys64\msys2_shell.cmd -defterm -mingw64 -no-start -here -lc "make -j 4; CLI_ENABLE_EGM=FALSE make -j 4 emake"
# create a daemon PowerShell "job" (not the same as an AppVeyor build job) to zip and upload
# the blobs artifact while we start building the engine
$archive = {
Set-Location $using:PWD
7z a -t7z -mm=lzma2 -mx=4 -mmt blobs.zip compileEGMf.dll libEGM.dll libProtocols.dll emake.exe
appveyor PushArtifact blobs.zip -Type Zip
}
$daemon = Start-Job -ScriptBlock $archive
# register a callback so we can show the zip and upload output when it completes
$jobEvent = Register-ObjectEvent $daemon StateChanged -Action {
$result = Receive-Job -Job $daemon
Write-Host ('Artifact daemon has completed.') -foregroundcolor "Magenta"
Write-Host ($result | Out-String) -foregroundcolor "Gray"
}
} Else {
# simply restore JDI and the CLI from the archive artifact of this same build using REST API
$artifactsURL = "https://ci.appveyor.com/api/buildjobs/$env:ARCHIVE_JOB/artifacts/"
appveyor DownloadFile ($artifactsURL + "blobs.zip") -FileName blobs.zip
7z e -mmt blobs.zip
}
build_script:
# AppVeyor overrides %PLATFORM% because it's part of its API, so export it
- C:\msys64\msys2_shell.cmd -defterm -mingw64 -no-start -here -lc "export PLATFORM=%PLATFORM%; ./ci-build.sh"