-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
59 lines (48 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu:jammy
ENV DEBIAN_FRONTEND noninteractive
ARG BRANCH_NAME
RUN \
apt-get update && \
apt-get -y upgrade
RUN \
apt-get -y --no-install-recommends install \
build-essential \
ca-certificates \
cmake \
curl \
git \
libc6-dbg \
libgtest-dev \
linux-libc-dev \
ninja-build \
pkg-config \
python3 \
tar \
unzip \
vim \
wget \
zip
# Download Android NDK
RUN \
wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip && \
unzip android-ndk-r25c-linux.zip && \
rm -rf android-ndk-r25c-linux.zip
ENV ANDROID_NDK_HOME /android-ndk-r25c
ENV VCPKG_FORCE_SYSTEM_BINARIES 1
# This is needed by OpenSSL because for some reason it uses PATH to find the Android NDK compilers (and obviously
# this will only work for linux-x86_64 images).
ENV ANDROID_NDK_ROOT $ANDROID_NDK_HOME
ENV PATH $ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
# Clone your repository
RUN git clone https://github.com/hashgraph/hedera-protobufs-cpp.git
# Change working directory to cloned repo
WORKDIR /hedera-protobufs-cpp
# Change to working branch
RUN git checkout origin/$BRANCH_NAME
# Update submodule
RUN git submodule update --init
# Build
RUN cmake --preset android-arm64-release
RUN cmake --preset android-arm64-debug
RUN cmake --build --preset android-arm64-release
RUN cmake --build --preset android-arm64-debug