2019-04-23 11:18:42 +00:00
|
|
|
#!/bin/bash
|
2018-05-04 16:20:28 +00:00
|
|
|
|
2019-03-11 11:19:46 +00:00
|
|
|
set -e
|
2018-05-04 16:20:28 +00:00
|
|
|
|
|
|
|
### Setup Rust toolchain #######################################################
|
|
|
|
|
2020-03-16 10:43:19 +00:00
|
|
|
# Use profile=minimal here to skip installing clippy
|
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION --profile=minimal -y
|
2018-05-04 16:20:28 +00:00
|
|
|
export PATH=$PATH:$HOME/.cargo/bin
|
2019-03-24 16:19:15 +00:00
|
|
|
if [ "$TRAVIS_JOB_NAME" = "Minimum nightly" ]; then
|
2019-02-18 15:00:42 +00:00
|
|
|
rustup component add clippy
|
|
|
|
rustup component add rustfmt
|
|
|
|
fi
|
2018-05-04 16:20:28 +00:00
|
|
|
|
2019-04-23 11:18:42 +00:00
|
|
|
### Setup PyPy ################################################################
|
|
|
|
|
|
|
|
if [[ $FEATURES == *"pypy"* ]]; then
|
|
|
|
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
|
|
|
/bin/bash Miniconda3-latest-Linux-x86_64.sh -f -b -p /opt/anaconda && \
|
|
|
|
/opt/anaconda/bin/conda install --quiet --yes conda && \
|
|
|
|
/opt/anaconda/bin/conda config --system --add channels conda-forge && \
|
|
|
|
/opt/anaconda/bin/conda init bash && \
|
|
|
|
/opt/anaconda/bin/conda create -n pypy3 pypy3.5 -y && \
|
|
|
|
/opt/anaconda/envs/pypy3/bin/pypy3 -m ensurepip && \
|
|
|
|
/opt/anaconda/envs/pypy3/bin/pypy3 -m pip install setuptools-rust pytest pytest-benchmark tox
|
|
|
|
fi
|
|
|
|
|
2018-07-08 21:37:44 +00:00
|
|
|
### Setup python linker flags ##################################################
|
|
|
|
|
2019-04-23 11:18:42 +00:00
|
|
|
if [[ $FEATURES == *"pypy"* ]]; then
|
|
|
|
PYTHON_BINARY="pypy3"
|
|
|
|
else
|
|
|
|
PYTHON_BINARY="python"
|
|
|
|
fi
|
|
|
|
|
|
|
|
PYTHON_LIB=$($PYTHON_BINARY -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
|
2018-07-08 21:37:44 +00:00
|
|
|
|
2018-08-04 17:55:15 +00:00
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PYTHON_LIB:$HOME/rust/lib"
|
2018-07-08 21:37:44 +00:00
|
|
|
|
2018-11-15 11:13:57 +00:00
|
|
|
echo ${LD_LIBRARY_PATH}
|