forked from cyberbotics/webots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
146 lines (146 loc) · 7.01 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
os: linux
dist: xenial
cache:
pip: true
services:
- xvfb
notifications:
email:
recipients:
on_success: change
on_failure: always
after_failure: >
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then curl -H "Content-Type: application/json" -X POST -d "{\"content\": \"Webots need your Help! Nightly build failed during the '$(echo $TRAVIS_BUILD_STAGE_NAME)' stage on the '$(echo $TRAVIS_BRANCH)' branch: $(echo $TRAVIS_BUILD_WEB_URL)\" }" $DISCORD_WEBHOOK; fi
jobs:
include:
- &unit_tests_staging
stage: Unit Tests
if: type = cron OR commit_message IN (travis_unit, travis_release, travis_distrib, travis_unit_only) OR (NOT tag =~ ^nightly_ AND tag IS present)
name: Ubuntu 16.04 / Python 3.8 / openjdk 8 / ROS kinetic
git: &compilation_git
depth: 3
submodules: true
os: linux
dist: xenial
install: skip # bundle install is not required
language: python
python: 3.8
jdk: openjdk8
addons: &apt_packages
apt:
packages:
- g++
- cmake
- libusb-dev
- swig
- python2.7-dev
- libglu1-mesa-dev
- libglib2.0-dev
- libfreeimage-dev
- libfreetype6-dev
- libxml2-dev
- libzzip-0-13
- libssl-dev
- libboost-dev
- libavcodec-extra
- libgd3
- libssh-gcrypt-dev
- libzip-dev
- python-pip
- libreadline-dev
- libav-tools
- npm
- python3.5-dev
- openjdk-8-jdk
- curl
- libwebpdemux1
- fakeroot
- pbzip2
- libxkbcommon-x11-dev
- libxcb-keysyms1
- libxcb-image0
- libxcb-icccm4
- libxcb-randr0
- libxcb-render-util0
- libxcb-xinerama0
- rename
before_install: &ubuntu_before_install
- sudo scripts/install/linux_optional_compilation_dependencies.sh
- source /opt/ros/*/setup.bash # sets 'ROS_DISTRO'
- pip install rospkg catkin_pkg empy defusedxml netifaces # by default ros only comes with python2.7 libraries
script:
- make release -j2
- make release -j2 -C tests
- python tests/test_suite.py --no-ansi-escape --nomake
- &distribution_staging
stage: Distribution
if: type = cron OR commit_message IN (travis_distrib, travis_distrib_only) OR (NOT tag =~ ^nightly_ AND tag IS present)
name: Ubuntu 16.04 / Python 3.8 / openjdk 8
git: *compilation_git
os: linux
dist: xenial
install: skip # bundle install is not required
language: python
python: 3.8
jdk: openjdk8
addons: *apt_packages
before_install: *ubuntu_before_install
script:
- if [[ -z "${TRAVIS_TAG}" ]]; then python scripts/packaging/set_commit_and_date_in_version.py $TRAVIS_COMMIT; fi
- make distrib -j2
- rename 's/\.tar.bz2$/_ubuntu-16.04.tar.bz2/' distribution/*.tar.bz2
- if [[ "$(ls -l distribution | grep -v ^l | wc -l)" -ne "4" ]]; then echo Wrong number of files in the distribution folder; exit -1; fi # make sure all the required files are generated
- pip install PyGithub # used to upload packages to Github releases
- scripts/packaging/publish_release.py --key=$GITHUB_API_KEY --repo=$TRAVIS_REPO_SLUG --branch=$TRAVIS_BRANCH --commit=$TRAVIS_COMMIT --tag=$TRAVIS_TAG
- <<: *distribution_staging
name: OSX / Python 2.7
os: osx
osx_image: xcode11.4 # Xcode: 11.4 | macOS: 10.14
language: generic # Travis doesn't support python on macos yet
addons: &mac_addons
homebrew:
packages:
- cmake
- swig
- wget
- node
before_install: &mac_before_install
- brew update
- brew install [email protected]
- export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
- npm install -g appdmg
- pip install PyGithub # used to upload packages to Github releases
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/3.7 # we can't use python3.7 from homebrew for the compilation because it is not compatible with the normal one
- if [[ ! -f $WEBOTS_HOME/dependencies/python3.7.zip ]]; then wget -qq https://cyberbotics.com/files/repository/dependencies/mac/release/python3.7.zip -P $WEBOTS_HOME/dependencies; fi
- sudo unzip -o -q $WEBOTS_HOME/dependencies/python3.7.zip -d /Library/Frameworks/Python.framework/Versions/3.7
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/3.8 # we can't use python3.8 from homebrew for the compilation because it is not compatible with the normal one
- if [[ ! -f $WEBOTS_HOME/dependencies/python3.8.zip ]]; then wget -qq https://cyberbotics.com/files/repository/dependencies/mac/release/python3.8.zip -P $WEBOTS_HOME/dependencies; fi
- sudo unzip -o -q $WEBOTS_HOME/dependencies/python3.8.zip -d /Library/Frameworks/Python.framework/Versions/3.8
- sudo mkdir -p /Library/Frameworks/Python.framework/Versions/3.9 # we can't use python3.9 from homebrew for the compilation because it is not compatible with the normal one
- if [[ ! -f $WEBOTS_HOME/dependencies/python3.9.zip ]]; then wget -qq https://cyberbotics.com/files/repository/dependencies/mac/release/python3.9.zip -P $WEBOTS_HOME/dependencies; fi
- sudo unzip -o -q $WEBOTS_HOME/dependencies/python3.9.zip -d /Library/Frameworks/Python.framework/Versions/3.9
script:
- if [[ -z "${TRAVIS_TAG}" ]]; then python scripts/packaging/set_commit_and_date_in_version.py $TRAVIS_COMMIT; fi
- make distrib -j2
- if [[ "$(ls -l distribution | grep -v ^l | wc -l)" -ne "3" ]]; then echo Wrong number of files in the distribution folder; exit -1; fi # make sure all the required file are generated
- scripts/packaging/publish_release.py --key=$GITHUB_API_KEY --repo=$TRAVIS_REPO_SLUG --branch=$TRAVIS_BRANCH --commit=$TRAVIS_COMMIT --tag=$TRAVIS_TAG
- <<: *distribution_staging
stage: Release
if: commit_message IN (travis_release, travis_release_only)
script:
- make distrib -j2
- if [[ "$(ls -l distribution | grep -v ^l | wc -l)" -ne "4" ]]; then echo Wrong number of files in the distribution folder; exit -1; fi # make sure all the required files are generated
- <<: *distribution_staging
stage: Release
if: commit_message IN (travis_release, travis_release_only)
name: OSX / Python 2.7
os: osx
osx_image: xcode11.4 # Xcode: 11.4 | macOS: 10.14
language: generic # Travis doesn't support python on macos yet
addons: *mac_addons
before_install: *mac_before_install
script:
- make distrib -j2
- if [[ "$(ls -l distribution | grep -v ^l | wc -l)" -ne "3" ]]; then echo Wrong number of files in the distribution folder; exit -1; fi # make sure all the required file are generated