forked from MoeMod/CSMoE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
216 lines (216 loc) · 6.74 KB
/
.travis.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
language: cpp
git:
depth: 50
submodules: true
exclude:
- if: branch = continous
jobs:
include:
- stage: publish
name: Retag and publish game
arch: arm64
os: linux
dist: bionic
if: branch = master
script: skip
before_deploy:
# Set up git user name and tag this commit
- git config --local user.name "CSMoE-Deployer"
- git config --local user.email "[email protected]"
- export TRAVIS_TAG=continuous
- git remote add travis-deploy-public https://${GITHUB_TOKEN}@github.com/MoeMod/CSMoE.git
- git tag --delete $TRAVIS_TAG || echo "tag not exists..."
- git push travis-deploy-public --delete $TRAVIS_TAG
- git tag --force $TRAVIS_TAG
- git push travis-deploy-public --tags --force
deploy:
provider: script
api_key: ${GITHUB_TOKEN}
script: echo "I am publishing !!!"
on:
branch: master
repo: MoeMod/CSMoE
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for Linux amd64
arch: amd64
os: linux
dist: bionic
cache: ccache
language: cpp
compiler: gcc
sudo: true
addons:
apt:
packages:
- cmake
- x11-utils
- libgl1-mesa-dev
- libegl1-mesa-dev
- libgles2-mesa-dev
before_script:
- export ARCH=x86_64
- sudo apt-get install libsdl2-dev
- sudo apt-get install libsdl2-image-dev
- sudo apt-get install libfontconfig1-dev
script:
- sh scripts/build_portable_linux_engine.sh;
- stage: build
name: Build for Linux arm64
arch: arm64
os: linux
dist: bionic
cache: ccache
language: cpp
compiler: gcc
sudo: true
addons:
apt:
packages:
- cmake
- x11-utils
- libgl1-mesa-dev
- libegl1-mesa-dev
- libgles2-mesa-dev
before_script:
- sudo apt-get install libsdl2-dev
- sudo apt-get install libsdl2-image-dev
- sudo apt-get install libfontconfig1-dev
script:
- sh scripts/build_portable_linux_engine.sh;
- stage: build
name: Build for macOS amd64 and deploy
cache: ccache
os: osx
osx_image: xcode11
language: cpp
compiler: clang
before_script:
- curl -s https://www.libsdl.org/release/SDL2-2.0.10.dmg > SDL2.dmg
- hdiutil attach SDL2.dmg
- mkdir -p ~/Library/Frameworks
- cp -r /Volumes/SDL2/SDL2.framework ~/Library/Frameworks/
- brew install p7zip
- curl -fLO https://github.com/MoeMod/CSMoE-GameDir/releases/download/continuous/CSMoE-CD-GameDir-Full.7z
- 7z x CSMoE-CD-GameDir-Full.7z
script:
- mkdir -p osx-build && cd osx-build
- cmake -DCMAKE_BUILD_TYPE=Release ../
- cmake --build . --target csmoe_cpack_dmg -j 4
- cd ..
before_deploy:
- cp osx-build/CSMoE-macOS-x86_64.dmg CSMoE-CD-macOS-x86_64-unsigned-Full.dmg
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-macOS-x86_64-unsigned-Full.dmg
on:
branch: master
repo: MoeMod/CSMoE
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for iOS and deploy
os: osx
osx_image: xcode11
language: objective-c
before_script:
- curl -s http://libsdl.org/release/SDL2-2.0.10.tar.gz > SDL2.tar.gz
- tar xzf SDL2.tar.gz
- mv SDL2-2.0.10 SDL2
- brew install p7zip
- curl -fLO https://github.com/MoeMod/CSMoE-GameDir/releases/download/continuous/CSMoE-CD-GameDir-Full.7z
- 7z x CSMoE-CD-GameDir-Full.7z
script:
- set -o pipefail && xcodebuild archive -project Xcode-iOS/CSMoE-iOS.xcodeproj -scheme CSMoE-iOS -configuration Release -archivePath ./CSMoE-iOS.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- mkdir -p Payload
- cp -a ./CSMoE-iOS.xcarchive/Products/Applications/csmoe-ios.app Payload/
before_deploy:
- zip -r CSMoE-CD-iOS-universal-unsigned-Full.ipa Payload
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-iOS-universal-unsigned-Full.ipa
on:
branch: master
repo: MoeMod/CSMoE
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for Android and deploy
language: android
dist: trusty
android:
components:
- build-tools-28.0.3
- android-29
- extra
- add-on
- tools
before_script:
- echo y | /usr/local/android-sdk/tools/bin/sdkmanager "patcher;v4"
- echo y | /usr/local/android-sdk/tools/bin/sdkmanager ndk-bundle
- echo y | /usr/local/android-sdk/tools/bin/sdkmanager "cmake;3.10.2.4988404"
- sudo apt-get install p7zip-full
- curl -fLO https://github.com/MoeMod/CSMoE-GameDir/releases/download/continuous/CSMoE-CD-GameDir-Full.7z
- 7z x CSMoE-CD-GameDir-Full.7z
script:
- cd Android
- "./gradlew assembleRelease"
- cd ..
before_deploy:
- cp Android/app/build/outputs/apk/release/app-release-unsigned.apk CSMoE-CD-Android-arm64-unsigned-Full.apk
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-Android-arm64-unsigned-Full.apk
on:
branch: master
repo: MoeMod/CSMoE
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for Win32 amd64 MSVC/CMake and deploy
cache: ccache
os: windows
language: cpp
before_script:
- choco install nsis
- rm C:/ProgramData/chocolatey/bin/cpack.exe
- curl http://libsdl.org/release/SDL2-devel-2.0.12-VC.zip -o SDL2.zip
- unzip SDL2.zip
- mv SDL2-2.0.12 SDL2
- curl -fLO https://github.com/MoeMod/CSMoE-GameDir/releases/download/continuous/CSMoE-CD-GameDir-Full.7z
- 7z x CSMoE-CD-GameDir-Full.7z
script:
- mkdir -p win-build-x64 && cd win-build-x64
- cmake -A "x64" -DCMAKE_BUILD_TYPE=Release ../
- cmake --build . --config Release --target csmoe_cpack_nsis
- cd ..
- mkdir -p win-build-x86 && cd win-build-x86
- cmake -A "Win32" -DCMAKE_BUILD_TYPE=Release ../
- cmake --build . --config Release --target csmoe_cpack_nsis
- cd ..
before_deploy:
- cp win-build-x64/CSMoE-Win32-x64.exe CSMoE-CD-Win32-x64-Full.exe
- cp win-build-x86/CSMoE-Win32-Win32.exe CSMoE-CD-Win32-x86-Full.exe
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-Win32-x64-Full.exe
- CSMoE-CD-Win32-x86-Full.exe
on:
branch: master
repo: MoeMod/CSMoE
overwrite: true
skip_cleanup: true
prerelease: true