Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
linsang21 committed Sep 6, 2024
1 parent 0cff173 commit 3f0bd40
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
codeCoverage:
# The type of runner that the job will run on
runs-on: macos-latest
runs-on: macos-13

strategy:
matrix:
api-level: [30]
# API 30+ emulators only have x86_64 system images.
arch: ["x86_64"]
target: [default] # Other option: google_apis

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Modify build.gradle file to build for x86_64
- name: Add x86_64 in gradle build
run: |
sed -i '' "s/abiFilters 'armeabi-v7a', 'arm64-v8a'/abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'/" $GITHUB_WORKSPACE/amazon-chime-sdk/build.gradle
- uses: actions/checkout@v4

# Download amazon-chime-sdk-media binary from AWS S3
- name: Get Media binary from AWS S3
Expand Down Expand Up @@ -56,38 +58,34 @@ jobs:
mkdir -p ./amazon-chime-sdk/libs
mv amazon-chime-sdk-machine-learning.aar ./amazon-chime-sdk/libs
# Setup gradle caching to reduce AVD start-up time
- name: Gradle cache
uses: gradle/gradle-build-action@v2

- name: AVD cache
uses: actions/cache@v3
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-30
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: ReactiveCircus/android-emulator-runner@v2
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: google_apis
arch: x86_64
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.target }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
disable-animations: false
script: echo "Generated AVD snapshot for caching."

# Execute unit tests
- name: Unit Test with Android Emulator Runner
uses: ReactiveCircus/android-emulator-runner@v2
uses: reactiveCircus/android-emulator-runner@v2
with:
target: google_apis
arch: x86_64
api-level: 30
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.target }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand Down

0 comments on commit 3f0bd40

Please sign in to comment.