Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Check different version of android image, to check which is the fastes
Browse files Browse the repository at this point in the history
  • Loading branch information
kbetl-dlb committed Aug 17, 2023
1 parent b0cbe64 commit 95ae43b
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 6 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/android_ci_upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches:
- main
- develop
- release/*
pull_request:
branches:
- main
- develop
- release/*

workflow_dispatch:

jobs:
build-macos-android:
name: Flutter android new build test
runs-on: macos-12
env:
FLUTTER_VERSION: "3.0.3"
ANDROID_SDK_ROOT: "/Users/runner/android-sdk"
ANDROID_HOME: "~/.android"
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 15
distribution: 'zulu'
- name: Set up Flutter version 🔧
uses: ./.github/actions/flutter-action
with:
flutter-version: $FLUTTER_VERSION
- name: Fetch dependencies
run: |
flutter pub get
- name: Set up android enviroment
run: |
./scripts/macos_setup_android_env.sh
- name: Configure sdkmanager
run: |
./scripts/macos_configure-sdkmanager.sh 32 32.0.0 "android-23;default;x86"
- name: Run android integration tests
run: |
./scripts/run-mocked-integration-tests-android.sh "android-23;default;x86"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ jobs:
./scripts/macos_setup_android_env.sh
- name: Configure sdkmanager
run: |
./scripts/macos_configure-sdkmanager.sh
./scripts/macos_configure-sdkmanager.sh 32 32.0.0 "android-28;default;x86"
- name: Run android integration tests
run: |
./scripts/run-mocked-integration-tests-android.sh
./scripts/run-mocked-integration-tests-android.sh "android-28;default;x86"
build-macos-ios:
name: flutter build macos ios
Expand Down
27 changes: 24 additions & 3 deletions scripts/macos_configure-sdkmanager.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
#! /usr/bin/env bash

build_tools_version="build-tools;32.0.0"
platform_version="platforms;android-32"
system_image="system-images;android-29;default;x86"
ANDROID_VERSION="32"
if [ "$2" ]
then ANDROID_TOOLS=$1
fi

ANDROID_TOOLS="$ANDROID_VERSION"
if [ "$2" ]
then ANDROID_TOOLS=$2
fi

ANDROID_IMAGE="android-29;default;x86"
if [ "$3" ]
then ANDROID_IMAGE=$3
fi

echo $ANDROID_VERSION

build_tools_version="build-tools;$ANDROID_TOOLS"
platform_version="platforms;android-$ANDROID_VERSION"
system_image="system-images;$ANDROID_IMAGE"

echo $platform_version
echo $build_tools_version
echo $system_image

export ANDROID_SDK_ROOT=~/android-sdk

Expand Down
7 changes: 6 additions & 1 deletion scripts/run-mocked-integration-tests-android.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#! /usr/bin/env bash

ANDROID_IMAGE="android-29;default;x86"
if [ "$1" ]
then ANDROID_IMAGE=$1
fi

device_name="testAVD"
system_image="system-images;android-29;default;x86"
system_image="system-images;$ANDROID_IMAGE"
device_port="5554"
serial_no="emulator-$device_port"
gpu_mode="swiftshader_indirect"
Expand Down

0 comments on commit 95ae43b

Please sign in to comment.