diff --git a/.github/workflows/android_main.yml b/.github/workflows/android_main.yml index 909507c2970f..5640d0eba365 100644 --- a/.github/workflows/android_main.yml +++ b/.github/workflows/android_main.yml @@ -20,7 +20,7 @@ concurrency: cancel-in-progress: true env: - ndk_version: 26.1.10909125 + ndk_version: 26.3.11579264 jobs: build: @@ -52,7 +52,6 @@ jobs: run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan - name: conan login run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} - - name: conan profile run: conan profile detect @@ -77,39 +76,33 @@ jobs: if-no-files-found: error test: - runs-on: macos-14 + runs-on: ubuntu-22.04 strategy: fail-fast: false - # Make sure the matrix here and in cache_AVD_images.yml is the same matrix: include: - # Oldest x86_64 - - arch: x86_64 - api-level: 23 - - arch: x86_64 - api-level: 29 - # API-30+ tests are failing because play services init something something - - arch: x86 - api-level: 30 - # API-32+ tests are failing because storage permissions something something - - arch: x86_64 - api-level: 32 + - { arch: x86_64, api-level: 23 } + - { arch: x86_64, api-level: 29 } + - { arch: x86_64, api-level: 30 } + - { arch: x86_64, api-level: 32 } steps: - name: checkout uses: actions/checkout@v4 + - name: install ninja + run: sudo apt-get install -y ninja-build + - name: java uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: 17 - - name: install brew - run: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null - - name: install ninja - run: brew install ninja - - name: install bundler - run: gem install bundler + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + - name: install fastlane run: bundle install @@ -120,11 +113,13 @@ jobs: - name: install python dependencies run: pip install conan + - name: install ndk + run: echo "y" | sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;${{ env.ndk_version }}" + - name: conan remote run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan - name: conan login run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} - - name: conan profile run: conan profile detect @@ -137,6 +132,12 @@ jobs: ~/.android/adb* key: avd-${{ matrix.arch }}-${{ matrix.api-level }}-r4 + - name: Enable KVM group perms + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 diff --git a/app/build.gradle b/app/build.gradle index a31538ab6796..76d4c03c2796 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,10 @@ plugins { id 'com.google.firebase.crashlytics' } +android { + ndkVersion "26.3.11579264" +} + task conanProfile { file("build").mkdirs() @@ -36,13 +40,11 @@ task conanInstall { } android { - compileSdkVersion 34 - ndkVersion "26.1.10909125" - defaultConfig { applicationId "at.tomtasche.reader" minSdkVersion 23 targetSdkVersion 33 + compileSdkVersion 34 testApplicationId "at.tomtasche.reader.test" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -165,4 +167,4 @@ dependencies { // espresso-idling-resource is used in main sourceSet as well. cannot be just androidTestImplementation implementation 'androidx.test.espresso:espresso-idling-resource:3.5.1' implementation 'androidx.annotation:annotation:1.8.0' -} +} \ No newline at end of file