Update build.sh, install_dependencies.sh, and setup_variables.sh
This commit is contained in:
parent
5557cea9e2
commit
60d6388e06
@ -9,7 +9,7 @@ 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}
|
||||
cmake --build $TD_BUILD_DIR --target prepare_cross_compiling -- -j4
|
||||
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}
|
||||
cmake --build $TD_BUILD_DIR --target prepare_cross_compiling -- -m
|
||||
@ -22,9 +22,9 @@ php SplitSource.php
|
||||
# Build
|
||||
cd $TD_BUILD_DIR
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
#cmake --build $TD_BUILD_DIR --target tdjson -- -j2
|
||||
#cmake --build $TD_BUILD_DIR --target tdjson_static -- -j2
|
||||
cmake --build $TD_BUILD_DIR --target install --config Release -- -j2
|
||||
#cmake --build $TD_BUILD_DIR --target tdjson -- -j${TRAVIS_CPU_CORES}
|
||||
#cmake --build $TD_BUILD_DIR --target tdjson_static -- -j${TRAVIS_CPU_CORES}
|
||||
cmake --build $TD_BUILD_DIR --target install --config Release -- -j${TRAVIS_CPU_CORES}
|
||||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
#cmake --build $TD_BUILD_DIR --target tdjson -- -m
|
||||
#cmake --build $TD_BUILD_DIR --target tdjson_static -- -m
|
||||
@ -39,7 +39,7 @@ php SplitSource.php --undo
|
||||
cd $TDNATIVES_CPP_BUILD_DIR
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DTD_BIN_DIR=${TD_BIN_DIR} -DTDNATIVES_BIN_DIR=${TDNATIVES_BIN_DIR} -DTDNATIVES_DOCS_BIN_DIR=${TDNATIVES_DOCS_BIN_DIR} -DTd_DIR=${TD_BIN_DIR}/lib/cmake/Td -DJAVA_SRC_DIR=${JAVA_SRC_DIR} -DTDNATIVES_CPP_SRC_DIR:PATH=$TDNATIVES_CPP_SRC_DIR $TDNATIVES_CPP_SRC_DIR
|
||||
cmake --build $TDNATIVES_CPP_BUILD_DIR --target install -- -j2
|
||||
cmake --build $TDNATIVES_CPP_BUILD_DIR --target install -- -j${TRAVIS_CPU_CORES}
|
||||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
cmake -A x64 -DCMAKE_BUILD_TYPE=Release -DTD_BIN_DIR=${TD_BIN_DIR} -DTDNATIVES_BIN_DIR=${TDNATIVES_BIN_DIR} -DTDNATIVES_DOCS_BIN_DIR=${TDNATIVES_DOCS_BIN_DIR} -DTd_DIR=${TD_BIN_DIR}/lib/cmake/Td -DJAVA_SRC_DIR=${JAVA_SRC_DIR} -DTDNATIVES_CPP_SRC_DIR:PATH=$TDNATIVES_CPP_SRC_DIR -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake $TDNATIVES_CPP_SRC_DIR
|
||||
cmake --build $TDNATIVES_CPP_BUILD_DIR --target install --config Release -- -m
|
||||
|
@ -15,6 +15,13 @@ 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 chown root:root /myswap.img
|
||||
swapon swap.img
|
||||
fi
|
||||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
echo "Windows"
|
||||
choco install ccache
|
||||
|
@ -12,15 +12,13 @@ export TDNATIVES_CPP_BUILD_DIR=${PWD}/build-tdnatives
|
||||
export JAVA_SRC_DIR=${PWD}/src/tdnatives-java
|
||||
export TDLIB_SERIALIZER_DIR=${PWD}/dependencies/tdlib-serializer
|
||||
export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
|
||||
if [ "$TRAVIS_CPU_ARCH" = "aarch64" ]; then
|
||||
export TRAVIS_CPU_ARCH_JAVA="arm64"
|
||||
else
|
||||
export TRAVIS_CPU_ARCH_JAVA="${TRAVIS_CPU_ARCH,,}"
|
||||
fi
|
||||
export TRAVIS_CPU_ARCH_JAVA="${TRAVIS_CPU_ARCH,,}"
|
||||
if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then
|
||||
export TRAVIS_CPU_ARCH_STANDARD="aarch64"
|
||||
export TRAVIS_CPU_CORES="1"
|
||||
else
|
||||
export TRAVIS_CPU_ARCH_STANDARD="${TRAVIS_CPU_ARCH,,}"
|
||||
export TRAVIS_CPU_CORES="2"
|
||||
fi
|
||||
export TRAVIS_OS_NAME_STANDARD="${TRAVIS_OS_NAME,,}"
|
||||
if [ "$TRAVIS_OS_NAME_STANDARD" = "windows" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user