-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dependency Cache] Enable Dependency Cache on CI (#3463)
- Loading branch information
Showing
10 changed files
with
106 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash -eu | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh" | ||
|
||
echo "--- :rubygems: Setting up Gems" | ||
|
||
install_gems | ||
|
||
echo "--- :closed_lock_with_key: Installing Secrets" | ||
|
||
bundle exec fastlane run configure_apply | ||
|
||
echo "--- ⚙️ Building release variant" | ||
|
||
./gradlew assembleRelease -PskipSentryProguardMappingUpload=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash -e | ||
|
||
echo "--- 💾 Restore Cache" | ||
restore_gradle_dependency_cache || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash -eu | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh" | ||
|
||
echo "--- :rubygems: Setting up Gems" | ||
|
||
install_gems | ||
|
||
echo "--- :closed_lock_with_key: Installing Secrets" | ||
|
||
bundle exec fastlane run configure_apply | ||
|
||
echo "--- 🧪 Testing" | ||
|
||
bundle exec fastlane build_and_instrumented_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash -eu | ||
|
||
"$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh" | ||
|
||
echo "--- 🧪 Testing" | ||
|
||
./gradlew testDebugUnitTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
echo "--- :rubygems: Setting up Gems" | ||
install_gems | ||
|
||
echo "--- :closed_lock_with_key: Installing Secrets" | ||
bundle exec fastlane run configure_apply | ||
|
||
# .buildkite/pipeline.yml -> ./gradlew assembleRelease | ||
# .buildkite/commands/prototype-build.sh -> build_and_upload_prototype_build | ||
# -> prototype_build_type = 'debugProd' | ||
echo "--- 🛠 Download Mobile App Dependencies [Assemble Apps]" | ||
./gradlew assembleDebug | ||
echo "" | ||
|
||
# .buildkite/commands/lint.sh -> ./gradlew :app:lintRelease + ./gradlew :automotive:lintRelease :wear:lintRelease | ||
echo "--- 🧹 Download Lint Dependencies [Lint Apps]" | ||
./gradlew :app:lintDebug :automotive:lintDebug :wear:lintDebug | ||
echo "" | ||
|
||
# .buildkite/pipeline.yml -> ./gradlew testDebugUnitTest | ||
echo "--- 🧪 Download Unit Test Dependencies [Assemble Unit Tests]" | ||
./gradlew assembleDebugUnitTest | ||
echo "" | ||
|
||
# .buildkite/pipeline.yml -> build_and_instrumented_test | ||
# -> gradle(tasks: %w[assembleDebug assembleDebugAndroidTest]) | ||
echo "--- 🧪 Download Android Test Dependencies [Assemble Android Tests]" | ||
./gradlew assembleDebugAndroidTest | ||
echo "" | ||
|
||
echo "--- 💾 Save Cache" | ||
save_gradle_dependency_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json | ||
--- | ||
|
||
agents: | ||
queue: "android" | ||
|
||
steps: | ||
- label: "💾 Download and Cache Dependencies" | ||
command: .buildkite/commands/save-cache.sh | ||
plugins: [$CI_TOOLKIT] | ||
|
||
notify: | ||
- slack: | ||
channels: | ||
- "#android-core-notifs" | ||
message: "The dependency cache has been updated." | ||
if: build.state == "passed" | ||
- slack: | ||
channels: | ||
- "#android-core-notifs" | ||
message: "Failure to update the dependency cache." | ||
if: build.state == "failed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters