forked from CesiumGS/cesium-unreal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
225 lines (225 loc) · 10.4 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
language: cpp
jobs:
include:
- stage: Static Checks
name: Formatting
os: linux
dist: focal
git:
submodules: false
before_script:
script:
- npm install
- npm run format -- --dry-run -Werror
- stage: Build OS Packages
name: Windows 4.27
os: windows
install:
- choco install 7zip.portable
- choco install python --version 3.9.2
- choco install nasm
- python -m pip install --upgrade pip
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- "./travis/travis-get-ue-427.sh &"
before_script:
- export CESIUM_UNREAL_VERSION=$(git describe)
- export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-windows-${CESIUM_UNREAL_VERSION}
- mkdir -p extern/build
- cd extern/build
- cmake .. -A x64
script:
- cmake --build . --config Release --target install -- /maxcpucount:4
- cd ../..
- rm -rf extern
- export CLONEDIR=$PWD
- wait
- cd /c/Epic/UE_4.27/Engine/Build/BatchFiles
- ./RunUAT.bat BuildPlugin -Plugin="$CLONEDIR/CesiumForUnreal.uplugin" -Package="$CLONEDIR/../packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Win64
after_success:
- cd "$CLONEDIR/../packages"
- 7z a ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip CesiumForUnreal/
- aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/
- export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000)
env: PATH=/c/Python39:/c/Python39/Scripts:$PATH
- name: Android 4.27
os: windows
cache:
timeout: 1000
directories:
- $HOME/android-ndk-r21e
install:
- choco install 7zip.portable
- choco install python --version 3.9.2
- choco install wget
- choco install ninja
- choco install nasm
- python -m pip install --upgrade pip
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- travis_wait 30 "./travis/travis-get-ue-427.sh"
- travis_wait 30 "./travis/travis-get-android-ndk.sh"
before_script:
- export ANDROID_NDK_ROOT=$HOME/android-ndk-r21e
- export NDKROOT=$ANDROID_NDK_ROOT
- export CESIUM_UNREAL_VERSION=$(git describe)
- export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-android-${CESIUM_UNREAL_VERSION}
- mkdir -p extern/build-android
- cd extern/build-android
- cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="unreal-android-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
- cd ../..
script:
- cd extern/build-android
- cmake --build . --config Release --target install
- cd ../..
- rm -rf extern
- export CLONEDIR=$PWD
- cd /c/Epic/UE_4.27/Engine/Build/BatchFiles
- ./RunUAT.bat BuildPlugin -Plugin="$CLONEDIR/CesiumForUnreal.uplugin" -Package="$CLONEDIR/../packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Android -NoHostPlatform
after_success:
- cd "$CLONEDIR/../packages"
- 7z a ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip CesiumForUnreal/
- aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/
- export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000)
env: PATH=/c/Python39:/c/Python39/Scripts:$PATH
- name: MacOS 4.27
os: osx
osx_image: xcode11.3
install:
- python -m pip install --upgrade pip
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- wget https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz
- tar -xzvf nasm-2.14.02.tar.xz
- pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd
- chmod +x "./travis/travis-get-ue-427.sh"
- "./travis/travis-get-ue-427.sh &"
before_script:
- export CESIUM_UNREAL_VERSION=$(git describe)
- export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-macos-${CESIUM_UNREAL_VERSION}
- mkdir -p extern/build
- cd extern/build
- cmake .. -DCMAKE_BUILD_TYPE=Release
script:
- cmake --build . -j 4 --target install
- cd ../..
- rm -rf extern
- export CLONEDIR=$PWD
- wait
- cd $HOME/UE_4.27/Engine/Build/BatchFiles
- ./RunUAT.sh BuildPlugin -Plugin="$CLONEDIR/CesiumForUnreal.uplugin" -Package="$CLONEDIR/../packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Mac
after_success:
- cd "$CLONEDIR/../packages"
- zip -r -X ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip CesiumForUnreal
- aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/
- export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000)
- name: iOS 4.27
os: osx
osx_image: xcode11.3
install:
- python -m pip install --upgrade pip
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- wget https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz
- tar -xzvf nasm-2.14.02.tar.xz
- pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd
- chmod +x "./travis/travis-get-ue-427.sh"
- "./travis/travis-get-ue-427.sh &"
before_script:
- export CESIUM_UNREAL_VERSION=$(git describe)
- export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION}
- cd extern
- mkdir build-ios
- cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
- cd ..
script:
- cd extern
- cmake --build build-ios -j 4 --target install --config Release -- -quiet # XCode output maxes out Travis log - Need to make it quiet
- cd ..
- rm -rf extern
- export CLONEDIR=$PWD
- wait
- cd $HOME/UE_4.27/Engine/Build/BatchFiles
- ./RunUAT.sh BuildPlugin -Plugin="$CLONEDIR/CesiumForUnreal.uplugin" -Package="$CLONEDIR/../packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=iOS -NoHostPlatform
after_success:
- cd "$CLONEDIR/../packages"
- zip -r -X ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip CesiumForUnreal
- aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/
- export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000)
- name: Linux 4.27
os: windows
cache:
timeout: 1000
directories:
- $HOME/android-ndk-r21e
install:
- choco install 7zip.portable
- choco install python --version 3.9.2
- choco install wget
- choco install ninja
- choco install nasm
- python -m pip install --upgrade pip
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- travis_wait 30 "./travis/travis-get-ue-linux-crosscompile-toolchain-427.sh"
- travis_wait 30 "./travis/travis-get-ue-427.sh"
script:
- export UNREAL_ENGINE_DIR=/c/Epic/UE_4.27
- export LINUX_MULTIARCH_ROOT=/c/UnrealToolchains/v19_clang-11.0.1-centos7/
- export UNREAL_ENGINE_COMPILER_DIR=${LINUX_MULTIARCH_ROOT}x86_64-unknown-linux-gnu
- export UNREAL_ENGINE_LIBCXX_DIR=$UNREAL_ENGINE_DIR/Engine/Source/ThirdParty/Linux/LibCxx
- export CESIUM_UNREAL_VERSION=$(git describe)
- export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-linux-${CESIUM_UNREAL_VERSION}
- mkdir -p extern/build
- cd extern
- cmake --version
- cmake -G Ninja -B build -S . -DCMAKE_TOOLCHAIN_FILE="unreal-linux-from-windows-toolchain.cmake" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
- cat /c/Users/travis/build/CesiumGS/cesium-unreal/extern/build/CMakeFiles/CMakeError.log
- cmake --build build -j 4 --target install
- cd ..
- rm -rf extern
- export CLONEDIR=$PWD
- cd /c/Epic/UE_4.27/Engine/Build/BatchFiles
- ./RunUAT.bat BuildPlugin -Plugin="$CLONEDIR/CesiumForUnreal.uplugin" -Package="$CLONEDIR/../packages/CesiumForUnreal" -CreateSubFolder -TargetPlatforms=Linux -NoHostPlatform
after_success:
- cd "$CLONEDIR/../packages"
- 7z a ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip CesiumForUnreal/
- aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/
- export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000)
env: PATH=/c/Python39:/c/Python39/Scripts:$PATH
- stage: Combine Packages
name: Combine for UE 4.27
os: linux
dist: focal
git:
submodules: false
install:
- # As of 2021-08-23, the server listed in the rabbitmq PPA has an expired certificate
- # and breaks our ability to update. We don't need it, so remove it.
- sudo rm /etc/apt/sources.list.d/rabbitmq.list
- sudo apt-get update
- sudo apt-get install unzip zip awscli httpie
script:
- export CESIUM_UNREAL_VERSION=$(git describe)
- aws s3 cp s3://builds-cesium-unreal/CesiumForUnreal-427-linux-${CESIUM_UNREAL_VERSION}.zip .
- aws s3 cp s3://builds-cesium-unreal/CesiumForUnreal-427-macos-${CESIUM_UNREAL_VERSION}.zip .
- aws s3 cp s3://builds-cesium-unreal/CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION}.zip .
- aws s3 cp s3://builds-cesium-unreal/CesiumForUnreal-427-android-${CESIUM_UNREAL_VERSION}.zip .
- aws s3 cp s3://builds-cesium-unreal/CesiumForUnreal-427-windows-${CESIUM_UNREAL_VERSION}.zip .
- mkdir -p build/package
- cd build/package
- unzip ../../CesiumForUnreal-427-linux-${CESIUM_UNREAL_VERSION}.zip
- unzip -o ../../CesiumForUnreal-427-macos-${CESIUM_UNREAL_VERSION}.zip
- unzip -o ../../CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION}.zip
- unzip -o ../../CesiumForUnreal-427-android-${CESIUM_UNREAL_VERSION}.zip
- unzip -o ../../CesiumForUnreal-427-windows-${CESIUM_UNREAL_VERSION}.zip
- zip -r CesiumForUnreal-427-${CESIUM_UNREAL_VERSION}.zip CesiumForUnreal
after_success:
- aws s3 cp CesiumForUnreal-427-${CESIUM_UNREAL_VERSION}.zip s3://builds-cesium-unreal/
- export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/CesiumForUnreal-427-${CESIUM_UNREAL_VERSION}.zip --expires-in 315360000)
- http POST "https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_COMMIT}" "Authorization:token ${GITHUB_TOKEN}" state=success context=UE4.27-AllPlatforms "target_url=${PACKAGE_LINK}" --ignore-stdin