-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android][circle_ci] android build job (#3679)
Co-authored-by: Francisco Massa <fvsmassa@gmail.com>
- Loading branch information
1 parent
5339e63
commit d6fee5a
Showing
10 changed files
with
214 additions
and
5 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
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
27 changes: 27 additions & 0 deletions
27
.circleci/unittest/android/scripts/binary_android_build.sh
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,27 @@ | ||
#!/bin/bash | ||
set -ex -o pipefail | ||
|
||
echo "DIR: $(pwd)" | ||
echo "ANDROID_HOME=${ANDROID_HOME}" | ||
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" | ||
echo "JAVA_HOME=${JAVA_HOME}" | ||
|
||
WORKSPACE=/home/circleci/workspace | ||
VISION_ANDROID=/home/circleci/project/android | ||
|
||
. /home/circleci/project/.circleci/unittest/android/scripts/install_gradle.sh | ||
|
||
GRADLE_LOCAL_PROPERTIES=${VISION_ANDROID}/local.properties | ||
rm -f $GRADLE_LOCAL_PROPERTIES | ||
|
||
echo "sdk.dir=${ANDROID_HOME}" >> $GRADLE_LOCAL_PROPERTIES | ||
echo "ndk.dir=${ANDROID_NDK_HOME}" >> $GRADLE_LOCAL_PROPERTIES | ||
|
||
echo "GRADLE_PATH $GRADLE_PATH" | ||
echo "GRADLE_HOME $GRADLE_HOME" | ||
|
||
${GRADLE_PATH} --scan --stacktrace --debug --no-daemon -p ${VISION_ANDROID} assemble || true | ||
|
||
mkdir -p ~/workspace/artifacts | ||
find . -type f -name *aar -print | xargs tar cfvz ~/workspace/artifacts/artifacts-aars.tgz | ||
find . -type f -name *apk -print | xargs tar cfvz ~/workspace/artifacts/artifacts-apks.tgz |
34 changes: 34 additions & 0 deletions
34
.circleci/unittest/android/scripts/binary_android_upload.sh
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,34 @@ | ||
#!/bin/bash | ||
set -ex -o pipefail | ||
|
||
echo "DIR: $(pwd)" | ||
echo "ANDROID_HOME=${ANDROID_HOME}" | ||
echo "ANDROID_NDK_HOME=${ANDROID_NDK_HOME}" | ||
echo "JAVA_HOME=${JAVA_HOME}" | ||
|
||
WORKSPACE=/home/circleci/workspace | ||
VISION_ANDROID=/home/circleci/project/android | ||
|
||
. /home/circleci/project/.circleci/unittest/android/scripts/install_gradle.sh | ||
|
||
GRADLE_LOCAL_PROPERTIES=${VISION_ANDROID}/local.properties | ||
rm -f $GRADLE_LOCAL_PROPERTIES | ||
GRADLE_PROPERTIES=/home/circleci/project/android/gradle.properties | ||
|
||
echo "sdk.dir=${ANDROID_HOME}" >> $GRADLE_LOCAL_PROPERTIES | ||
echo "ndk.dir=${ANDROID_NDK_HOME}" >> $GRADLE_LOCAL_PROPERTIES | ||
|
||
echo "SONATYPE_NEXUS_USERNAME=${SONATYPE_NEXUS_USERNAME}" >> $GRADLE_PROPERTIES | ||
echo "mavenCentralRepositoryUsername=${SONATYPE_NEXUS_USERNAME}" >> $GRADLE_PROPERTIES | ||
echo "SONATYPE_NEXUS_PASSWORD=${SONATYPE_NEXUS_PASSWORD}" >> $GRADLE_PROPERTIES | ||
echo "mavenCentralRepositoryPassword=${SONATYPE_NEXUS_PASSWORD}" >> $GRADLE_PROPERTIES | ||
|
||
echo "signing.keyId=${ANDROID_SIGN_KEY}" >> $GRADLE_PROPERTIES | ||
echo "signing.password=${ANDROID_SIGN_PASS}" >> $GRADLE_PROPERTIES | ||
|
||
cat /home/circleci/project/android/gradle.properties | grep VERSION | ||
|
||
${GRADLE_PATH} --scan --stacktrace --debug --no-daemon -p ${VISION_ANDROID} ops:uploadArchives | ||
|
||
mkdir -p ~/workspace/artifacts | ||
find . -type f -name *aar -print | xargs tar cfvz ~/workspace/artifacts/artifacts-aars.tgz |
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,19 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
_https_amazon_aws=https://ossci-android.s3.amazonaws.com | ||
GRADLE_VERSION=6.8.3 | ||
|
||
_gradle_home=/opt/gradle | ||
sudo rm -rf $gradle_home | ||
sudo mkdir -p $_gradle_home | ||
|
||
curl --silent --output /tmp/gradle.zip --retry 3 $_https_amazon_aws/gradle-${GRADLE_VERSION}-bin.zip | ||
|
||
sudo unzip -q /tmp/gradle.zip -d $_gradle_home | ||
rm /tmp/gradle.zip | ||
|
||
sudo chmod -R 777 $_gradle_home | ||
|
||
export GRADLE_HOME=$_gradle_home/gradle-$GRADLE_VERSION | ||
export GRADLE_PATH=${GRADLE_HOME}/bin/gradle |
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
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