-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
44 additions
and
0 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,14 @@ | ||
#!/bin/bash | ||
|
||
#------------------------------------------------------------------------------ | ||
# Install bazelisk | ||
#------------------------------------------------------------------------------ | ||
function install_bazelisk() { | ||
bazelisk_version="v1.16.0" | ||
download_url="https://github.com/bazelbuild/bazelisk/releases/download/${bazelisk_version}/bazelisk-linux-amd64" | ||
mkdir -p "${TMPDIR}/bazelisk-release" | ||
wget -nv ${download_url} -O "${TMPDIR}/bazelisk-release/bazelisk" | ||
chmod +x "${TMPDIR}/bazelisk-release/bazelisk" | ||
export PATH="${TMPDIR}/bazelisk-release:${PATH}" | ||
} | ||
|
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,21 @@ | ||
#!/bin/bash | ||
|
||
# Fail on any error. | ||
set -e | ||
|
||
# this directory must exist for artifacts to be uploaded | ||
mkdir -p "${KOKORO_ARTIFACTS_DIR}/artifacts" | ||
cd "${KOKORO_ARTIFACTS_DIR}/github/android-test-releases" | ||
|
||
source kokoro/gcp_ubuntu_docker/common.sh | ||
install_bazelisk | ||
# runner has @androidsdk//:legacy_test-30 as a dependency | ||
/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root=/opt/android-sdk "platforms;android-30" "build-tools;30.0.0" | ||
# building :axt_m2_repository uses @androidsdk//:build-tools/33.0.2/aapt2 | ||
/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root=/opt/android-sdk "build-tools;33.0.2" | ||
/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root=/opt/android-sdk "platforms;android-34" "build-tools;34.0.0" | ||
|
||
bazelisk build :axt_m2repository | ||
|
||
# copy the zip here so that we don't follow symlinks to get the files to upload | ||
cp bazel-bin/axt_m2repository.zip . |
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,9 @@ | ||
build_file: "android-test-releases/kokoro/gcp_ubuntu_docker/kokoro_build.sh" | ||
|
||
action { | ||
define_artifacts { | ||
regex: "github/android-test-releases/axt_m2repository.zip" | ||
strip_prefix: "github/android-test-releases" | ||
fail_if_no_artifacts: true | ||
} | ||
} |