forked from MoeMod/CSMoE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
263 lines (263 loc) · 8.97 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
language: cpp
git:
depth: 50
submodules: true
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: focal
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
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
script:
- mkdir -p linux-build-amd64 && cd linux-build-amd64
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
- cmake --build .
- cd ..
- stage: build
name: Build for Linux arm64
arch: arm64
os: linux
dist: focal
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
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
script:
- mkdir -p linux-build-arm64 && cd linux-build-arm64
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
- cmake --build .
- cd ..
- stage: build
name: Build for macOS amd64 and deploy
os: osx
osx_image: xcode12.2
language: objective-c
before_script:
- curl -s http://libsdl.org/release/SDL2-2.0.14.tar.gz > SDL2.tar.gz
- tar xzf SDL2.tar.gz
- mv SDL2-2.0.14 3rdparty/SDL2
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
- 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:
repo: MoeMod/CSMoE
tags: true
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for iOS arm64 and deploy
os: osx
osx_image: xcode12.2
language: objective-c
before_script:
- curl -s http://libsdl.org/release/SDL2-2.0.14.tar.gz > SDL2.tar.gz
- tar xzf SDL2.tar.gz
- mv SDL2-2.0.14 3rdparty/SDL2
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
- 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.app Payload/
before_deploy:
- zip -r CSMoE-CD-iOS-arm64-unsigned-Full.ipa Payload
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-iOS-arm64-unsigned-Full.ipa
on:
repo: MoeMod/CSMoE
tags: true
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for Android arm64/amd64 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.18.1" --channel=3
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
- 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:
repo: MoeMod/CSMoE
tags: true
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for Win32 x86 MSVC/CMake and deploy
cache: ccache
os: windows
language: cpp
before_script:
- choco install nsis
- rm C:/ProgramData/chocolatey/bin/cpack.exe
- curl -s http://libsdl.org/release/SDL2-2.0.14.zip > SDL2-2.0.14.zip
- unzip SDL2-2.0.14.zip
- mv SDL2-2.0.14 3rdparty/SDL2
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
- 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-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-x86/CSMoE-Win32-Win32.exe CSMoE-CD-Win32-x86-Full.exe
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-Win32-x86-Full.exe
on:
repo: MoeMod/CSMoE
tags: true
overwrite: true
skip_cleanup: true
prerelease: true
- stage: build
name: Build for Win32 x64 MSVC/CMake and deploy
cache: ccache
os: windows
language: cpp
before_script:
- choco install nsis
- rm C:/ProgramData/chocolatey/bin/cpack.exe
- curl -s http://libsdl.org/release/SDL2-2.0.14.zip > SDL2-2.0.14.zip
- unzip SDL2-2.0.14.zip
- mv SDL2-2.0.14 3rdparty/SDL2
- git clone https://github.com/LuaJIT/LuaJIT 3rdparty/LuaJIT
- git clone https://github.com/Neargye/nameof 3rdparty/nameof
- git clone https://github.com/JustasMasiulis/xorstr 3rdparty/xorstr
- 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 ..
before_deploy:
- cp win-build-x64/CSMoE-Win32-x64.exe CSMoE-CD-Win32-x64-Full.exe
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- CSMoE-CD-Win32-x64-Full.exe
on:
repo: MoeMod/CSMoE
tags: true
overwrite: true
skip_cleanup: true
prerelease: true