Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Check
env:
# Version here should match the one in React Native template and packages/cmake-rn/src/cli.ts
NDK_VERSION: 27.1.12297006
# Building Hermes from source doesn't support CMake v4
CMAKE_VERSION: 3.31.6
# Enabling the Gradle test on CI (disabled by default because it downloads a lot)
ENABLE_GRADLE_TESTS: true

Expand Down Expand Up @@ -155,7 +157,7 @@ jobs:
- name: Install compatible CMake version
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.31.2"
cmake-version: ${{ env.CMAKE_VERSION }}
- run: rustup target add x86_64-apple-darwin
- run: npm ci
- run: npm run bootstrap
Expand All @@ -171,7 +173,7 @@ jobs:
test-android:
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Android 🤖')
name: Test app (Android)
runs-on: ubuntu-latest
runs-on: ubuntu-self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -185,7 +187,7 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: tools platform-tools ndk;${{ env.NDK_VERSION }}
packages: tools platform-tools ndk;${{ env.NDK_VERSION }} cmake;${{ env.CMAKE_VERSION }}
- run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi i686-linux-android aarch64-apple-ios-sim
- run: npm ci
- run: npm run bootstrap
Expand Down Expand Up @@ -237,7 +239,8 @@ jobs:
adb logcat > emulator-logcat.txt 2>&1 &
LOGCAT_PID=$!
# Build, install and run the app
npm run test:android:allTests -- --mode Release
npm run test:android:allTests
# npm run test:android:allTests -- --mode Release
# Wait a bit for the sub-process to terminate, before terminating the emulator
sleep 5
# Stop logcat
Expand Down
1 change: 1 addition & 0 deletions apps/test-app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function loadTests({
const exampleAddon =
/* eslint-disable-next-line @typescript-eslint/no-require-imports -- TODO: Determine why a dynamic import doesn't work on Android */
require("@react-native-node-api/ferric-example") as typeof import("@react-native-node-api/ferric-example");
console.log({ exampleAddon });
const result = exampleAddon.sum(1, 3);
if (result !== 4) {
throw new Error(`Expected 1 + 3 to equal 4, but got ${result}`);
Expand Down
Loading