forked from touilleMan/godot-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
103 lines (92 loc) · 3.8 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
language: cpp
sudo: false
os:
- linux
# TODO: Currently broken
# - osx
dist: xenial
env:
global:
- DISPLAY=":99.0"
- AUDIODEV="null"
- XVFB_OPTS=":99.0 -ac -screen 0 1280x1024x24 -ac +extension GLX +extension RANDR +render -noreset"
matrix:
- BITS=64
- BITS=32
matrix:
exclude:
- os: osx
env: BITS=32
addons:
apt:
sources:
- ubuntu-toolchain-r-test
# Out of order (http://lists.llvm.org/pipermail/llvm-dev/2016-May/100303.html)
# - llvm-toolchain-precise
packages:
- build-essential
- pkg-config
- libx11-dev
- libxcursor-dev
- libasound2-dev
- libfreetype6-dev
- libgl1-mesa-dev
- libglu1-mesa-dev
- zlib1g-dev
- libssl-dev
- libxinerama-dev
- libxrandr-dev
- libffi-dev
# Need gcc > 4.6 for -std=c++11 and >= 7 for LTO 6.0 (used by gnative wrapper)
- gcc-9
# - clang-3.9
# - valgrind
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew upgrade python; fi;
# Replace binutils, gcc-9, zlib1g-dev, libssl-dev, and libffi-dev for cross-compile
- >
if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$BITS" == "32" ];
then sudo dpkg --add-architecture i386 &&
sudo apt update &&
sudo apt install binutils:i386 gcc-9:i386 zlib1g-dev:i386 libssl-dev:i386 libffi-dev:i386;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv shell 3.7; fi
# Needed because scons doesn't inherit the customized $PATH env
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CC=gcc-9; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export TARGET_PLATFORM=x11-$BITS; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TARGET_PLATFORM=osx-$BITS; fi
- git rev-parse HEAD
- $CC --version
- python3 --version
install:
- python3 -m venv venv
- . ./venv/bin/activate
- pip install -r requirements.txt
before_script:
# Start X11 server
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- $XVFB_OPTS; fi;
# give xvfb some time to start
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sleep 3; fi
script:
- set -e # Enable fail on first error
- if [[ "$TRAVIS_TAG" == "" ]]; then export SAMPLE_ARG='sample=true'; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scons platform=$TARGET_PLATFORM checkstyle; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then scons platform=$TARGET_PLATFORM CC=$CC release_suffix=$TRAVIS_BRANCH $SAMPLE_ARG release; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scons platform=$TARGET_PLATFORM CC=$CC release_suffix=$TRAVIS_BRANCH $SAMPLE_ARG release; fi
# Tests need x11 server with opengl3 or compile godot with platform=server (both not working so far...)
# - LIBGL_ALWAYS_SOFTWARE=1 scons debugger=valgrind platform=$TARGET_PLATFORM CC=$CC test
- set +e
- ls -l build
- du -sh build/
- ls -l build/pythonscript-*
- ls -l godot-python-*.zip
deploy:
provider: releases
api_key:
secure: dU/TpLfEuYvmlWhl0eB0r26GyMkQI/6GkWwntdMRgWoh2rpcOW93YaQDEfWLgYzIPYRd/l/2m/eiVhSLiEyDw0LPJ6JwyDKPo/cOtSv9hYXT7/43s1oAhqIOrzjPnb7wKge/Atwtnf5sc2a4Q31yJNGcpkxwln485eY/Uey5JRcfcbNUdepKy+p7VSuvdMU47AkTymCeLMe6VJ1sKKVpnRmVVknArDA4a+vPUs8gbCzepzORdVGVldJG8WcQY8EZ6lS0AS6vJqHWQfY9vUp/q3T56bK4gkm16k0qZD4nXhMjg7zvoRY51odndlg3FEdFrNjzJdssirw9/rLXwX7URnHnUDfjkOQ4KL/Fg2k2sRRq+YTSGQDFd9Ddzbpg39Fvb+CackwhQ4pL4rS87aX7Gg8gtDQ9McJA0eLeeZqzbMMQ85920JzkmWjCX2dsJsIaZTnZXDqdvXEphjbI7IM9zT0UnNEBn4CqSBELSVVsj3cQnwSoSHo753DOja6OttzkcEK2st+TW3ma9UCi1ieHDR5S5E9VqAiO4+aWKF+yXlF/yY1pnx6m8MDVD/UEL5kAaK5NO1whCGU73EDMs++JNazkHox/c/vA6+eSmyFDYaVXpIKmPb3If1cPpMLAP5h/Kpz7zi0z070UWSO0zXCncqs5k6A87lBQi1SXjhFPgkw=
skip_cleanup: true
file_glob: true
file: godot-python-*.zip
on:
repo: touilleMan/godot-python
tags: true