forked from GameDrivenDesign/docker-godot-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
111 lines (96 loc) · 4.42 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
111
version: '{build}'
clone_folder: c:\game
platform: x64
image: Visual Studio 2017
environment:
# Use this to set your game's name. It is being used
# throughout this file for naming exported artifacts.
# This will, for example, create an "HareDerLage.exe"
GAME_NAME: Awesome Game
# Set the Godot version you want to use here. Supported Godot versions can be
# found here: https://cloud.docker.com/u/gamedrivendesign/repository/docker/gamedrivendesign/godot-export/tags
# If your version is not available, please open an issue here: https://github.com/GameDrivenDesign/docker-godot-export
GODOT_VERSION: "3.0.2"
# The following two lines can be enabled to allow a RDP connection to the machine
# Connection details will be displayed in the build log.
# If you want to keep the RDP connection open even after the last command
# has run, enable the on_finish block as well.
#
# https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
cache:
- c:\game-tmp -> appveyor.yml
before_build:
- ps: $ErrorActionPreference = "Stop"
- ps: |-
mkdir -Force c:\game\ci\build
mkdir -Force c:\game-build\windows
mkdir -Force c:\game-build\linux
mkdir -Force c:\game-build\mac
mkdir -Force c:\game-build\html
mkdir -Force c:\game-tmp
cd c:\game-tmp
# Install Mesa/OpenGL
- ps: |-
if (!(Test-Path 'opengl32.dll')) {
Start-FileDownload 'https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/mingw-w64-x86_64-mesa-17.3.3-1-any.pkg.tar.xz/download' -fileName mesa.tar.xz
7z x mesa.tar.xz
7z e mesa.tar mingw64\bin\opengl32.dll
rm mesa.tar.xz
rm mesa.tar
}
# Install Godot
- ps: |-
if (!(Test-Path 'godot.exe')) {
Start-FileDownload "https://downloads.tuxfamily.org/godotengine/$env:GODOT_VERSION/Godot_v$env:GODOT_VERSION-stable_win64.exe.zip"
7z x -tzip "Godot_v$env:GODOT_VERSION-stable_win64.exe.zip"
rm "Godot_v$env:GODOT_VERSION-stable_win64.exe.zip"
mv "Godot_v$env:GODOT_VERSION-stable_win64.exe godot.exe"
}
# Install Godot export templates
- ps: |-
if (!(Test-Path 'templates')) {
Start-FileDownload "https://downloads.tuxfamily.org/godotengine/$env:GODOT_VERSION/Godot_v$env:GODOT_VERSION-stable_export_templates.tpz" -fileName export_templates.tpz
7z x -tzip export_templates.tpz
rm export_templates.tpz
}
mkdir -Force C:\Users\appveyor\AppData\Roaming\Godot\templates
cp -r templates "C:\Users\appveyor\AppData\Roaming\Godot\templates\$env:GODOT_VERSION.stable"
# Install virtual audio device, otherwise Godot isn't able to export the game.
- ps: |-
if (!(Test-Path 'vsc.exe')) {
Start-FileDownload 'https://www.e2esoft.com/download/vsc' -fileName vsc.exe
}
.\vsc.exe /silent | Out-Null
# Export game for the different platforms
# Then move generated artifacts into project directory, which is required by AppVeyor
# to be able to mark them as artifacts.
build_script:
- ps: |-
c:\game-tmp\godot.exe -v --no-window --path c:\game --export "Windows Desktop" "c:\game-build\windows\$env:GAME_NAME.exe"
c:\game-tmp\godot.exe -v --no-window --path c:\game --export "Linux/X11" "c:\game-build\linux\$env:GAME_NAME"
c:\game-tmp\godot.exe -v --no-window --path c:\game --export "Mac OSX" "c:\game-build\mac\$env:GAME_NAME-mac.zip"
c:\game-tmp\godot.exe -v --no-window --path c:\game --export "HTML5" "c:\game-build\html\index.html"
cp -r c:\game-build\* c:\game\ci\build
artifacts:
- path: ci\build\windows
name: $(GAME_NAME)-windows
- path: ci\build\linux
name: $(GAME_NAME)-linux
- path: ci\build\mac\$(GAME_NAME)-mac.zip
name: $(GAME_NAME)-mac
- path: ci\build\html
name: $(GAME_NAME)-html
# Deploy artifacts to GitHub releases for new tags
deploy:
- provider: GitHub
artifact: /windows|linux|mac|html/
draft: false
prerelease: false
auth_token:
secure: yv0xyLQLnTDw5JBX0r5NdaBrHb4g9DyEmgIFhLysInvlZI1ZNUc6Qc+N9OdvieBP
on:
appveyor_repo_tag: true # deploy on tag push only