Skip to content

Bump polkadart and remove hack for wrongly generated storage key #3586

Bump polkadart and remove hack for wrongly generated storage key

Bump polkadart and remove hack for wrongly generated storage key #3586

name: Android CI
on:
push:
branches: [master, f-droid]
pull_request:
branches: [master, f-droid]
env:
NODE_VERSION: 18.14.2
JAVA_VERSION: 12.x
ARTIFACT_PATH: ./screenshots
jobs:
cancel_previous_runs:
name: Cancel Previous Runs
runs-on: ubuntu-20.04
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
android-device-tests:
# use macos to have hardware acceleration https://github.com/ReactiveCircus/android-emulator-runner/issues/46
runs-on: ${{ matrix.os }}
timeout-minutes: 70
strategy:
matrix:
# lower api-levels would be supported but the webView that is pre-installed on these images does not.
api-level: [33]
include:
- os: macos-12 # Macos 13 is broken currently.
# needs to be the `id` from the devices given by `avdmanager list device`
device: "pixel_3a"
# disable for now. it takes ages to build and launch the app and the upper limit of
# recordings is 180s. The app has not even started by then.
record_video: false
fail-fast: false
steps:
# Setup Environment
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: "zulu"
- name: Install flutter wrapper
run: ./scripts/install_flutter_wrapper.sh
- name: Setup Android SDK and accept licences
uses: android-actions/setup-android@v2
- name: List android images
run: sdkmanager --list | grep system-images
# JS Stuff
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get dependencies (i.e., melos)
run: .flutter/bin/dart pub get
- name: Melos Bootstrap
run: .flutter/bin/dart run melos bootstrap
- name: "Build JS"
run: .flutter/bin/dart run melos yarn-build
- name: Gradle cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}-${{ matrix.device }}
- name: Start colima a docker runtime for MacOs
run: |
brew install docker
colima start
- name: Run encointer-node
run: ./scripts/docker_run_encointer_node_notee.sh &
- name: Bootstrap Demo Community
run: ./scripts/docker_run_encointer_client_bootstrap_demo_community.sh
- name: "Create AVD and generate a clean snapshot for caching"
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
profile: ${{ matrix.device }}
force-avd-creation: false
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: "Android Integration Tests"
uses: reactivecircus/android-emulator-runner@v2
env:
ANDROID_DEBUG: "true"
RECORD: ${{ matrix.record_video }}
TEMP_DIR: ${{ env.ARTIFACT_PATH }}
with:
api-level: ${{ matrix.api-level }}
profile: ${{ matrix.device }}
force-avd-creation: false
arch: x86_64
# as we use the cleanly cached emulator, we need to define `-no-snapshot-save` here.
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./scripts/android_integration_test.sh
- name: "Upload screenshots"
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.device }}
path: ${{ env.ARTIFACT_PATH }}