From 7f3e0c02e3c56d9e8acfd771af077558d268ebd5 Mon Sep 17 00:00:00 2001 From: Daewoon Kim Date: Fri, 11 Sep 2026 10:39:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(scatterlab-prebuild-android):=20build?= =?UTF-8?q?=20=EC=9E=A1=EC=9D=84=20=EC=83=81=EB=A5=98=20Android=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=95=88=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=8F=8C=EB=A6=B0=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JDK 를 넣고 나니 다음 관문이 나왔다 (run 34551064100): Neither ANDROID_SDK_ROOT nor ANDROID_HOME is set. 러너 이미지에 Android SDK·NDK·CMake 가 없다. 상류는 같은 아티팩트를 `reactnativecommunity/react-native-android:latest` 컨테이너에서 빌드한다 (`publish-npm.yml` 의 `build_android`) — 소스가 전제하는 툴체인이 그것이다. `arc-messenger-dev` 는 dind scale set 이라 잡 컨테이너를 띄울 수 있다. 이미지가 JDK 를 들고 있으므로 `build` 잡의 `actions/setup-java` 는 지운다. `prepare` 잡은 컨테이너 밖이라 그대로 둔다. Co-Authored-By: Claude Opus 5 (1M context) --- .../workflows/scatterlab-prebuild-android.yml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/scatterlab-prebuild-android.yml b/.github/workflows/scatterlab-prebuild-android.yml index c5d722ebfa7..4be20f457dc 100644 --- a/.github/workflows/scatterlab-prebuild-android.yml +++ b/.github/workflows/scatterlab-prebuild-android.yml @@ -119,6 +119,18 @@ jobs: build: needs: prepare runs-on: arc-messenger-dev + # The runner image carries no Android SDK, NDK or CMake, and ReactAndroid needs all + # three. Upstream builds these same artifacts inside this image (`publish-npm.yml`'s + # `build_android`), so it is the toolchain the sources expect. `arc-messenger-dev` is a + # dind scale set, so it can run a job container. + container: + image: reactnativecommunity/react-native-android:latest + env: + TERM: 'dumb' + # Gradle mis-decompresses tar.gz inside containers under some locales. + # https://github.com/gradle/gradle/issues/23391#issuecomment-1878979127 + LC_ALL: C.UTF8 + GRADLE_OPTS: '-Dorg.gradle.daemon=false' permissions: contents: write outputs: @@ -132,14 +144,6 @@ jobs: - uses: ./.github/actions/setup-node - uses: ./.github/actions/yarn-install - # The runner image ships no JDK, and `./gradlew` below needs one. Same version and - # distribution as the `prepare` job so both halves of this workflow build against - # the same toolchain. - - uses: actions/setup-java@v5 - with: - distribution: 'temurin' - java-version: '17' - # Without a warm ccache every run is a full C++ rebuild of ReactCommon. - name: Restore the Android ccache uses: actions/cache/restore@v4 From 1fc158c4bc72b164f406d5fc20f36c2691494209 Mon Sep 17 00:00:00 2001 From: Daewoon Kim Date: Fri, 11 Sep 2026 10:43:56 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(scatterlab-prebuild-android):=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=BB=A8=ED=85=8C=EC=9D=B4=EB=84=88?= =?UTF-8?q?=EB=A5=BC=20digest=EB=A1=9C=20=EA=B3=A0=EC=A0=95=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `:latest` 는 밑에서 움직인다. 이 워크플로가 증명하려는 것이 "AAR 안의 코드가 이 버전이 주장하는 소스와 같다" 인데, 툴체인이 바뀌면 같은 커밋의 두 빌드가 달라져 그 보증이 약해진다. `VERSION_NAME` 이 업스트림 base 로 고정이라 필요한 NDK·CMake 도 고정이다. base 를 올릴 때만 다시 핀한다. 현재 digest 는 `v21.0`(2026-06-19)이고 `:latest` 가 가리키던 것이다. Co-Authored-By: Claude Opus 5 (1M context) --- .github/scatterlab/android-prebuilt.md | 1 + .github/workflows/scatterlab-prebuild-android.yml | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scatterlab/android-prebuilt.md b/.github/scatterlab/android-prebuilt.md index a56ad7d18d9..f6ad17cb57e 100644 --- a/.github/scatterlab/android-prebuilt.md +++ b/.github/scatterlab/android-prebuilt.md @@ -64,6 +64,7 @@ env ORG_GRADLE_PROJECT_react.internal.useHermesStable=true \ - `isSnapshot`을 켜지 않는다. 켜면 버전에 `-SNAPSHOT`이 붙어 좌표가 어긋난다. - ABI는 기본값(`armeabi-v7a,arm64-v8a,x86,x86_64`)을 그대로 둔다. 소비자의 `reactNativeArchitectures`와 같아야 한다. - Debug·Release 두 variant는 `components.default` 멀티 variant 퍼블리시로 한 번에 나온다(`publish.gradle`). +- 빌드는 상류와 같은 `reactnativecommunity/react-native-android` 컨테이너에서 돈다 — 러너 이미지에 Android SDK·NDK·CMake가 없다. **digest로 고정**한다: 툴체인이 밑에서 움직이면 같은 커밋의 두 빌드가 달라지고, 이 워크플로가 증명하려는 것이 바로 그 동일성이다. base가 고정이면 요구 툴체인도 고정이므로 **base를 올릴 때만** 다시 핀한다. - ccache를 러너에 유지한다. 없으면 매 실행이 전체 C++ 재컴파일이다. - 빌드 산출물은 수 GB다. `if: always()`로 정리한다. diff --git a/.github/workflows/scatterlab-prebuild-android.yml b/.github/workflows/scatterlab-prebuild-android.yml index 4be20f457dc..cafc61740c8 100644 --- a/.github/workflows/scatterlab-prebuild-android.yml +++ b/.github/workflows/scatterlab-prebuild-android.yml @@ -123,8 +123,14 @@ jobs: # three. Upstream builds these same artifacts inside this image (`publish-npm.yml`'s # `build_android`), so it is the toolchain the sources expect. `arc-messenger-dev` is a # dind scale set, so it can run a job container. + # + # Pinned by digest, not `:latest`: this workflow exists to prove the AAR was built from + # the sources its version claims, and a toolchain that moves underneath makes two builds + # of the same commit differ. `VERSION_NAME` is pinned to the upstream base, so the NDK + # and CMake this needs are fixed too - re-pin when the base moves, not before. + # sha256:24ca7ab5... is `v21.0` (2026-06-19), which `:latest` pointed at. container: - image: reactnativecommunity/react-native-android:latest + image: reactnativecommunity/react-native-android@sha256:24ca7ab5a70ec0b78a81bdc5eeea5924c2531531d53971b6f2321aff08446c36 env: TERM: 'dumb' # Gradle mis-decompresses tar.gz inside containers under some locales.