Rewrite build system

This commit is contained in:
Andrea Cavalli 2023-08-29 13:46:14 +02:00
parent 537b8988ea
commit 58cc508056
3 changed files with 87 additions and 108 deletions

View File

@ -13,18 +13,18 @@ jobs:
strategy:
matrix:
include:
- { os: ubuntu-22.04, type: "linux_amd64_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "amd64", tripleArch: "x86_64", tripleGnu: "gnu", debianVersion: "buster-backports" }
- { os: ubuntu-22.04, type: "linux_amd64_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "amd64", tripleArch: "x86_64", tripleGnu: "gnu", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_amd64_clang_ssl3", compiler: "clang", ssl: "ssl3", debianArch: "amd64", tripleArch: "x86_64", tripleGnu: "gnu", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_i386_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "i386", tripleArch: "i386", tripleGnu: "gnu", debianVersion: "buster-backports" }
- { os: ubuntu-22.04, type: "linux_i386_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "i386", tripleArch: "i386", tripleGnu: "gnu", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_ppc64el_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "ppc64el", tripleArch: "powerpc64le", tripleGnu: "gnu", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_riscv64_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "riscv64", tripleArch: "riscv64", tripleGnu: "gnu", debianVersion: "sid" }
- { os: ubuntu-22.04, type: "linux_armhf_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "armhf", tripleArch: "arm", tripleGnu: "gnueabihf", debianVersion: "buster-backports" }
- { os: ubuntu-22.04, type: "linux_armhf_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "armhf", tripleArch: "arm", tripleGnu: "gnueabihf", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_arm64_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "arm64", tripleArch: "aarch64", tripleGnu: "gnu", debianVersion: "buster-backports" }
- { os: ubuntu-22.04, type: "linux_arm64_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "arm64", tripleArch: "aarch64", tripleGnu: "gnu", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_arm64_clang_ssl3", compiler: "clang", ssl: "ssl3", debianArch: "arm64", tripleArch: "aarch64", tripleGnu: "gnu", debianVersion: "bookworm-backports" }
- { os: ubuntu-22.04, type: "linux_amd64_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "amd64", tripleArch: "x86_64", tripleGnu: "gnu", debianVersion: "buster-backports", native: "true" }
- { os: ubuntu-22.04, type: "linux_amd64_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "amd64", tripleArch: "x86_64", tripleGnu: "gnu", debianVersion: "bookworm-backports", native: "true" }
- { os: ubuntu-22.04, type: "linux_amd64_clang_ssl3", compiler: "clang", ssl: "ssl3", debianArch: "amd64", tripleArch: "x86_64", tripleGnu: "gnu", debianVersion: "bookworm-backports", native: "true" }
- { os: ubuntu-22.04, type: "linux_i386_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "i386", tripleArch: "i386", tripleGnu: "gnu", debianVersion: "buster-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_i386_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "i386", tripleArch: "i386", tripleGnu: "gnu", debianVersion: "bookworm-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_ppc64el_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "ppc64el", tripleArch: "powerpc64le", tripleGnu: "gnu", debianVersion: "bookworm-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_riscv64_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "riscv64", tripleArch: "riscv64", tripleGnu: "gnu", debianVersion: "sid", native: "false" }
- { os: ubuntu-22.04, type: "linux_armhf_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "armhf", tripleArch: "arm", tripleGnu: "gnueabihf", debianVersion: "buster-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_armhf_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "armhf", tripleArch: "arm", tripleGnu: "gnueabihf", debianVersion: "bookworm-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_arm64_gnu_ssl1", compiler: "gnu", ssl: "ssl1", debianArch: "arm64", tripleArch: "aarch64", tripleGnu: "gnu", debianVersion: "buster-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_arm64_gnu_ssl3", compiler: "gnu", ssl: "ssl3", debianArch: "arm64", tripleArch: "aarch64", tripleGnu: "gnu", debianVersion: "bookworm-backports", native: "false" }
- { os: ubuntu-22.04, type: "linux_arm64_clang_ssl3", compiler: "clang", ssl: "ssl3", debianArch: "arm64", tripleArch: "aarch64", tripleGnu: "gnu", debianVersion: "bookworm-backports", native: "false" }
- { os: windows-2019, type: "windows_amd64", vcpkgCommitId: "6ca56aeb457f033d344a7106cb3f9f1abf8f4e98", triplet: "x64-windows-static" }
- { os: macos-12, type: "macos_amd64" }
# todo: do not enable until github actions adds support to apple silicon, accepting PRs
@ -59,6 +59,7 @@ jobs:
DEBIAN_ARCH=${{ matrix.debianArch }}
TRIPLE_ARCH=${{ matrix.tripleArch }}
TRIPLE_GNU=${{ matrix.tripleGnu }}
NATIVE=${{ matrix.native }}
DEBIAN_VERSION=${{ matrix.debianVersion }}
REVISION=4.0.${{ github.run_number }}
@ -75,6 +76,7 @@ jobs:
echo "DEBIAN_ARCH=$DEBIAN_ARCH" >> $GITHUB_ENV
echo "TRIPLE_ARCH=$TRIPLE_ARCH" >> $GITHUB_ENV
echo "TRIPLE_GNU=$TRIPLE_GNU" >> $GITHUB_ENV
echo "NATIVE=$NATIVE" >> $GITHUB_ENV
echo "DEBIAN_VERSION=$DEBIAN_VERSION" >> $GITHUB_ENV
echo "REVISION=$REVISION" >> $GITHUB_ENV
echo "GH_MATRIX_OS=$GH_MATRIX_OS" >> $GITHUB_ENV
@ -226,6 +228,7 @@ jobs:
ARCH_DEBIAN=${{env.DEBIAN_ARCH}}
ARCH_TRIPLE=${{env.TRIPLE_ARCH}}
TRIPLE_GNU=${{env.TRIPLE_GNU}}
NATIVE=${{env.NATIVE}}
DEBIAN_VERSION=${{env.DEBIAN_VERSION}}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@ -9,6 +9,7 @@ ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
# gnu, gnueabihf (armhf)
ARG TRIPLE_GNU
ARG NATIVE=false
ARG SCCACHE_GHA_ENABLED=off
ARG ACTIONS_CACHE_URL
ARG ACTIONS_RUNTIME_TOKEN
@ -31,24 +32,34 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
dpkg --add-architecture ${ARCH_DEBIAN}
apt-get --assume-yes update
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install --no-install-recommends openjdk-11-jdk-headless
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl1.1:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-11-jre-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-11-jdk-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/SymlinkPrefix.javash "/root/cross-build-pkgs/" "/" "./"
if [[ "$NATIVE" != "true" ]]; then
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl1.1:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-11-jre-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-11-jdk-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/SymlinkPrefix.javash "/root/cross-build-pkgs/" "/" "./"
fi
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install --no-install-recommends \
g++-8 gcc-8 zlib1g-dev libssl-dev gperf \
tree git maven php-cli php-readline make cmake \
tree git maven php-cli php-readline make cmake
if [[ "$NATIVE" != "true" ]]; then
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install --no-install-recommends \
g++-8-${ARCH_TRIPLE/_/-}-linux-${TRIPLE_GNU} gcc-8-${ARCH_TRIPLE/_/-}-linux-${TRIPLE_GNU} \
libatomic1-${ARCH_DEBIAN}-cross libc6-dev-${ARCH_DEBIAN}-cross libgcc-8-dev-${ARCH_DEBIAN}-cross libstdc++-8-dev-${ARCH_DEBIAN}-cross
fi
EOF
FROM ssl1_debian AS build
SHELL ["/bin/bash", "-exc"]
ARG REVISION="1.0.0.0-SNAPSHOT"
ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
ARG TRIPLE_GNU
ARG NATIVE=false
ARG SCCACHE_GHA_ENABLED=off
ARG ACTIONS_CACHE_URL
ARG ACTIONS_RUNTIME_TOKEN
@ -161,6 +172,12 @@ RUN --mount=type=cache,target=/opt/sccache,sharing=locked \
cd implementations/tdlight/build
export INSTALL_PREFIX="$(readlink -e ./td_bin/)"
export INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
export TOOLCHAIN_ARG
if [[ "$NATIVE" != "true" ]]; then
TOOLCHAIN_ARG=""
else
TOOLCHAIN_ARG="-DCMAKE_TOOLCHAIN_FILE=\"../../../${TOOLCHAIN_FILE}\""
fi
cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release \
@ -171,11 +188,17 @@ cmake \
-DTD_ENABLE_JNI=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \
-DCMAKE_TOOLCHAIN_FILE="../../../${TOOLCHAIN_FILE}" ..
$TOOLCHAIN_ARG ..
cmake --build . --target install --config Release --parallel "$(nproc)"
cd ../../../
cd natives/build
export TOOLCHAIN_ARG
if [[ "$NATIVE" != "true" ]]; then
TOOLCHAIN_ARG=""
else
TOOLCHAIN_ARG="-DCMAKE_TOOLCHAIN_FILE=\"../../${TOOLCHAIN_FILE}\""
fi
cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release \
@ -189,7 +212,7 @@ cmake \
-DTd_DIR:PATH="$(readlink -e ../../implementations/tdlight/build/td_bin/lib/cmake/Td)" \
-DJAVA_SRC_DIR="$(readlink -e ../src/main/java)" \
-DTDNATIVES_CPP_SRC_DIR="$(readlink -e ../src/main/cpp)" \
-DCMAKE_TOOLCHAIN_FILE="../../${TOOLCHAIN_FILE}" \
$TOOLCHAIN_ARG \
../src/main/cpp
cmake --build . --target install --config Release --parallel "$(nproc)"
cd ..
@ -209,6 +232,7 @@ ARG REVISION="1.0.0.0-SNAPSHOT"
ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
ARG TRIPLE_GNU
ARG NATIVE=off
WORKDIR /out
COPY --from=build /build/natives natives
COPY --from=build /build/natives/src/main/resources/META-INF/tdlightjni/libtdjni.linux_${ARCH_DEBIAN}_gnu_ssl1.so libtdjni.so

View File

@ -11,6 +11,7 @@ ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
# gnu, gnueabihf (armhf)
ARG TRIPLE_GNU
ARG NATIVE=false
ARG SCCACHE_GHA_ENABLED=off
ARG ACTIONS_CACHE_URL
ARG ACTIONS_RUNTIME_TOKEN
@ -33,24 +34,34 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
dpkg --add-architecture ${ARCH_DEBIAN}
apt-get --assume-yes update
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install --no-install-recommends openjdk-17-jdk-headless
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl3:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-17-jre-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-17-jdk-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/SymlinkPrefix.javash "/root/cross-build-pkgs/" "/" "./"
if [[ "$NATIVE" != "true" ]]; then
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp libssl3:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g-dev:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp zlib1g:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-17-jre-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/downloadthis.sh /var/cache/apt/downloaded_tmp openjdk-17-jdk-headless:${ARCH_DEBIAN} /root/cross-build-pkgs/
./.docker/SymlinkPrefix.javash "/root/cross-build-pkgs/" "/" "./"
fi
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install --no-install-recommends \
g++-12 gcc-12 zlib1g-dev libssl-dev gperf \
tree git maven php-cli php-readline make cmake \
tree git maven php-cli php-readline make cmake
if [[ "$NATIVE" != "true" ]]; then
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install --no-install-recommends \
g++-12-${ARCH_TRIPLE/_/-}-linux-${TRIPLE_GNU} gcc-12-${ARCH_TRIPLE/_/-}-linux-${TRIPLE_GNU} \
libatomic1-${ARCH_DEBIAN}-cross libc6-dev-${ARCH_DEBIAN}-cross libgcc-12-dev-${ARCH_DEBIAN}-cross libstdc++-12-dev-${ARCH_DEBIAN}-cross
fi
EOF
FROM ssl3_debian AS build
SHELL ["/bin/bash", "-exc"]
ARG REVISION="1.0.0.0-SNAPSHOT"
ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
ARG TRIPLE_GNU
ARG NATIVE=false
ARG SCCACHE_GHA_ENABLED=off
ARG ACTIONS_CACHE_URL
ARG ACTIONS_RUNTIME_TOKEN
@ -161,6 +172,12 @@ RUN --mount=type=cache,target=/opt/sccache,sharing=locked \
cd implementations/tdlight/build
export INSTALL_PREFIX="$(readlink -e ./td_bin/)"
export INSTALL_BINDIR="$(readlink -e ./td_bin/bin)"
export TOOLCHAIN_ARG
if [[ "$NATIVE" != "true" ]]; then
TOOLCHAIN_ARG=""
else
TOOLCHAIN_ARG="-DCMAKE_TOOLCHAIN_FILE=\"../../../${TOOLCHAIN_FILE}\""
fi
cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release \
@ -171,11 +188,17 @@ cmake \
-DTD_ENABLE_JNI=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_BINDIR:PATH="$INSTALL_BINDIR" \
-DCMAKE_TOOLCHAIN_FILE="../../../${TOOLCHAIN_FILE}" ..
$TOOLCHAIN_ARG ..
cmake --build . --target install --config Release --parallel "$(nproc)"
cd ../../../
cd natives/build
export TOOLCHAIN_ARG
if [[ "$NATIVE" != "true" ]]; then
TOOLCHAIN_ARG=""
else
TOOLCHAIN_ARG="-DCMAKE_TOOLCHAIN_FILE=\"../../${TOOLCHAIN_FILE}\""
fi
cmake \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release \
@ -189,7 +212,7 @@ cmake \
-DTd_DIR:PATH="$(readlink -e ../../implementations/tdlight/build/td_bin/lib/cmake/Td)" \
-DJAVA_SRC_DIR="$(readlink -e ../src/main/java)" \
-DTDNATIVES_CPP_SRC_DIR="$(readlink -e ../src/main/cpp)" \
-DCMAKE_TOOLCHAIN_FILE="../../${TOOLCHAIN_FILE}" \
$TOOLCHAIN_ARG \
../src/main/cpp
cmake --build . --target install --config Release --parallel "$(nproc)"
cd ..
@ -198,78 +221,6 @@ mv tdjni_bin/libtdjni.so src/main/resources/META-INF/tdlightjni/libtdjni.linux_$
mvn -B -f pom.xml -Drevision="$REVISION" -Dnative.type.classifier=linux_${ARCH_DEBIAN}_gnu_ssl3 package
EOF
FROM debian:buster-backports AS deploy-release
SHELL ["/bin/bash", "-exc"]
ARG REVISION="1.0.0.0-SNAPSHOT"
ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
ARG TRIPLE_GNU
WORKDIR /source
COPY --from=build /build/natives /source/natives
RUN --mount=type=cache,target=/root/.m2 <<"EOF"
export TYPE=linux_${ARCH_DEBIAN}_gnu_ssl3
mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package
mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \
-DrepositoryId=mchv-release-distribution \
-Dfile=natives/target-$TYPE/tdlight-natives-$REVISION-$TYPE.jar \
-Dpackaging=pom \
-DgroupId=it.tdlight \
-DartifactId=tdlight-natives \
-Dversion=$REVISION \
-Drevision=$REVISION \
-Dclassifier=$TYPE \
-Dnative.type.classifier="$TYPE"
if [[ "$TYPE" == "linux_amd64_ssl1" ]]; then
mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \
-DrepositoryId=mchv-release-distribution \
-Dfile=natives/.ci-friendly-pom.xml \
-Dpackaging=pom \
-DgroupId=it.tdlight \
-DartifactId=tdlight-natives \
-Dversion=$REVISION \
-Drevision=$REVISION \
-Dnative.type.classifier="$TYPE"
fi
EOF
FROM debian:buster-backports AS deploy-snapshot
SHELL ["/bin/bash", "-exc"]
ARG REVISION="1.0.0.0-SNAPSHOT"
ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
ARG TRIPLE_GNU
WORKDIR /source
COPY --from=build /build/natives /source/natives
RUN --mount=type=cache,target=/root/.m2 <<"EOF"
export TYPE=linux_${ARCH_DEBIAN}_gnu_ssl3
mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package
mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \
-DrepositoryId=mchv-snapshot-distribution \
-Dfile=natives/target-$TYPE/tdlight-natives-$REVISION-$TYPE.jar \
-Dpackaging=pom \
-DgroupId=it.tdlight \
-DartifactId=tdlight-natives \
-Dversion=$REVISION \
-Drevision=$REVISION \
-Dclassifier=$TYPE \
-Dnative.type.classifier="$TYPE"
if [[ "$TYPE" == "linux_amd64_ssl1" ]]; then
mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv-snapshot \
-DrepositoryId=mchv-snapshot-distribution \
-Dfile=natives/.ci-friendly-pom.xml \
-Dpackaging=pom \
-DgroupId=it.tdlight \
-DartifactId=tdlight-natives \
-Dversion=$REVISION \
-Drevision=$REVISION \
-Dnative.type.classifier="$TYPE"
fi
EOF
FROM debian:buster-backports AS maven
SHELL ["/bin/bash", "-exc"]
WORKDIR /source
@ -281,6 +232,7 @@ ARG REVISION="1.0.0.0-SNAPSHOT"
ARG ARCH_DEBIAN
ARG ARCH_TRIPLE
ARG TRIPLE_GNU
ARG NATIVE=off
WORKDIR /out
COPY --from=build /build/natives natives
COPY --from=build /build/natives/src/main/resources/META-INF/tdlightjni/libtdjni.linux_${ARCH_DEBIAN}_gnu_ssl3.so libtdjni.so