Execute script separately

develop
Andrea Cavalli 11 months ago
parent 28d07acf96
commit ff82eae098
  1. 7
      Dockerfile
  2. 14
      scripts/continuous-integration/docker/build-natives.sh

@ -27,12 +27,7 @@ ADD src /usr/src/tdlight-java-natives/src
WORKDIR /usr/src/tdlight-java-natives/
RUN /bin/bash -c "export JAVA_HOME=\"/usr/lib/jvm/$(ls /usr/lib/jvm/ | grep openjdk | head -n 1)/\"; \
export JAVA_INCLUDE_PATH=\"$JAVA_HOME/include\"; \
source ./scripts/continuous-integration/github-workflows/setup-variables.sh; \
sudo apt install -y crossbuild-essential-${CPU_ARCH_DPKG}; \
source ./scripts/continuous-integration/github-workflows/install-dependencies.sh; \
source ./scripts/continuous-integration/github-workflows/build-natives.sh"
RUN /bin/bash /usr/src/tdlight-java-natives/scripts/continuous-integration/docker/build-natives.sh
#WORKDIR /usr/src/tdlight-java-natives/generated/
#RUN echo "aaaa" > test.txt

@ -0,0 +1,14 @@
#!/bin/bash -e
echo "\$PWD=${PWD}"
export JAVA_HOME
JAVA_HOME="/usr/lib/jvm/$(find "/usr/lib/jvm/" -maxdepth 1 -type d -iname "java*jdk*" | head -n 1)/"
export JAVA_INCLUDE_PATH="$JAVA_HOME/include"
source ./scripts/continuous-integration/github-workflows/setup-variables.sh
# Check variables correctness
if [ -z "${CPU_ARCH_DPKG}" ]; then
echo "Missing parameter: CPU_ARCH_DPKG"
exit 1
fi
sudo apt install -y "crossbuild-essential-${CPU_ARCH_DPKG}"
source ./scripts/continuous-integration/github-workflows/install-dependencies.sh
source ./scripts/continuous-integration/github-workflows/build-natives.sh
Loading…
Cancel
Save