Skip to content

Ably Java Version Bump #2251

Ably Java Version Bump

Ably Java Version Bump #2251

Workflow file for this run

on:
pull_request:
push:
branches:
- main
jobs:
check:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
api-level: [ 21, 24, 27, 29 ]
include:
- api: 21
excludeModules: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
# Gradle 7 requires Java 11 to run
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: '19'
- name: Start SDK test proxy server
run: cd external/sdk-test-proxy && ./start-service
if: matrix.api-level != 21
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
#Github's default -no-snapshot option causes check workflow failing.It is likely because it has to cold boot
#emulator which might be taking long and causing a timeout issue or a freeze.
#Adding -no-snapshot-save will enable quick
#boot. See https://developer.android.com/studio/run/emulator-commandline#common for more
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
# ${{ condition && 'ifTrue' || 'ifFalse' }} is a workaround for a ternary operator https://github.com/actions/runner/issues/409#issuecomment-752775072
script: |
${{
matrix.excludeModules
&& './gradlew connectedCheck --stacktrace -x :publishing-java-testing:connectedCheck -x :subscribing-java-testing:connectedCheck -x :publishing-example-app:connectedCheck -x :subscribing-example-app:connectedCheck -PruntimeSecrets=FOR_ALL_PROJECTS_BECAUSE_WE_ARE_RUNNING_INTEGRATION_TESTS'
|| './gradlew connectedCheck --stacktrace -PruntimeSecrets=FOR_ALL_PROJECTS_BECAUSE_WE_ARE_RUNNING_INTEGRATION_TESTS'
}}
env:
ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN: ${{ secrets.MAPBOX_DOWNLOADS_TOKEN }}
ORG_GRADLE_PROJECT_MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
ORG_GRADLE_PROJECT_ABLY_API_KEY: ${{ secrets.ABLY_API_KEY }}
ORG_GRADLE_PROJECT_GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
# Reveal potential locations of test build reports
# (temporary: we'll remove this once we've confirmed where they all end up)
- run: find . -name "index.html"
if: always()
- uses: actions/upload-artifact@v3
name: Build Reports for integration-testing-app
if: always()
with:
name: api-level-${{ matrix.api-level }}-integration-testing-app-build-reports
path: integration-testing-app/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for core-sdk-java
if: always()
with:
name: api-level-${{ matrix.api-level }}-core-sdk-java-build-reports
path: core-sdk-java/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for common
if: always()
with:
name: api-level-${{ matrix.api-level }}-common-build-reports
path: common/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for android-test-common
if: always()
with:
name: api-level-${{ matrix.api-level }}-android-test-common-build-reports
path: android-test-common/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for core-sdk
if: always()
with:
name: api-level-${{ matrix.api-level }}-core-sdk-build-reports
path: core-sdk/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for publishing-sdk
if: always()
with:
name: api-level-${{ matrix.api-level }}-publishing-sdk-build-reports
path: publishing-sdk/build/reports
- uses: actions/upload-artifact@v3
name: Build Reports for subscribing-sdk
if: always()
with:
name: api-level-${{ matrix.api-level }}-subscribing-sdk-build-reports
path: subscribing-sdk/build/reports