mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
travis: cache leveldb artifacts to reduce build time
This commit is contained in:
parent
f713cf25b1
commit
4140af459e
@ -7,10 +7,7 @@ php:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- phpenv config-rm xdebug.ini
|
- phpenv config-rm xdebug.ini
|
||||||
- LEVELDB_VERSION=10f59b56bec1db3ffe42ff265afe22182073e0e2
|
- ./tests/build-leveldb.sh 10f59b56bec1db3ffe42ff265afe22182073e0e2
|
||||||
- curl -fsSL "https://github.com/pmmp/leveldb-mcpe/archive/$LEVELDB_VERSION.tar.gz" | tar -zx
|
|
||||||
- mv leveldb-mcpe-$LEVELDB_VERSION leveldb-mcpe
|
|
||||||
- cd leveldb-mcpe && make -j4 sharedlibs && mv out-shared/libleveldb.* . && cd ..
|
|
||||||
- git clone https://github.com/reeze/php-leveldb.git leveldb
|
- git clone https://github.com/reeze/php-leveldb.git leveldb
|
||||||
- cd leveldb
|
- cd leveldb
|
||||||
- git checkout 9bcae79f71b81a5c3ea6f67e45ae9ae9fb2775a5
|
- git checkout 9bcae79f71b81a5c3ea6f67e45ae9ae9fb2775a5
|
||||||
@ -47,5 +44,8 @@ script:
|
|||||||
- composer install --no-dev
|
- composer install --no-dev
|
||||||
- ./tests/travis.sh -t4
|
- ./tests/travis.sh -t4
|
||||||
|
|
||||||
|
cache:
|
||||||
|
- leveldb-mcpe
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
24
tests/build-leveldb.sh
Executable file
24
tests/build-leveldb.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
LEVELDB_VERSION="$1"
|
||||||
|
if [ ! -f "./leveldb-mcpe/built_version" ] || [ $(cat "./leveldb-mcpe/built_version") != "$LEVELDB_VERSION" ]; then
|
||||||
|
echo "Building new LevelDB"
|
||||||
|
rm -rf "./leveldb-mcpe" || true
|
||||||
|
mkdir "./leveldb-mcpe"
|
||||||
|
|
||||||
|
curl -fsSL "https://github.com/pmmp/leveldb-mcpe/archive/$LEVELDB_VERSION.tar.gz" | tar -zx
|
||||||
|
mv "./leveldb-mcpe-$LEVELDB_VERSION" leveldb-mcpe-build
|
||||||
|
cd leveldb-mcpe-build
|
||||||
|
make -j4 sharedlibs
|
||||||
|
|
||||||
|
#put the artifacts in a separate dir, to avoid bloating travis cache"
|
||||||
|
mv out-shared/libleveldb.* ../leveldb-mcpe
|
||||||
|
mv include ../leveldb-mcpe
|
||||||
|
cd ../leveldb-mcpe
|
||||||
|
echo "$LEVELDB_VERSION" > "./built_version"
|
||||||
|
cd ..
|
||||||
|
else
|
||||||
|
echo "Using cached build for LevelDB version $LEVELDB_VERSION"
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user