Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix android emulator test #1816

Merged
merged 13 commits into from
Jan 2, 2025
Merged
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
22 changes: 0 additions & 22 deletions .github/workflows/check-pr-title.yml

This file was deleted.

24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
name: Build MacOS
uses: ./.github/workflows/build-native.yml
with:
runner: macos-latest
binary: macos
build: '["macos"]'
runner: macos-latest
binary: macos
build: '["macos"]'

build-linux:
name: Build Linux
Expand Down Expand Up @@ -406,14 +406,14 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Fetch artifacts
uses: actions/download-artifact@v4
Expand All @@ -437,7 +437,7 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-33-x86_64
key: avd-31-x86_64_2

- name: Create Android Emulator and generate snapshot for caching
if: ${{ steps.avd-cache.outputs.cache-hit != 'true' }}
Expand All @@ -448,9 +448,8 @@ jobs:
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
api-level: 31
arch: x86_64
ndk: 25.2.9519653
cmake: 3.10.2.4988404
script: echo "Generated Emulator snapshot for caching."
ndk: 27.0.12077973

- name: Run tests on Android Emulator
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -460,9 +459,8 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
api-level: 31
arch: x86_64
ndk: 25.2.9519653
cmake: 3.10.2.4988404
script: cd packages/realm/tests && flutter test integration_test/all_tests.dart --dart-define=BAAS_BAASAAS_API_KEY=$BAAS_BAASAAS_API_KEY --dart-define=BAAS_DIFFERENTIATOR=$BAAS_DIFFERENTIATOR --file-reporter=json:test-results.json --suppress-analytics
ndk: 27.0.12077973

- name: Publish Test Report
uses: dorny/[email protected]
Expand Down Expand Up @@ -592,7 +590,7 @@ jobs:
*<https://github.com/realm/realm-dart/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}|_{{workflow}}_ run id: ${{ github.run_id }} has status _{{jobStatus}}_ >*
<{{refUrl}}|`{{ref}}` - {{description}}>
{{#if description}}<{{diffUrl}}|branch: `{{diffRef}}`>{{/if}}

web-compile:
name: Compile for web
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions packages/realm/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ android {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}

sourceSets {
main {
java {
Expand All @@ -45,7 +45,7 @@ android {
jniLibs.srcDirs += ["src/main/cpp/lib/"]
}
}

lintOptions {
disable 'InvalidPackage'
}
Expand Down Expand Up @@ -134,11 +134,11 @@ def getBundleId() {

tasks.register("generateRealmConfig", Copy) {
outputs.upToDateWhen { false }

def bundleId = getBundleId();
from 'src/gen'
into "$buildDir/realm-generated"
filter { line -> line.replaceAll('realm_bundle_id', "${bundleId}") }
}

preBuild.dependsOn runMetrics, downloadRealmBinaries, generateRealmConfig
preBuild.dependsOn runMetrics, downloadRealmBinaries, generateRealmConfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
2 changes: 1 addition & 1 deletion packages/realm/tests/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "com.android.application" version '8.7.0' apply false
}

include ":app"
Loading