Update build.sh and install_dependencies.sh

This commit is contained in:
Andrea Cavalli 2020-08-20 00:21:30 +02:00
parent 242132f1bc
commit 82e640cef5
2 changed files with 6 additions and 8 deletions

View File

@ -9,14 +9,13 @@ source ./travis/setup_variables.sh
cd $TD_BUILD_DIR
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=${TD_BIN_DIR} ${TD_SRC_DIR}
# Prepare for split-sources
cmake --build $TD_BUILD_DIR --target prepare_cross_compiling -- -j${TRAVIS_CPU_CORES}
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
cmake -A x64 -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=${TD_BIN_DIR} -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake ${TD_SRC_DIR}
fi
# Split sources
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cmake --build $TD_BUILD_DIR --target prepare_cross_compiling -- -j${TRAVIS_CPU_CORES}
cd $TD_SRC_DIR
php SplitSource.php
fi
@ -29,8 +28,7 @@ elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
cmake --build $TD_BUILD_DIR --target install --config Release -- -m
fi
# After build
# Undo split-sources
# Undo split-sources
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd $TD_SRC_DIR
php SplitSource.php --undo

View File

@ -16,11 +16,11 @@ source ./travis/setup_variables.sh
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
echo "Linux"
if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then
fallocate l- 4G /myswap.img
mkswap swap.img
chmod 0600 myswap.img
sudo fallocate -l 4G /myswap.img
sudo mkswap swap.img
sudo chmod 0600 myswap.img
sudo chown root:root /myswap.img
swapon swap.img
sudo swapon swap.img
fi
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
echo "Windows"