diff --git a/.github/workflows/platform_natives.yaml b/.github/workflows/platform_natives.yaml index 71b05c7..57c8260 100644 --- a/.github/workflows/platform_natives.yaml +++ b/.github/workflows/platform_natives.yaml @@ -16,12 +16,14 @@ jobs: - {os: ubuntu-18.04, usedocker: "false", arch: "linux/386", implementation: "tdlib"} - {os: ubuntu-18.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlight"} - {os: ubuntu-18.04, usedocker: "false", arch: "linux/amd64", implementation: "tdlib"} - - {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v6", implementation: "tdlight"} - - {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v6", implementation: "tdlib"} - - {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v7", implementation: "tdlight"} - - {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm/v7", implementation: "tdlib"} + - {os: ubuntu-18.04, usedocker: "false", arch: "linux/armhf", implementation: "tdlight"} + - {os: ubuntu-18.04, usedocker: "false", arch: "linux/armhf", implementation: "tdlib"} - {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm64", implementation: "tdlight"} - {os: ubuntu-18.04, usedocker: "false", arch: "linux/arm64", implementation: "tdlib"} + - {os: ubuntu-18.04, usedocker: "false", arch: "linux/s390x", implementation: "tdlight"} + - {os: ubuntu-18.04, usedocker: "false", arch: "linux/s390x", implementation: "tdlib"} + - {os: ubuntu-18.04, usedocker: "false", arch: "linux/ppc64le", implementation: "tdlight"} + - {os: ubuntu-18.04, usedocker: "false", arch: "linux/ppc64le", implementation: "tdlib"} - {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlight", triplet: "x64-windows-static"} - {os: windows-2019, usedocker: "false", arch: "amd64", implementation: "tdlib", triplet: "x64-windows-static"} - {os: macos-10.15, usedocker: "false", arch: "amd64", implementation: "tdlight"} diff --git a/scripts/continuous-integration/github-workflows/setup-variables.sh b/scripts/continuous-integration/github-workflows/setup-variables.sh index 78236a9..1120343 100644 --- a/scripts/continuous-integration/github-workflows/setup-variables.sh +++ b/scripts/continuous-integration/github-workflows/setup-variables.sh @@ -12,24 +12,22 @@ else export PCRE="r" fi -GH_CPU_ARCH=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^(linux\/|windows\/|macos\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\4/g') +GH_CPU_ARCH=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^(linux\/|windows\/|macos\/)?(386|amd64|arm64|ppc64le|armhf|s390x)$/\2/g') export GH_CPU_ARCH -GH_OS_NAME=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^((linux)\/|(windows)\/|(macos)\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\3\4/g') -export GH_OS_NAME - -if [[ -z "$GH_OS_NAME" ]]; then - GH_OS_NAME=$(echo "$GH_MATRIX_OS" | sed -$PCRE 's/^([^-]+).*$/\1/g') - export GH_OS_NAME +GH_OS_NAME=$(echo "$GH_MATRIX_OS" | sed -$PCRE 's/^(linux|ubuntu|windows|macos).*$/\1/g') +if [[ $GH_OS_NAME == "ubuntu" ]]; then + GH_OS_NAME="linux" fi +export GH_OS_NAME if [[ "$GH_CPU_ARCH" == "arm64" ]]; then export CPU_ARCHITECTURE_NAME="aarch64" export CPU_CORES_NUM="2" -elif [[ "$GH_CPU_ARCH" == "armv6" ]]; then - export CPU_ARCHITECTURE_NAME="armv6" +elif [[ "$GH_CPU_ARCH" == "armhf" ]]; then + export CPU_ARCHITECTURE_NAME="armhf" export CPU_CORES_NUM="2" -elif [[ "$GH_CPU_ARCH" == "armv7" ]]; then - export CPU_ARCHITECTURE_NAME="armv7" +elif [[ "$GH_CPU_ARCH" == "s390x" ]]; then + export CPU_ARCHITECTURE_NAME="s390x" export CPU_CORES_NUM="2" elif [[ "$GH_CPU_ARCH" == "386" ]]; then export CPU_ARCHITECTURE_NAME="386" diff --git a/scripts/core/compile_td.sh b/scripts/core/compile_td.sh index 10a65fd..8dbb870 100755 --- a/scripts/core/compile_td.sh +++ b/scripts/core/compile_td.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # BUILD_TYPE = # CPU_CORES = "-- -j" or "-m" on Windows diff --git a/scripts/core/compile_tdjni.sh b/scripts/core/compile_tdjni.sh index 15ed1c9..1539550 100755 --- a/scripts/core/compile_tdjni.sh +++ b/scripts/core/compile_tdjni.sh @@ -2,7 +2,7 @@ # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = # OPERATING_SYSTEM_NAME_SHORT = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # BUILD_TYPE = # CPU_CORES = "-- -j" or "-m" on Windows diff --git a/scripts/core/configure_td.sh b/scripts/core/configure_td.sh index e29754c..080c269 100755 --- a/scripts/core/configure_td.sh +++ b/scripts/core/configure_td.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # BUILD_TYPE = # CPU_CORES = "-- -j" or "-m" on Windows diff --git a/scripts/core/generate_maven_project.sh b/scripts/core/generate_maven_project.sh index b22ca24..0915dbe 100755 --- a/scripts/core/generate_maven_project.sh +++ b/scripts/core/generate_maven_project.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # Check variables correctness diff --git a/scripts/core/generate_td_tools.sh b/scripts/core/generate_td_tools.sh index 4eb0626..503fcb1 100755 --- a/scripts/core/generate_td_tools.sh +++ b/scripts/core/generate_td_tools.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # CPU_CORES = "-- -j" or "-m" on Windows # OTHER REQUIRED ENVIRONMENT VARIABLES: diff --git a/scripts/core/generate_tdapi_java_file.sh b/scripts/core/generate_tdapi_java_file.sh index 106cfb8..3a425a0 100755 --- a/scripts/core/generate_tdapi_java_file.sh +++ b/scripts/core/generate_tdapi_java_file.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # CPU_CORES = "-- -j" or "-m" on Windows # OTHER REQUIRED ENVIRONMENT VARIABLES: diff --git a/scripts/core/generate_tdapi_maven_project.sh b/scripts/core/generate_tdapi_maven_project.sh index ce630fe..8c96f66 100755 --- a/scripts/core/generate_tdapi_maven_project.sh +++ b/scripts/core/generate_tdapi_maven_project.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # Check variables correctness diff --git a/scripts/core/install-dependencies.sh b/scripts/core/install-dependencies.sh index a77a256..27d63ad 100755 --- a/scripts/core/install-dependencies.sh +++ b/scripts/core/install-dependencies.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # IMPLEMENTATION_NAME = # BUILD_TYPE = # CPU_CORES = "-- -j" or "-m" on Windows @@ -145,19 +145,19 @@ deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bioni cd "$ROOT_DIR" { echo "set(CMAKE_SYSTEM_PROCESSOR ${CPU_ARCH_CMAKE})"; - echo "set(CMAKE_C_COMPILER ${CPU_ARCH_CMAKE}-linux-gnu-gcc)"; + echo "set(CMAKE_C_COMPILER ${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-gcc)"; echo "set(CMAKE_C_COMPILER_TARGET ${CLANG_TRIPLE})"; - echo "set(CMAKE_CXX_COMPILER ${CPU_ARCH_CMAKE}-linux-gnu-g++)"; + echo "set(CMAKE_CXX_COMPILER ${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-g++)"; echo "set(CMAKE_CXX_COMPILER_TARGET ${CLANG_TRIPLE})"; - echo "set(CMAKE_ASM_COMPILER ${CPU_ARCH_CMAKE}-linux-gnu-g++)"; + echo "set(CMAKE_ASM_COMPILER ${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}-g++)"; echo "set(CMAKE_ASM_COMPILER_TARGET ${CLANG_TRIPLE})"; echo "set(CMAKE_LIBRARY_PATH \"$CROSS_BUILD_DEPS_DIR/\")"; #echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}\")"; #echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/\")"; - echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-gnu/\")"; + echo "include_directories(\"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}/\")"; echo "include_directories(\"${CROSS_OPENJDK_PATH}/include\")"; echo "include_directories(\"${CROSS_OPENJDK_PATH}/include/linux\")"; - #echo "set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES \"$CROSS_BUILD_DEPS_DIR/usr/include/\" \"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-gnu/\")"; + #echo "set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES \"$CROSS_BUILD_DEPS_DIR/usr/include/\" \"${CROSS_BUILD_DEPS_DIR}/usr/include/${CPU_ARCH_CMAKE}-linux-${CPU_COMPILATION_TOOL}/\")"; echo "SET(CMAKE_FIND_ROOT_PATH \"$CROSS_BUILD_DEPS_DIR\" \"$JAVA_HOME\")"; #echo "SET(JAVA_HOME \"$CROSS_OPENJDK_PATH\")"; @@ -183,7 +183,7 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) EOF - if [[ ${CPU_ARCHITECTURE_NAME} == "aarch64" || ${CPU_ARCHITECTURE_NAME} == "armv6" || ${CPU_ARCHITECTURE_NAME} == "armv7" ]]; then + if [[ ${CPU_ARCHITECTURE_NAME} == "aarch64" || ${CPU_ARCHITECTURE_NAME} == "armhf" ]]; then cat < -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # OPERATING_SYSTEM_NAME_SHORT = # IMPLEMENTATION_NAME = # CPU_CORES = "-- -j" or "-m" on Windows diff --git a/scripts/utils/compile-tdapi-package.sh b/scripts/utils/compile-tdapi-package.sh index 78bf85b..4d04983 100755 --- a/scripts/utils/compile-tdapi-package.sh +++ b/scripts/utils/compile-tdapi-package.sh @@ -4,7 +4,7 @@ # # MAIN REQUIRED ENVIRONMENT VARIABLES: # OPERATING_SYSTEM_NAME = -# CPU_ARCHITECTURE_NAME = +# CPU_ARCHITECTURE_NAME = # OPERATING_SYSTEM_NAME_SHORT = # IMPLEMENTATION_NAME = # CPU_CORES = "-- -j" or "-m" on Windows diff --git a/src/main/replacements/replace-linux-armv6-tdlib.sed b/src/main/replacements/replace-linux-armhf-tdlib.sed similarity index 75% rename from src/main/replacements/replace-linux-armv6-tdlib.sed rename to src/main/replacements/replace-linux-armhf-tdlib.sed index 03b908e..0e8b7eb 100644 --- a/src/main/replacements/replace-linux-armv6-tdlib.sed +++ b/src/main/replacements/replace-linux-armhf-tdlib.sed @@ -1,4 +1,4 @@ s/${OPERATING_SYSTEM_NAME}/linux/ s/${OPERATING_SYSTEM_NAME_SHORT}/linux/ -s/${CPU_ARCHITECTURE_NAME}/armv6/ +s/${CPU_ARCHITECTURE_NAME}/armhf/ s/${IMPLEMENTATION_NAME}/tdlib/ diff --git a/src/main/replacements/replace-linux-armv6-tdlight.sed b/src/main/replacements/replace-linux-armhf-tdlight.sed similarity index 76% rename from src/main/replacements/replace-linux-armv6-tdlight.sed rename to src/main/replacements/replace-linux-armhf-tdlight.sed index 3b2ce60..12f9585 100644 --- a/src/main/replacements/replace-linux-armv6-tdlight.sed +++ b/src/main/replacements/replace-linux-armhf-tdlight.sed @@ -1,4 +1,4 @@ s/${OPERATING_SYSTEM_NAME}/linux/ s/${OPERATING_SYSTEM_NAME_SHORT}/linux/ -s/${CPU_ARCHITECTURE_NAME}/armv6/ +s/${CPU_ARCHITECTURE_NAME}/armhf/ s/${IMPLEMENTATION_NAME}/tdlight/ diff --git a/src/main/replacements/replace-linux-armv7-tdlib.sed b/src/main/replacements/replace-linux-s390x-tdlib.sed similarity index 75% rename from src/main/replacements/replace-linux-armv7-tdlib.sed rename to src/main/replacements/replace-linux-s390x-tdlib.sed index 9629705..a7b0ad1 100644 --- a/src/main/replacements/replace-linux-armv7-tdlib.sed +++ b/src/main/replacements/replace-linux-s390x-tdlib.sed @@ -1,4 +1,4 @@ s/${OPERATING_SYSTEM_NAME}/linux/ s/${OPERATING_SYSTEM_NAME_SHORT}/linux/ -s/${CPU_ARCHITECTURE_NAME}/armv7/ +s/${CPU_ARCHITECTURE_NAME}/s390x/ s/${IMPLEMENTATION_NAME}/tdlib/ diff --git a/src/main/replacements/replace-linux-armv7-tdlight.sed b/src/main/replacements/replace-linux-s390x-tdlight.sed similarity index 76% rename from src/main/replacements/replace-linux-armv7-tdlight.sed rename to src/main/replacements/replace-linux-s390x-tdlight.sed index 20d59ff..80a8e9f 100644 --- a/src/main/replacements/replace-linux-armv7-tdlight.sed +++ b/src/main/replacements/replace-linux-s390x-tdlight.sed @@ -1,4 +1,4 @@ s/${OPERATING_SYSTEM_NAME}/linux/ s/${OPERATING_SYSTEM_NAME_SHORT}/linux/ -s/${CPU_ARCHITECTURE_NAME}/armv7/ +s/${CPU_ARCHITECTURE_NAME}/s390x/ s/${IMPLEMENTATION_NAME}/tdlight/