Skip to content

Commit

Permalink
Change all build workflows to switch to Gradle managed devices
Browse files Browse the repository at this point in the history
  • Loading branch information
wmontwe committed Feb 19, 2023
1 parent 1c506e9 commit e30be63
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 55 deletions.
49 changes: 21 additions & 28 deletions .github/workflows/ci-build-snapshot-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ jobs:

runs-on: macos-latest

strategy:
matrix:
api-level: [ 30 ]

env:
GITHUB_PACKAGE_DOWNLOAD_USER: ${{ github.actor }}
GITHUB_PACKAGE_DOWNLOAD_KEY: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PACKAGE_UPLOAD_USER: ${{ github.actor }}
GITHUB_PACKAGE_UPLOAD_KEY: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -30,47 +20,50 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
distribution: temurin
java-version: 11

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Setup Android SDK
uses: bitfunk/[email protected]
uses: android-actions/setup-android@v2

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Version
run: ./gradlew --no-daemon --stacktrace versionInfo
run: ./gradlew --stacktrace versionInfo

- name: Build
run: ./gradlew --no-daemon --stacktrace build
run: ./gradlew --stacktrace build

- name: Run Android instrumented tests
run: ./gradlew cleanManagedDevices --unused-only &&
./gradlew --stacktrace androidGroupDebugAndroidTest
-Dorg.gradle.workers.max=1
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"

- name: Run Android Device Tests
uses: bitfunk/[email protected]
- name: Publish test report
uses: mikepenz/action-junit-report@v3
if: always()
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
profile: Nexus 5
avd-name: blueprint-${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew --no-daemon --stacktrace connectedCheck
report_paths: '**/build/test-results/**/TEST-*.xml'

- name: Analyze
if: ${{ false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew --no-daemon --stacktrace testCodeCoverageReport sonarqube
run: ./gradlew --stacktrace testCodeCoverageReport sonarqube

- name: Publish documentation
env:
GRGIT_USER: ${{ github.actor }}
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew --no-daemon --stacktrace mkdocsPublish
run: ./gradlew --stacktrace mkdocsPublish

- name: Publish Snapshot Version
run: echo "TODO"
46 changes: 19 additions & 27 deletions .github/workflows/ci-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ jobs:

runs-on: macos-latest

strategy:
matrix:
api-level: [ 30 ]

env:
GITHUB_PACKAGE_DOWNLOAD_USER: ${{ github.actor }}
GITHUB_PACKAGE_DOWNLOAD_KEY: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PACKAGE_UPLOAD_USER: ${{ github.actor }}
GITHUB_PACKAGE_UPLOAD_KEY: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -29,35 +19,37 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
distribution: temurin
java-version: 11

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Setup Android SDK
uses: bitfunk/[email protected]
uses: android-actions/setup-android@v2

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Version
run: ./gradlew --no-daemon --stacktrace versionInfo
run: ./gradlew --stacktrace versionInfo

- name: Build
run: ./gradlew --stacktrace build

- name: Build project
run: ./gradlew --no-daemon --stacktrace build
- name: Run Android instrumented tests
run: ./gradlew cleanManagedDevices --unused-only &&
./gradlew --stacktrace androidGroupDebugAndroidTest
-Dorg.gradle.workers.max=1
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"

- name: Run Android Device Tests
uses: bitfunk/[email protected]
- name: Publish test report
uses: mikepenz/action-junit-report@v3
if: always()
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
profile: Nexus 5
avd-name: blueprint-${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew --no-daemon --stacktrace connectedCheck
report_paths: '**/build/test-results/**/TEST-*.xml'

- name: Publish documentation
env:
Expand Down

0 comments on commit e30be63

Please sign in to comment.