Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve woodpecker build times #1139

Merged
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7b752df
Update woodpecker config
MV-GH Aug 5, 2023
0dfde6e
Upgradle gradle to 8.2.1 and set buildtoolsversion
MV-GH Aug 5, 2023
6c762de
Trigger woodpecker
MV-GH Aug 5, 2023
5fbb7b2
Test using gradle instead of gradlew
MV-GH Aug 5, 2023
5080325
Test run using drone cache
MV-GH Aug 5, 2023
dcbf98e
Fix formatting
MV-GH Aug 5, 2023
60f1df5
Trigger woodpecker
MV-GH Aug 5, 2023
fa1fb16
Probably wont work
MV-GH Aug 5, 2023
6bc71e5
Probably wont work
MV-GH Aug 5, 2023
f5f2435
No privileges as estimated
MV-GH Aug 5, 2023
4dce514
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
dessalines Aug 7, 2023
2ac33d7
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
dessalines Aug 7, 2023
abd3c91
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
MV-GH Aug 8, 2023
10a3edf
Test
MV-GH Aug 8, 2023
9ba5b93
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
MV-GH Aug 8, 2023
19da2ab
Alr should print the size
MV-GH Aug 8, 2023
b8336a0
Stuck?
MV-GH Aug 8, 2023
ca4f51a
Does weird stuff in logs if debug:true
MV-GH Aug 8, 2023
da8e883
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
MV-GH Aug 8, 2023
b85e042
try caches only
MV-GH Aug 9, 2023
947efc5
try caches only
MV-GH Aug 9, 2023
3ea0f22
try caches only
MV-GH Aug 9, 2023
d3ac058
Add wrapper
MV-GH Aug 9, 2023
5c39f1e
trigger woodpecker
MV-GH Aug 9, 2023
8b7328c
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
MV-GH Aug 9, 2023
3576b34
Test wrapper only
MV-GH Aug 9, 2023
a010c27
trigger woodpecker
MV-GH Aug 9, 2023
ea496d0
Try something diff
MV-GH Aug 9, 2023
175d654
Try something diff
MV-GH Aug 9, 2023
6b9c998
Show me the gradle locations
MV-GH Aug 9, 2023
0873fb5
Show me the .gradle file locations
MV-GH Aug 9, 2023
2fc11be
Hmmm
MV-GH Aug 9, 2023
ae63651
dont sopt plz
MV-GH Aug 9, 2023
5c1300d
Introspect
MV-GH Aug 9, 2023
cf1a089
wow
MV-GH Aug 9, 2023
52eb55a
Where is this .gradle
MV-GH Aug 9, 2023
1abd863
Hmmm
MV-GH Aug 9, 2023
89c0e0c
TEST
MV-GH Aug 9, 2023
60653da
Only rebuild when build.gradle changes
MV-GH Aug 9, 2023
e1f1bdf
Only rebuild when build.gradle changes
MV-GH Aug 9, 2023
8f8e933
Shouldnt rebuild
MV-GH Aug 9, 2023
32f8b55
Shouldnt rebuild
MV-GH Aug 10, 2023
36392a5
Go ahead
MV-GH Aug 10, 2023
d50fe9b
Trigger woodpecker
MV-GH Aug 10, 2023
c6ba0c8
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
MV-GH Aug 11, 2023
3f69e4f
Merge branch 'main' into woodpecker/improve-woodpecker_build_times
MV-GH Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,65 @@ steps:
commands:
- prettier -c "*.md" "*.yml"

restore-cache:
image: meltwater/drone-cache:v1
pull: true
settings:
restore: true
endpoint:
from_secret: MINIO_ENDPOINT
access-key:
from_secret: MINIO_WRITE_USER
secret-key:
from_secret: MINIO_WRITE_PASSWORD
bucket:
from_secret: MINIO_BUCKET
region: us-east-1
cache_key: "jerboa-cache"
path-style: true
mount:
- ".gradle"
secrets:
[MINIO_ENDPOINT, MINIO_WRITE_USER, MINIO_WRITE_PASSWORD, MINIO_BUCKET]

check_formatting:
image: cimg/android:2023.08
commands:
- sudo chown -R circleci:circleci .
- ./gradlew lintKotlin
environment:
GRADLE_RO_DEP_CACHE: .depcache

build_project:
image: cimg/android:2023.08
commands:
- sudo chown -R circleci:circleci .
- ./gradlew assembleDebug
environment:
GRADLE_RO_DEP_CACHE: .depcache

run_tests:
image: cimg/android:2023.08
commands:
- sudo chown -R circleci:circleci .
- ./gradlew testDebug
environment:
GRADLE_RO_DEP_CACHE: .depcache

rebuild-cache:
image: meltwater/drone-cache:v1
pull: true
settings:
rebuild: true
endpoint:
from_secret: MINIO_ENDPOINT
access-key:
from_secret: MINIO_WRITE_USER
secret-key:
from_secret: MINIO_WRITE_PASSWORD
bucket:
from_secret: MINIO_BUCKET
cache_key: "jerboa-cache"
region: us-east-1
path-style: true
mount:
- ".gradle"
secrets:
[MINIO_ENDPOINT, MINIO_WRITE_USER, MINIO_WRITE_PASSWORD, MINIO_BUCKET]

notify:
image: alpine:3
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ plugins {
apply(from = "update_instances.gradle.kts")

android {
buildToolsVersion = "34.0.0-rc3"
compileSdk = 34

defaultConfig {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ kotlin.code.style=official
android.nonTransitiveRClass=true
android.nonFinalResIds=false
org.gradle.configuration-cache=true
# TODO remove once AGP 8.2 is out of alpha
android.suppressUnsupportedCompileSdk=34
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down