Skip to content

Commit 18576fe

Browse files
committed
wip: Android: bsdiff integration
1 parent 659d14c commit 18576fe

46 files changed

Lines changed: 12164 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,18 @@ jobs:
103103
target: google_apis
104104
arch: x86
105105
disable-animations: true
106-
script: npm run ${{ matrix.test-command }}
106+
# connectedAndroidTest is included here (rather than a separate job or step) to reuse
107+
# this job's already-booted emulator, even though it means it runs once per matrix
108+
# variant. The android-emulator-runner action has no post-cleanup step, so a second
109+
# step would boot and tear down a second emulator; ::group:: markers keep the two
110+
# test runs visually separated in the Actions log instead.
111+
script: |
112+
echo "::group::Instrumented tests"
113+
(cd android && ./gradlew :app:connectedAndroidTest)
114+
echo "::endgroup::"
115+
echo "::group::E2E tests"
116+
npm run ${{ matrix.test-command }}
117+
echo "::endgroup::"
107118
108119
ios-test:
109120
needs: lint

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ Examples/testapp_rn
196196
# Android debug build files (conflict ignoring #Visual Studio files)
197197
!android/app/src/debug/
198198

199+
# CMake/NDK build cache for android/app/src/main/cpp
200+
android/app/.cxx
201+
199202
# iOS Simulator crash reports swept up from failed test runs (see test/test.ts)
200203
test/crash-logs/
201204

.npmignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ test/
4242
# Remove after this framework is published on NPM
4343
code-push-plugin-testing-framework/
4444

45-
# Android build artifacts and Android Studio bits
45+
# Android build artifacts, test sources and Android Studio bits
4646
android/app/build
47+
android/app/.cxx
48+
android/app/src/test
49+
android/app/src/androidTest
4750
android/local.properties
4851
android/.gradle
4952
android/**/*.iml

android/app/build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ android {
4747
versionCode 1
4848
versionName "1.0"
4949
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", IS_NEW_ARCHITECTURE_ENABLED.toString()
50+
51+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
52+
53+
externalNativeBuild {
54+
cmake {
55+
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
56+
}
57+
}
58+
}
59+
60+
externalNativeBuild {
61+
cmake {
62+
path "src/main/cpp/CMakeLists.txt"
63+
version "3.22.1"
64+
}
5065
}
5166

5267
lintOptions {
@@ -81,4 +96,8 @@ dependencies {
8196
implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'
8297

8398
testImplementation 'junit:junit:4.13.2'
99+
100+
androidTestImplementation 'junit:junit:4.13.2'
101+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
102+
androidTestImplementation 'androidx.test:runner:1.6.2'
84103
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Irrelevant content - old.dat just needs to open successfully so the
2+
test reaches the diff-header check this fixture is actually exercising.
39 Bytes
Binary file not shown.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
function greet(name) {
2+
console.log("Hello there, " + name + "!");
3+
return "Hello there, " + name + "!";
4+
}
5+
6+
function farewell(name) {
7+
console.log("Goodbye, " + name + ".");
8+
return "Goodbye, " + name + ".";
9+
}
10+
11+
function shout(name) {
12+
console.log("HEY, " + name.toUpperCase() + "!!!");
13+
return "HEY, " + name.toUpperCase() + "!!!";
14+
}
15+
16+
var VERSION = "1.1.0";
17+
var BUILD_NUMBER = 43;
18+
19+
module.exports = {
20+
greet: greet,
21+
farewell: farewell,
22+
shout: shout,
23+
VERSION: VERSION,
24+
BUILD_NUMBER: BUILD_NUMBER,
25+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
function greet(name) {
2+
console.log("Hello, " + name + "!");
3+
return "Hello, " + name + "!";
4+
}
5+
6+
function farewell(name) {
7+
console.log("Goodbye, " + name + ".");
8+
return "Goodbye, " + name + ".";
9+
}
10+
11+
var VERSION = "1.0.0";
12+
var BUILD_NUMBER = 42;
13+
14+
module.exports = {
15+
greet: greet,
16+
farewell: farewell,
17+
VERSION: VERSION,
18+
BUILD_NUMBER: BUILD_NUMBER,
19+
};
286 Bytes
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Everything in this file is new: the old side is a zero-byte file, so
2+
the whole patch body is a literal insert with no copy-from-old control
3+
entries at all.

0 commit comments

Comments
 (0)