Skip to content

Commit 149a958

Browse files
authored
NDK 21 (#133)
NDK 21
1 parent 1cda241 commit 149a958

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
path: react-native
3333

3434
- name: Build React Native
35-
run: docker run --rm -v "${GITHUB_WORKSPACE}/scripts/":/scripts -v "${GITHUB_WORKSPACE}/react-native/":/react-native -w /react-native $IMAGE_TAG /bin/sh -c "/scripts/test-react-native-setup.sh"
35+
run: docker run --rm --ulimit nofile=10240 -v "${GITHUB_WORKSPACE}/scripts/":/scripts -v "${GITHUB_WORKSPACE}/react-native/":/react-native -w /react-native $IMAGE_TAG /bin/sh -c "/scripts/test-react-native-setup.sh"

Dockerfile

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ ENV DEBIAN_FRONTEND=noninteractive
77
# set default build arguments
88
ARG SDK_VERSION=commandlinetools-linux-7302050_latest.zip
99
ARG ANDROID_BUILD_VERSION=30
10-
ARG ANDROID_TOOLS_VERSION=30.0.3
10+
ARG ANDROID_TOOLS_VERSION=30.0.2
1111
ARG BUCK_VERSION=2020.10.21.01
12-
ARG NDK_VERSION=20.1.5948944
12+
ARG NDK_VERSION=21.4.7075529
1313
ARG NODE_VERSION=14.x
1414
ARG WATCHMAN_VERSION=4.9.0
1515

1616
# set default environment variables
1717
ENV ADB_INSTALL_TIMEOUT=10
1818
ENV ANDROID_HOME=/opt/android
19-
ENV ANDROID_SDK_HOME=${ANDROID_HOME}
19+
ENV ANDROID_SDK_ROOT=${ANDROID_HOME}
2020
ENV ANDROID_NDK=${ANDROID_HOME}/ndk/$NDK_VERSION
2121
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
2222

@@ -37,6 +37,7 @@ RUN apt update -qq && apt install -qq -y --no-install-recommends \
3737
make \
3838
openjdk-8-jdk-headless \
3939
openssh-client \
40+
patch \
4041
python3 \
4142
python3-distutils \
4243
rsync \
@@ -64,6 +65,7 @@ RUN curl -sS -L https://github.com/facebook/buck/releases/download/v${BUCK_VERSI
6465

6566
# Full reference at https://dl.google.com/android/repository/repository2-1.xml
6667
# download and unpack android
68+
# workaround buck clang version detection by symlinking
6769
RUN curl -sS https://dl.google.com/android/repository/${SDK_VERSION} -o /tmp/sdk.zip \
6870
&& mkdir -p ${ANDROID_HOME}/cmdline-tools \
6971
&& unzip -q -d ${ANDROID_HOME}/cmdline-tools /tmp/sdk.zip \
@@ -77,4 +79,5 @@ RUN curl -sS https://dl.google.com/android/repository/${SDK_VERSION} -o /tmp/sdk
7779
"cmake;3.18.1" \
7880
"system-images;android-21;google_apis;armeabi-v7a" \
7981
"ndk;$NDK_VERSION" \
80-
&& rm -rf ${ANDROID_HOME}/.android
82+
&& rm -rf ${ANDROID_HOME}/.android \
83+
&& ln -s ${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9 ${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8

0 commit comments

Comments
 (0)