Skip to content

Commit

Permalink
Merge branch 'release/1.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
mshdabiola committed Jun 27, 2024
2 parents ff62e18 + 57c2398 commit c9808b5
Show file tree
Hide file tree
Showing 11 changed files with 2,279 additions and 2,556 deletions.
54 changes: 19 additions & 35 deletions .github/workflows/deploy_foss_to_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,38 @@ on:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

## 2
jobs:
## 3
build:
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- name: Checkout
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
# 1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: '17'
# 2

- name: Install GMD image for baseline profile generation
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"
- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Accept Android licenses
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"

- name: Remove Firebase References
run: |
sed -i -e '/mlkit/,+14d' -e '/google-services/d' -e '/firebase/d' build.gradle.kts
sed -i -e '/with(target) {/,/^ }/d' -e '/CrashlyticsExtension/d' build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt
sed -i -e '/androidx.dev/d' settings.gradle.kts
sed -i -e '/mlkit/,+14d' -e '/google-services/d' -e '/libs.firebase/d' build-logic/convention/build.gradle.kts
- name: Build release variant including baseline profile generation
run: ./gradlew generateFossReliantReleaseBaselineProfile
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
sed -i -e '/with(target) {/,/^ }/d' -e '/CrashlyticsExtension/d' build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt
sed -i -e '/libs.firebase/d' build-logic/convention/build.gradle.kts
- name: Build release variant apk
run: ./gradlew assembleFossReliantRelease
Expand All @@ -68,6 +52,7 @@ jobs:
env:
BUILD_TOOLS_VERSION: "34.0.0"

# 4
- name: Draft Release
uses: ncipollo/release-action@v1.14.0
with:
Expand All @@ -77,4 +62,3 @@ jobs:
generateReleaseNotes: true
bodyFile: distribution/whatsnew/whatsnew-en-US
prerelease: false

47 changes: 16 additions & 31 deletions .github/workflows/deploy_play_to_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,32 @@ on:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

## 2
jobs:
## 3
build:
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- name: Checkout
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
# 1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
java-version: '17'
# 2

- name: Install GMD image for baseline profile generation
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"
- name: Setup Android SDK
uses: android-actions/setup-android@v2

- name: Accept Android licenses
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true

- name: Build release variant including baseline profile generation
run: ./gradlew generateGooglePlayReleaseBaselineProfile
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"

- name: Build release variant apk
run: ./gradlew assembleGooglePlayRelease
Expand All @@ -61,6 +46,7 @@ jobs:
env:
BUILD_TOOLS_VERSION: "34.0.0"

# 4
- name: Draft Release
uses: ncipollo/release-action@v1.14.0
with:
Expand All @@ -70,4 +56,3 @@ jobs:
generateReleaseNotes: true
bodyFile: distribution/whatsnew/whatsnew-en-US
prerelease: false

58 changes: 58 additions & 0 deletions .github/workflows/generate_baselineprofile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Generate Baseline Profiles

on:
push:
tags:
- 'b[0-9]+.[0-9]+.[0-9]+'


jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls /dev/kvm
- name: Checkout
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Install GMD image for baseline profile generation
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"

- name: Accept Android licenses
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true

- name: Build release variant including baseline profile generation
run: ./gradlew generateBaselineProfile
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1

- name: Create pull request
uses: peter-evans/create-pull-request@v5.0.2
with:
commit-message: Updated baseline profiles
title: Updated baseline profiles
body: ""
branch: update-baseline-profiles
base: develop
6 changes: 3 additions & 3 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
}

group = "com.mshdabiola.skeletonapp"
version = "1.1.5"
version = libs.versions.versionCode.get().toIntOrNull()

dependencies {

Expand Down Expand Up @@ -184,8 +184,8 @@ android {

defaultConfig {
applicationId = "com.mshdabiola.skeletonapp"
versionCode = 3
versionName = "1.1.5" // X.Y.Z; X = Major, Y = minor, Z = Patch level
versionCode = libs.versions.versionCode.get().toIntOrNull()
versionName = System.getenv("VERSION_NAME") ?: libs.versions.versionName.get()

// Custom test runner to set up Hilt dependency graph
testInstrumentationRunner = "com.mshdabiola.testing.TestRunner"
Expand Down
Loading

0 comments on commit c9808b5

Please sign in to comment.