forked from tpaviot/pythonocc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
134 lines (122 loc) · 4.47 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
sudo: false
language: cpp
cache:
apt: true
git:
depth: false
# the secure below is the binstar token
# to genrate this secure
# first create an anconda cloud token
# $ anaconda auth -n the_token_name --max-age 22896000 -c --scopes api
# the token is return as something like "yh-6654-12334_111225"
# then encrypt the token
# Note : in order to encrypt using travis
# You may have to :
# $ sudo gem install travis
# (especially if you performed a linux distro upgrade, ruby should not be up to date)
# You have to be in the directory where you installed the local copy of the repository
# $ cd [your_dev_dir]/pythonocc-core
# $ sudo travis encrypt BINSTAR_TOKEN="yh-6654-12334_111225"
# !!be careful about the typo BINSTAR_TOKEN with the proper case. Otherwise
# !!the $BINSTAR_TOKEN env var value will be null and the line
# !!anaconda -t $BINSTAR_TOKEN upload *.bz2 will not be run properly
# after that, copy/paste the secure on the following line
env:
global:
- secure: "Bqor4TrYqeJUkjiIHjCq/e3xt/jAoU3Q5kwG/ej+QxaiT6hmkirX3Io3rHxNTbS+mYMAMTbtkkpGqYIYIYtNVx8jGYLdwOzNcuW/wzZf9VuAW/rnjx2lzuYRhHk3GOylSPUU06JHvXDmZvdMxetNBeWaE5hGuJsC9liA+stDepA="
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-multilib
- g++-multilib
- lib32z1+
- lsb-core
- g++-7
matrix:
include:
- env: PYTHON="2.7" CONDA_PY=27 ARCH="x86_64"
os: linux
dist: trusty
- env: PYTHON="2.7" CONDA_PY=27 ARCH="x86_64"
os: osx
osx_image: xcode9.4
- env: PYTHON="3.5" CONDA_PY=35 ARCH="x86_64"
os: linux
dist: trusty
- env: PYTHON="3.5" CONDA_PY=35 ARCH="x86_64"
os: osx
osx_image: xcode9.4
- env: PYTHON="3.6" CONDA_PY=36 ARCH="x86_64"
os: linux
dist: trusty
- env: PYTHON="3.6" CONDA_PY=36 ARCH="x86_64"
os: osx
osx_image: xcode9.4
- env: PYTHON="3.7" CONDA_PY=37 ARCH="x86_64"
os: linux
dist: trusty
- env: PYTHON="3.7" CONDA_PY=37 ARCH="x86_64"
os: osx
osx_image: xcode9.4
# Use miniconda to install binary versions of numpy etc. from continuum
# analytic's repository. Follows an approach described by Dan Blanchard:
# https://gist.github.com/dan-blanchard/7045057
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export CXX=g++-7;
export CC=gcc-7;
fi;
- if [ ${PYTHON:0:1} == "2" ]; then
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
else
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
fi;
- chmod +x miniconda.sh
# When we are installing the 32 Bit conda on a 64 Bit system, the miniconda
# installer will ask for a "yes" despite the -b flag, so we pipe in a yes
- yes | ./miniconda.sh -b -p $HOME/miniconda
#- bash miniconda.sh -b -p -f $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$HOME/miniconda/lib:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# install everything required to build the receipe
# conda-build 3.2.0 on osx to prevent using check_overlinking
# method which is quite loooong to process
- conda install conda-build==3.2.0
- conda install anaconda-client
# Useful for debugging any issues with conda
- conda info -a
# download/install OCE from DLR-SC channel
- conda config --add channels https://conda.anaconda.org/dlr-sc
- conda config --add channels https://conda.anaconda.org/conda-forge
- conda config --add channels https://conda.anaconda.org/tpaviot
- conda config --add channels https://conda.anaconda.org/oce
- conda config --add channels https://conda.anaconda.org/pythonocc
script:
- conda build ci/conda --dirty --no-remove-work-dir
# automative upload to anaconda cloud only
# if the build was triggered by a cron
# labelled as "nightly"
# else labelled as "continuous-delivery"
after_success:
- python ci/move-conda-package.py
- if [ "$TRAVIS_BRANCH" == "master" ]; then
anaconda -t $BINSTAR_TOKEN upload *.bz2 -l main --force;
else
anaconda -t $BINSTAR_TOKEN upload *.bz2 -l cd-$TRAVIS_BRANCH --force;
fi;
branches:
only:
- master
- /^review/