-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
43 lines (35 loc) · 1.36 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
language: python
dist: xenial
env:
- SPARK_VERSION=2.4.3
python:
- "3.6"
- "3.7"
addons:
apt:
packages:
- axel
before_install:
- export FINK_SCIENCE="/home/travis/build/${TRAVIS_REPO_SLUG}"
# Install Java 8 for Xenial
- source conf/java8_for_xenial.sh
- export PATH=$HOME/.local/bin:${FINK_SCIENCE}/bin:$PATH
install:
# Download spark
- "[ -f spark ] || mkdir spark && cd spark && axel --quiet http://archive.apache.org/dist/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop2.7.tgz && cd .."
- tar -xf ./spark/spark-${SPARK_VERSION}-bin-hadoop2.7.tgz
- export SPARK_HOME=`pwd`/spark-${SPARK_VERSION}-bin-hadoop2.7
- echo "spark.yarn.jars=${SPARK_HOME}/jars/*.jar" > ${SPARK_HOME}/conf/spark-defaults.conf
- echo "ARROW_PRE_0_15_IPC_FORMAT=1" > ${SPARK_HOME}/conf/spark-env.sh
- export SPARKLIB=${SPARK_HOME}/python:${SPARK_HOME}/python/lib/py4j-0.10.7-src.zip
- export PYTHONPATH="${SPARKLIB}:${FINK_SCIENCE}:$PYTHONPATH"
- export PATH="${SPARK_HOME}/bin:${SPARK_HOME}/sbin:${PATH}"
# Python deps
- pip install --upgrade pip setuptools wheel
- pip install -r requirements.txt
- pip install torch==1.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
- python3 -mpip install 'light-curve[full]'
script:
# Execute tests and report coverage
- ./run_tests.sh
- bash <(curl -s https://codecov.io/bash)