Skip to content

Commit

Permalink
Tweak build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed Jan 8, 2025
1 parent a087acd commit 22ae673
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 36 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Prepare env
id: prepare_env
run: |
Expand Down Expand Up @@ -82,8 +79,14 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build Benchmark app and run unit tests
run: ./gradlew spotlessCheck assembleDevBenchmark testDevBenchmarkUnitTest testReleaseUnitTest -Pandroid.signingConfig=debug --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleDevBenchmark -Pandroid.signingConfig=debug

- name: Run unit tests
run: ./gradlew testReleaseUnitTest testDevBenchmarkUnitTest

- name: Sign APK
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Setup Android SDK
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
Expand Down Expand Up @@ -68,8 +65,14 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build app and run unit tests
run: ./gradlew spotlessCheck assembleStandardPreview testStandardPreviewUnitTest testReleaseUnitTest --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleStandardRelease

- name: Run unit tests
run: ./gradlew testReleaseUnitTest testStandardReleaseUnitTest

- name: Sign APK
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_dispatch_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Prepare build
id: prepare_build
run: |
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Get previous release
id: last_release
uses: InsonusK/get-latest-release@7a9ff16c8c6b7ead5d71c0f1cc61f2703170eade # v1.1.0
Expand Down Expand Up @@ -151,8 +148,14 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build Preview app and run unit tests
run: ./gradlew spotlessCheck assembleStandardPreview testStandardPreviewUnitTest testReleaseUnitTest --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleStandardPreview

- name: Run unit tests
run: ./gradlew testReleaseUnitTest testStandardPreviewUnitTest

- name: Upload artifacts
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Dependency Review
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

Expand Down Expand Up @@ -71,8 +68,14 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build app and run unit tests
run: ./gradlew spotlessCheck assembleStandardPreview testStandardPreviewUnitTest testReleaseUnitTest --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleStandardRelease

- name: Run unit tests
run: ./gradlew testReleaseUnitTest testStandardReleaseUnitTest

- name: Sign APK
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_pull_request_forked.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Dependency Review
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

Expand All @@ -57,8 +54,14 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build app and run unit tests
run: ./gradlew spotlessCheck assembleDevDebug testDevDebugUnitTest testDebugUnitTest --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleDevDebug

- name: Run unit tests
run: ./gradlew testDebugUnitTest testDevDebugUnitTest

- name: Rename apk
id: current_commit
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Get previous release
id: last_release
uses: InsonusK/get-latest-release@7a9ff16c8c6b7ead5d71c0f1cc61f2703170eade # v1.1.0
Expand Down Expand Up @@ -97,9 +94,6 @@ jobs:
with:
fetch-depth: 0

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Setup Android SDK
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
Expand Down Expand Up @@ -127,8 +121,14 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build app and run unit tests
run: ./gradlew spotlessCheck assembleStandardRelease testStandardReleaseUnitTest testReleaseUnitTest --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleStandardRelease

- name: Run unit tests
run: ./gradlew testReleaseUnitTest testStandardReleaseUnitTest

- name: Upload artifacts
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
Expand Down

0 comments on commit 22ae673

Please sign in to comment.