Cache compiled packages on travis.
This commit is contained in:
parent
d907317fd4
commit
1f6446b6f5
23
.travis.yml
23
.travis.yml
@ -1,6 +1,27 @@
|
||||
sudo: true
|
||||
language: crystal
|
||||
os:
|
||||
- linux
|
||||
# - osx
|
||||
|
||||
install:
|
||||
- ./travis-install-lib-sodium.sh
|
||||
before_script:
|
||||
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
|
||||
- export C_INCLUDE_PATH=$LD_LIBRARY_PATH:`pwd`/sodium/include
|
||||
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/sodium/lib
|
||||
- env | egrep PKG
|
||||
- export PKG_CONFIG_PATH=`pwd`/sodium/lib/pkgconfig
|
||||
- env | egrep LD_
|
||||
- env | egrep PKG
|
||||
- pwd
|
||||
cache:
|
||||
directories:
|
||||
- sodium
|
||||
|
||||
#addons:
|
||||
# apt:
|
||||
# packages:
|
||||
# - libsodium-dev # old
|
||||
# homebrew:
|
||||
# packages:
|
||||
# - libsodium # takes forever
|
||||
|
@ -5,9 +5,21 @@
|
||||
|
||||
set -e
|
||||
|
||||
LIBSODIUM_INSTALL_PATH=`pwd`/sodium
|
||||
|
||||
if [ ! -f "sodium/include/sodium.h" ]; then
|
||||
set -x
|
||||
|
||||
mkdir -p "$LIBSODIUM_INSTALL_PATH"
|
||||
find "$LIBSODIUM_INSTALL_PATH"
|
||||
|
||||
wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
|
||||
tar xvfz LATEST.tar.gz
|
||||
tar xfz LATEST.tar.gz
|
||||
cd libsodium-stable
|
||||
sudo ./configure
|
||||
sudo make
|
||||
sudo make install
|
||||
./configure --prefix="$LIBSODIUM_INSTALL_PATH"
|
||||
make
|
||||
make install
|
||||
else
|
||||
echo "using cached libsodium build"
|
||||
find "$LIBSODIUM_INSTALL_PATH"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user