Repository cleanup. Add README and reorganize directories
This commit is contained in:
parent
484f400915
commit
2c6465d85d
10
.github/workflows/build.yaml
vendored
10
.github/workflows/build.yaml
vendored
@ -78,7 +78,7 @@ jobs:
|
||||
export GH_MATRIX_ARCH=${{ matrix.arch }}
|
||||
export IMPLEMENTATION_NAME=${{ matrix.implementation }}
|
||||
|
||||
source ./github-workflows/setup-variables.sh
|
||||
source ./scripts/continuous-integration/github-workflows/setup-variables.sh
|
||||
|
||||
echo "REVISION=$REVISION" >> $GITHUB_ENV
|
||||
echo "IMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" >> $GITHUB_ENV
|
||||
@ -111,13 +111,13 @@ jobs:
|
||||
run: |
|
||||
echo "REVISION: $REVISION"
|
||||
|
||||
source ./github-workflows/install-dependencies.sh
|
||||
source ./scripts/continuous-integration/github-workflows/install-dependencies.sh
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
echo "REVISION: $REVISION"
|
||||
|
||||
source ./github-workflows/build.sh
|
||||
source ./scripts/continuous-integration/github-workflows/build.sh
|
||||
- id: getfilename
|
||||
shell: bash
|
||||
run: echo "::set-output name=file::$(cd generated/target; ls tdli*-natives-*.jar)"
|
||||
@ -134,7 +134,7 @@ jobs:
|
||||
run: |
|
||||
echo "REVISION: $REVISION"
|
||||
|
||||
source ./github-workflows/deploy-snapshot.sh
|
||||
source ./scripts/continuous-integration/github-workflows/deploy-snapshot.sh
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
|
||||
@ -144,7 +144,7 @@ jobs:
|
||||
run: |
|
||||
echo "REVISION: $REVISION"
|
||||
|
||||
source ./github-workflows/deploy-release.sh
|
||||
source ./scripts/continuous-integration/github-workflows/deploy-release.sh
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
|
||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,9 +1,9 @@
|
||||
[submodule "tdlib-serializer"]
|
||||
path = tdlib-serializer
|
||||
url = https://git.ignuranza.net/windoz/tdlib-serializer.git
|
||||
[submodule "implementations/tdlib"]
|
||||
path = implementations/tdlib
|
||||
url = https://github.com/tdlib/td.git
|
||||
[submodule "implementations/tdlight"]
|
||||
path = implementations/tdlight
|
||||
url = https://git.ignuranza.net/tdlight-team/tdlight.git
|
||||
[submodule "scripts/core/tdlib-serializer"]
|
||||
path = scripts/core/tdlib-serializer
|
||||
url = https://git.ignuranza.net/windoz/tdlib-serializer.git
|
||||
|
@ -1,105 +0,0 @@
|
||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
||||
http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||
|
||||
<activeProfiles>
|
||||
<activeProfile>github</activeProfile>
|
||||
<activeProfile>mchv-release</activeProfile>
|
||||
<activeProfile>mchv-snapshot</activeProfile>
|
||||
<activeProfile>mchv-release-distribution</activeProfile>
|
||||
<activeProfile>mchv-snapshot-distribution</activeProfile>
|
||||
</activeProfiles>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>github</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<url>https://repo1.maven.org/maven2</url>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>github</id>
|
||||
<name>GitHub OWNER Apache Maven Packages</name>
|
||||
<url>https://maven.pkg.github.com/tdlight-team/tdlight-java</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>mchv-release</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mchv-release</id>
|
||||
<name>MCHV Release Apache Maven Packages</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>mchv-snapshot</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mchv-snapshot</id>
|
||||
<name>MCHV Snapshot Apache Maven Packages</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>mchv-release-distribution</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mchv-release-distribution</id>
|
||||
<name>MCHV Release Apache Maven Packages Distribution</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>mchv-snapshot-distribution</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mchv-snapshot-distribution</id>
|
||||
<name>MCHV Snapshot Apache Maven Packages Distribution</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<servers>
|
||||
<server>
|
||||
<id>github</id>
|
||||
<username>Cavallium</username>
|
||||
<password>${env.PACKAGECLOUD_TOKEN}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>mchv</id>
|
||||
<username>cavallium</username>
|
||||
<password>${env.MCHVCLOUD_TOKEN}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>mchv-release</id>
|
||||
<username>cavallium</username>
|
||||
<password>${env.MCHVCLOUD_TOKEN}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>mchv-snapshot</id>
|
||||
<username>cavallium</username>
|
||||
<password>${env.MCHVCLOUD_TOKEN}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>mchv-release-distribution</id>
|
||||
<username>cavallium</username>
|
||||
<password>${env.MCHVCLOUD_TOKEN}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>mchv-snapshot-distribution</id>
|
||||
<username>cavallium</username>
|
||||
<password>${env.MCHVCLOUD_TOKEN}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
70
.travis.yml
70
.travis.yml
@ -1,70 +0,0 @@
|
||||
language: shell
|
||||
|
||||
os:
|
||||
- linux
|
||||
- windows
|
||||
- osx
|
||||
arch:
|
||||
- amd64
|
||||
- arm64
|
||||
env:
|
||||
- IMPLEMENTATION_NAME=tdlib CACHE_NAME=tdlib
|
||||
- IMPLEMENTATION_NAME=tdlight CACHE_NAME=tdlight
|
||||
osx_image: xcode11.3
|
||||
dist: bionic
|
||||
before_install:
|
||||
- cp .travis.settings.xml $HOME/.m2/settings.xml
|
||||
- chmod +x travis/build.sh
|
||||
- chmod +x travis/build_success.sh
|
||||
- chmod +x travis/deploy.sh
|
||||
- chmod +x travis/install_dependencies.sh
|
||||
- chmod +x travis/setup_variables.sh
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
packages:
|
||||
- make
|
||||
- git
|
||||
- zlib1g-dev
|
||||
- libssl-dev
|
||||
- gperf
|
||||
- cmake
|
||||
- clang-10
|
||||
- libc++-10-dev
|
||||
- libc++abi-10-dev
|
||||
- ccache
|
||||
- maven
|
||||
- python3
|
||||
- python3-pip
|
||||
- php7.2-cli
|
||||
- openjdk-11-jdk
|
||||
cache:
|
||||
bundler: true
|
||||
cocoapods: true
|
||||
ccache: true
|
||||
directories:
|
||||
- ".autoconf"
|
||||
- "$HOME/.m2"
|
||||
- "$HOME/.ccache"
|
||||
- "$HOME/pip"
|
||||
|
||||
#deploy:
|
||||
# - provider: pages
|
||||
# skip-cleanup: true
|
||||
# github-token: $GITHUB_TOKEN
|
||||
# keep-history: false
|
||||
# local-dir: out/docs
|
||||
# repo: tdlight-team/tdlight-docs
|
||||
# target_branch: master
|
||||
# email: andrea@cavallium.it
|
||||
# name: "Andrea Cavalli"
|
||||
# verbose: true
|
||||
# on:
|
||||
# branch: dev
|
||||
# condition: $TRAVIS_OS_NAME = linux && $TRAVIS_CPU_ARCH = amd64
|
||||
|
||||
install: ./travis/install_dependencies.sh
|
||||
script: ./travis/build.sh
|
||||
after_success:
|
||||
- if [ "$TRAVIS_BRANCH" = "develop" ]; then ./travis/build_success.sh; fi
|
||||
- if [ "$TRAVIS_BRANCH" = "master" ]; then ./travis/deploy.sh; fi
|
10
README.md
10
README.md
@ -1,2 +1,10 @@
|
||||
Native libraries used by TDLight Java
|
||||
# Native libraries used by TDLight Java
|
||||
This repository generates JNI packages for each architecture and OS used by [TDLight Java](https://github.com/tdlight-team/tdlight-java).
|
||||
|
||||
## Building
|
||||
Go to `scripts/utils` and run `./compile-all.sh`
|
||||
|
||||
## Download
|
||||
Download the latest release of [TDLight Java](https://github.com/tdlight-team/tdlight-java/releases)
|
||||
|
||||
If you want to download directly the native packages for each architecture and os, go to Actions tab and click on the latest build.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
cd ../generated
|
||||
cd ../../generated
|
||||
|
||||
[ -f ./src/main/java/it/tdlight/jni/TdApi.java ] && rm ./src/main/java/it/tdlight/jni/TdApi.java
|
||||
mvn clean package
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
cd ../
|
||||
cd ../../
|
||||
|
||||
rm -r generated
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = <cores>
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
|
||||
# Check variables correctness
|
||||
if [ -z "${OPERATING_SYSTEM_NAME}" ]; then
|
||||
@ -24,7 +25,7 @@ if [ -z "${CPU_CORES}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../
|
||||
cd ../../
|
||||
|
||||
# Print details
|
||||
echo "Compiling td..."
|
@ -1,10 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = <cores>
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
|
||||
# Check variables correctness
|
||||
if [ -z "${OPERATING_SYSTEM_NAME}" ]; then
|
||||
@ -24,7 +25,7 @@ if [ -z "${CPU_CORES}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../
|
||||
cd ../../
|
||||
|
||||
# Print details
|
||||
echo "Compiling tdjni..."
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# REVISION = <revision>
|
||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||
# REVISION = <revision>
|
||||
|
||||
# Check variables correctness
|
||||
if [ -z "${REVISION}" ]; then
|
||||
@ -8,7 +8,7 @@ if [ -z "${REVISION}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../generated
|
||||
cd ../../generated
|
||||
|
||||
mvn -B -Drevision=${REVISION} clean deploy
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
cd ../generated
|
||||
cd ../../generated
|
||||
|
||||
mvn -B deploy
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
|
||||
# Check variables correctness
|
||||
if [ -z "${OPERATING_SYSTEM_NAME}" ]; then
|
||||
@ -18,7 +18,7 @@ if [ -z "${IMPLEMENTATION_NAME}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../
|
||||
cd ../../
|
||||
|
||||
# Print details
|
||||
echo "Generating maven project..."
|
||||
@ -26,7 +26,6 @@ echo "Current directory: $(pwd)"
|
||||
echo "Operating system: ${OPERATING_SYSTEM_NAME}"
|
||||
echo "Architecture: ${CPU_ARCHITECTURE_NAME}"
|
||||
echo "Td implementation: ${IMPLEMENTATION_NAME}"
|
||||
echo "CPU cores count: ${CPU_CORES}"
|
||||
|
||||
# Delete old data
|
||||
echo "Deleting old data..."
|
||||
@ -42,7 +41,7 @@ echo "Creating missing folders..."
|
||||
|
||||
# Generate pom.xml
|
||||
echo "Generating pom.xml..."
|
||||
sed -f "src/main/replacements/replace-${OPERATING_SYSTEM_NAME}-${CPU_ARCHITECTURE_NAME}-${IMPLEMENTATION_NAME}.sed" pom.template.xml > generated/pom.xml
|
||||
sed -f "src/main/replacements/replace-${OPERATING_SYSTEM_NAME}-${CPU_ARCHITECTURE_NAME}-${IMPLEMENTATION_NAME}.sed" src/main/jni-project-src/pom.template.xml > generated/pom.xml
|
||||
|
||||
# Copy source files
|
||||
echo "Copying source files..."
|
@ -1,10 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = <cores>
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
|
||||
# Check variables correctness
|
||||
if [ -z "${OPERATING_SYSTEM_NAME}" ]; then
|
||||
@ -24,7 +25,7 @@ if [ -z "${CPU_CORES}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../
|
||||
cd ../../
|
||||
|
||||
# Print details
|
||||
echo "Generating td tools..."
|
@ -1,10 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = <cores>
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||
# OTHER REQUIRED ENVIRONMENT VARIABLES:
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
|
||||
# Check variables correctness
|
||||
if [ -z "${OPERATING_SYSTEM_NAME}" ]; then
|
||||
@ -24,7 +25,7 @@ if [ -z "${CPU_CORES}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../
|
||||
cd ../../
|
||||
|
||||
# Print details
|
||||
echo "Generating TdApi.java..."
|
||||
@ -103,7 +104,7 @@ cmake --build . --target td_generate_java_api --config Release ${CPU_CORES}
|
||||
cd ..
|
||||
|
||||
echo "Patching TdApi.java..."
|
||||
${PYTHON_EXECUTABLE} ../tdlib-serializer/ $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/TdApi.java) $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java) $(realpath -m ../tdlib-serializer/headers.txt)
|
||||
${PYTHON_EXECUTABLE} ../scripts/core/tdlib-serializer/tdlib-serializer/ $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/TdApi.java) $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java) $(realpath -m ../scripts/core/tdlib-serializer/tdlib-serializer/headers.txt)
|
||||
rm ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
||||
if [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then
|
||||
unexpand --tabs=2 ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java > ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
# REQUIRED PARAMETERS:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = <cores>
|
||||
|
||||
./generate_maven_project.sh
|
||||
./generate_td_tools.sh
|
||||
./compile_td.sh
|
||||
./compile_tdjni.sh
|
||||
./build_generated_maven_project.sh
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
19
scripts/utils/compile-all.sh
Executable file
19
scripts/utils/compile-all.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash -e
|
||||
# MAIN REQUIRED ENVIRONMENT VARIABLES:
|
||||
# OPERATING_SYSTEM_NAME = <windows | linux | osx>
|
||||
# CPU_ARCHITECTURE_NAME = <amd64 | aarch64 | 386 | armv6 | armv7 | ppc64le>
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = "-- -j<cores>" or "-m" on Windows
|
||||
# CMAKE_EXTRA_ARGUMENTS = <args>
|
||||
# REVISION = <revision>
|
||||
|
||||
cd ../core
|
||||
|
||||
./generate_maven_project.sh
|
||||
./generate_td_tools.sh
|
||||
./compile_td.sh
|
||||
./compile_tdjni.sh
|
||||
./build_generated_maven_project.sh
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then
|
||||
while true; do free -h ; sleep 2; done &
|
||||
fi
|
||||
|
||||
source ./travis/setup_variables.sh
|
||||
|
||||
cd ./scripts/
|
||||
./generate_maven_project.sh
|
||||
./generate_td_tools.sh
|
||||
./compile_td.sh
|
||||
./compile_tdjni.sh
|
||||
./build_generated_maven_project.sh
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
@ -1,11 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
source ./travis/setup_variables.sh
|
||||
|
||||
cd ./scripts/
|
||||
|
||||
./deploy_snapshot.sh
|
||||
|
||||
echo "Build success"
|
||||
exit 0
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
source ./travis/setup_variables.sh
|
||||
|
||||
cd ./scripts/
|
||||
|
||||
git config user.email \"jenkins@mchv.eu\"
|
||||
git config user.name \"Jenkins\"
|
||||
|
||||
./deploy_release.sh
|
||||
|
||||
echo "Build success"
|
||||
exit 0
|
@ -1,64 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
# ====== Setup environment variables
|
||||
source ./travis/setup_variables.sh
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
echo "==Linux===="
|
||||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
echo "==OSX======"
|
||||
export PYTHON=36
|
||||
brew install swig;
|
||||
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci;
|
||||
source ./macports-ci install;
|
||||
yes | sudo port install python$PYTHON;
|
||||
yes | sudo port install py$PYTHON-pip;
|
||||
sudo port select --set python3 python$PYTHON;
|
||||
sudo port select --set pip pip$PYTHON;
|
||||
pip install pyinstaller --user;
|
||||
export PATH=$PATH:$(python3 -c "import site; print(site.USER_BASE)")/bin;
|
||||
brew install gperf openssl coreutils
|
||||
|
||||
# Precompile .tlo files because of a bug in travis/macOs
|
||||
cd ./implementations/tdlight/td/generate/tl-parser/
|
||||
echo "Configuring tl-parser"
|
||||
./configure
|
||||
echo "Compiling tl-parser"
|
||||
make
|
||||
cd ..
|
||||
echo "Running tl-parser on mtproto_api"
|
||||
./tl-parser/bin/tl-parser -v -e scheme/mtproto_api.tlo scheme/mtproto_api.tl
|
||||
echo "Running tl-parser on secret_api"
|
||||
./tl-parser/bin/tl-parser -v -e scheme/secret_api.tlo scheme/secret_api.tl
|
||||
echo "Running tl-parser on telegram_api"
|
||||
./tl-parser/bin/tl-parser -v -e scheme/telegram_api.tlo scheme/telegram_api.tl
|
||||
echo "Running tl-parser on td_api"
|
||||
./tl-parser/bin/tl-parser -v -e scheme/td_api.tlo scheme/td_api.tl
|
||||
echo "Done .tlo"
|
||||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
echo "==Windows=="
|
||||
choco install ccache
|
||||
choco install make
|
||||
choco install windows-sdk-10.1
|
||||
choco install visualstudio2019buildtools --version=16.7.0.0 --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
|
||||
choco install openjdk11 --version=11.0.8.10
|
||||
choco install maven --version=3.6.3
|
||||
choco install base64
|
||||
choco install gperf
|
||||
choco install strawberryperl
|
||||
choco install nasm
|
||||
choco install php --version=7.4.9 --package-parameters='"/ThreadSafe ""/InstallDir:C:\PHP"""'
|
||||
choco install python3 --params "/InstallDir:C:\Python3"
|
||||
|
||||
[ -d ./windowsenv/ ] && $(yes | rm -rf ./windowsenv/)
|
||||
[ -d $VCPKG_DIR ] && $(yes | rm -rf $VCPKG_DIR)
|
||||
git clone --depth=1 https://github.com/tdlight-team/windows-amd64-prebuilt-libraries.git windowsenv
|
||||
mv windowsenv/vcpkg $VCPKG_DIR
|
||||
cd $VCPKG_DIR
|
||||
./vcpkg integrate install
|
||||
else
|
||||
echo "Unrecognized os: $TRAVIS_OS_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -1,85 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
|
||||
# ====== Variables
|
||||
export REVISION=$TRAVIS_BUILD_NUMBER
|
||||
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" = "arm64" ]; then
|
||||
export CPU_ARCHITECTURE_NAME="aarch64"
|
||||
export CPU_CORES_NUM="2"
|
||||
else
|
||||
CPU_ARCHITECTURE_NAME="$(tr '[:upper:]' '[:lower:]'<<<"${TRAVIS_CPU_ARCH}")"
|
||||
export CPU_ARCHITECTURE_NAME;
|
||||
export CPU_CORES_NUM="2"
|
||||
fi
|
||||
OPERATING_SYSTEM_NAME="$(tr '[:upper:]' '[:lower:]'<<<"${TRAVIS_OS_NAME}")"
|
||||
export OPERATING_SYSTEM_NAME
|
||||
if [ "$OPERATING_SYSTEM_NAME" = "windows" ]; then
|
||||
export OPERATING_SYSTEM_NAME_SHORT="win"
|
||||
else
|
||||
export OPERATING_SYSTEM_NAME_SHORT=$OPERATING_SYSTEM_NAME
|
||||
fi
|
||||
|
||||
echo "====== Setup variables ======"
|
||||
echo "Current root directory:"
|
||||
echo "$(realpath .)"
|
||||
echo "============================="
|
||||
|
||||
# ====== OS Variables
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
export VCPKG_DIR="$(realpath .)/vcpkg"
|
||||
export CMAKE_EXTRA_ARGUMENTS="-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON"
|
||||
export PATH="/c/Python3:$PATH:/c/tools/php74:/c/PHP:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/bin:/c/Program Files/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools:/c/Program Files/NASM"
|
||||
export JAVA_HOME="/c/Program Files/OpenJDK/openjdk-11.0.8_10"
|
||||
export CPU_CORES=" -- -m"
|
||||
export CMAKE_BUILD_TYPE=Release
|
||||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
|
||||
export PATH="$PATH:$(/usr/libexec/java_home -v 14)"
|
||||
export JAVA_HOME="$(/usr/libexec/java_home -v 14)"
|
||||
export JAVA_INCLUDE_PATH="$(/usr/libexec/java_home -v 14)/include"
|
||||
export CPU_CORES=" -- -j${CPU_CORES_NUM}"
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
if [[ "$CPU_ARCHITECTURE_NAME" = "aarch64" ]]; then
|
||||
export CMAKE_EXTRA_ARGUMENTS=""
|
||||
export CXXFLAGS="-static-libgcc -static-libstdc++"
|
||||
else
|
||||
export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_USE_STATIC_LIBS=ON -DCMAKE_FIND_LIBRARY_SUFFIXES=\".a\""
|
||||
export CXXFLAGS="-static-libgcc -static-libstdc++"
|
||||
fi
|
||||
export TRAVIS_CPU_ARCH_JAVA="$(tr '[:upper:]' '[:lower:]'<<<"${TRAVIS_CPU_ARCH}")"
|
||||
export PATH="$PATH:/usr/lib/jvm/java-11-openjdk-$TRAVIS_CPU_ARCH_JAVA/bin"
|
||||
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$TRAVIS_CPU_ARCH_JAVA"
|
||||
export JAVA_INCLUDE_PATH="/usr/lib/jvm/java-11-openjdk-$TRAVIS_CPU_ARCH_JAVA/include"
|
||||
export CPU_CORES=" -- -j${CPU_CORES_NUM}"
|
||||
export CC="/usr/bin/clang-10"
|
||||
export CXX="/usr/bin/clang++-10"
|
||||
fi
|
||||
|
||||
# ====== Print variables
|
||||
echo "REVISION=${REVISION}"
|
||||
echo "TD_SRC_DIR=${TD_SRC_DIR}"
|
||||
echo "TD_BIN_DIR=${TD_BIN_DIR}"
|
||||
echo "TDNATIVES_BIN_DIR=${TDNATIVES_BIN_DIR}"
|
||||
echo "TDNATIVES_CPP_SRC_DIR=${TDNATIVES_CPP_SRC_DIR}"
|
||||
echo "TDNATIVES_DOCS_BIN_DIR=${TDNATIVES_DOCS_BIN_DIR}"
|
||||
echo "TD_BUILD_DIR=${TD_BUILD_DIR}"
|
||||
echo "TDNATIVES_CPP_BUILD_DIR=${TDNATIVES_CPP_BUILD_DIR}"
|
||||
echo "JAVA_SRC_DIR=${JAVA_SRC_DIR}"
|
||||
echo "TDLIB_SERIALIZER_DIR=${TDLIB_SERIALIZER_DIR}"
|
||||
echo "PATH=${PATH}"
|
||||
echo "JAVA_HOME=${JAVA_HOME}"
|
||||
echo "JAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH}"
|
||||
echo "CMAKE_EXTRA_ARGUMENTS=${CMAKE_EXTRA_ARGUMENTS}"
|
||||
echo "VCPKG_DIR=${VCPKG_DIR}"
|
||||
echo "MAVEN_OPTS=${MAVEN_OPTS}"
|
||||
echo "TRAVIS_CPU_ARCH=${TRAVIS_CPU_ARCH}"
|
||||
echo "TRAVIS_CPU_ARCH_JAVA=${TRAVIS_CPU_ARCH_JAVA}"
|
||||
echo "CPU_ARCHITECTURE_NAME=${CPU_ARCHITECTURE_NAME}"
|
||||
echo "CPU_CORES_NUM=${CPU_CORES_NUM}"
|
||||
echo "CPU_CORES=${CPU_CORES}"
|
||||
echo "TRAVIS_OS_NAME=${TRAVIS_OS_NAME}"
|
||||
echo "OPERATING_SYSTEM_NAME=${OPERATING_SYSTEM_NAME}"
|
||||
echo "OPERATING_SYSTEM_NAME_SHORT=${OPERATING_SYSTEM_NAME}"
|
||||
echo "SRC_TDJNI_LIBNAME=${SRC_TDJNI_LIBNAME}"
|
||||
echo "DEST_TDJNI_LIBNAME=${DEST_TDJNI_LIBNAME}"
|
Loading…
Reference in New Issue
Block a user