зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1740358 - Use Java JDK from Adoptium in CI. r=aki
Differential Revision: https://phabricator.services.mozilla.com/D131928
This commit is contained in:
Родитель
acc50579ec
Коммит
9ce9bd86e7
|
@ -27,7 +27,6 @@ apt-get install -y \
|
|||
libx11-dev \
|
||||
llvm-dev \
|
||||
ninja-build \
|
||||
openjdk-8-jdk \
|
||||
pkg-config \
|
||||
python \
|
||||
python-mako \
|
||||
|
|
|
@ -733,6 +733,12 @@ def main(argv):
|
|||
action="store_true",
|
||||
help="If true, install only the Android SDK (and not the Android NDK).",
|
||||
)
|
||||
parser.add_option(
|
||||
"--jdk-only",
|
||||
dest="jdk_only",
|
||||
action="store_true",
|
||||
help="If true, install only the Java JDK.",
|
||||
)
|
||||
parser.add_option(
|
||||
"--ndk-only",
|
||||
dest="ndk_only",
|
||||
|
@ -797,6 +803,11 @@ def main(argv):
|
|||
)
|
||||
|
||||
os_arch = platform.machine()
|
||||
|
||||
if options.jdk_only:
|
||||
ensure_java(os_name, os_arch)
|
||||
return 0
|
||||
|
||||
ensure_android(
|
||||
os_name,
|
||||
os_arch,
|
||||
|
|
|
@ -78,6 +78,7 @@ job-defaults:
|
|||
- android-ndk-linux
|
||||
- android-sdk-linux
|
||||
- linux64-clang
|
||||
- linux64-jdk
|
||||
- linux64-rust-android
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
|
|
|
@ -38,6 +38,7 @@ job-defaults:
|
|||
toolchain:
|
||||
- android-ndk-linux
|
||||
- android-sdk-linux
|
||||
- linux64-jdk
|
||||
- linux64-rust-android
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
|
|
|
@ -44,6 +44,7 @@ android-geckoview-docs/opt:
|
|||
toolchain:
|
||||
- android-gradle-dependencies
|
||||
- android-sdk-linux
|
||||
- linux64-jdk
|
||||
- linux64-node
|
||||
optimization:
|
||||
skip-unless-changed:
|
||||
|
|
|
@ -44,6 +44,7 @@ job-defaults:
|
|||
toolchain:
|
||||
- android-ndk-linux
|
||||
- android-sdk-linux
|
||||
- linux64-jdk
|
||||
- linux64-rust-android
|
||||
- linux64-rust-size
|
||||
- linux64-cbindgen
|
||||
|
|
|
@ -168,9 +168,6 @@ jobs:
|
|||
android-build:
|
||||
symbol: I(agb)
|
||||
parent: debian11-base
|
||||
android-test:
|
||||
symbol: I(agt)
|
||||
parent: ubuntu1804-test
|
||||
fetch:
|
||||
symbol: I(fetch)
|
||||
parent: debian11-raw
|
||||
|
|
|
@ -178,6 +178,7 @@ jobs:
|
|||
- android-gradle-dependencies
|
||||
- android-ndk-linux
|
||||
- android-sdk-linux
|
||||
- linux64-jdk
|
||||
# Workaround issues in binutils from the ndk with the compiler-rt from clang-13
|
||||
- linux64-binutils
|
||||
- linux64-clang-android-cross
|
||||
|
@ -233,6 +234,7 @@ jobs:
|
|||
- android-gradle-dependencies
|
||||
- android-ndk-linux
|
||||
- android-sdk-linux
|
||||
- linux64-jdk
|
||||
- linux64-clang-android-cross
|
||||
- linux64-rust-android
|
||||
- linux64-rust-size
|
||||
|
|
|
@ -183,6 +183,7 @@ jobs:
|
|||
- android-gradle-dependencies
|
||||
- android-ndk-linux
|
||||
- android-sdk-linux
|
||||
- linux64-jdk
|
||||
- linux64-clang
|
||||
- linux64-rust-android
|
||||
- linux64-rust-size
|
||||
|
|
|
@ -81,6 +81,7 @@ lints:
|
|||
# Aliases aren't allowed for toolchains installed by fetch.
|
||||
- linux64-android-gradle-dependencies
|
||||
- linux64-android-sdk-linux-repack
|
||||
- linux64-jdk-repack
|
||||
- linux64-node
|
||||
when:
|
||||
files-changed:
|
||||
|
|
|
@ -16,10 +16,19 @@ aab:
|
|||
when: &gv_e10s_filter
|
||||
$eval: '"android" in task["test-platform"] && task.e10s in [true, "both"]'
|
||||
suffix: "aab"
|
||||
# Need to add jdk but there isn't a good way to do that
|
||||
# so we just replace the toolchain list
|
||||
merge:
|
||||
fetches:
|
||||
toolchain:
|
||||
- android-system-image-x86_64-linux
|
||||
- android-avd-x86_64-linux
|
||||
- android-emulator-linux
|
||||
- linux64-minidump-stackwalk
|
||||
- linux64-fix-stacks
|
||||
- linux64-jdk
|
||||
replace:
|
||||
target: "geckoview-test_runner.aab"
|
||||
docker-image:
|
||||
in-tree: "android-test"
|
||||
|
||||
geckoview-e10s-single:
|
||||
description: "{description} with single-process e10s"
|
||||
|
|
|
@ -31,6 +31,10 @@ linux64-android-avd-x86_64-repack:
|
|||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: public/build/android-avd-linux.tar.zst
|
||||
toolchain-alias: android-avd-x86_64-linux
|
||||
fetches:
|
||||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-jdk-repack
|
||||
|
||||
linux64-android-avd-arm-repack:
|
||||
attributes:
|
||||
|
@ -47,6 +51,10 @@ linux64-android-avd-arm-repack:
|
|||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: public/build/android-avd-linux.tar.zst
|
||||
toolchain-alias: android-avd-arm-linux
|
||||
fetches:
|
||||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-jdk-repack
|
||||
|
||||
linux64-android-avd-arm64-repack:
|
||||
attributes:
|
||||
|
@ -63,6 +71,10 @@ linux64-android-avd-arm64-repack:
|
|||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: public/build/android-avd-linux.tar.zst
|
||||
toolchain-alias: android-avd-arm64-linux
|
||||
fetches:
|
||||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-jdk-repack
|
||||
|
||||
linux64-android-system-image-x86_64-repack:
|
||||
description: "Android System Images (Linux) repack toolchain build"
|
||||
|
@ -81,6 +93,28 @@ linux64-android-system-image-x86_64-repack:
|
|||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: project/gecko/android-system-images/android-system-images-linux.tar.zst
|
||||
toolchain-alias: android-system-image-x86_64-linux
|
||||
fetches:
|
||||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-jdk-repack
|
||||
|
||||
linux64-jdk-repack:
|
||||
description: "Java JDK (Linux) repack toolchain build"
|
||||
treeherder:
|
||||
symbol: TL(jdk)
|
||||
worker:
|
||||
artifacts:
|
||||
- name: project/gecko/jdk
|
||||
path: /builds/worker/project/gecko/jdk/
|
||||
type: directory
|
||||
run:
|
||||
script: repack-jdk-linux.sh
|
||||
resources:
|
||||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: project/gecko/jdk/jdk-linux.tar.zst
|
||||
toolchain-alias: linux64-jdk
|
||||
toolchain-env:
|
||||
JAVA_HOME: "/builds/worker/fetches/jdk/jdk8u312-b07"
|
||||
|
||||
linux64-android-sdk-linux-repack:
|
||||
description: "Android SDK (Linux) repack toolchain build"
|
||||
|
@ -97,6 +131,10 @@ linux64-android-sdk-linux-repack:
|
|||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: project/gecko/android-sdk/android-sdk-linux.tar.zst
|
||||
toolchain-alias: android-sdk-linux
|
||||
fetches:
|
||||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-jdk-repack
|
||||
|
||||
linux64-android-emulator-linux-repack:
|
||||
description: "Android Emulator (Linux) repack toolchain build"
|
||||
|
@ -113,6 +151,10 @@ linux64-android-emulator-linux-repack:
|
|||
- 'python/mozboot/**/*android*'
|
||||
toolchain-artifact: project/gecko/android-emulator/android-emulator-linux.tar.zst
|
||||
toolchain-alias: android-emulator-linux
|
||||
fetches:
|
||||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-jdk-repack
|
||||
|
||||
linux64-android-ndk-linux-repack:
|
||||
description: "Android NDK (Linux) repack toolchain build"
|
||||
|
@ -155,6 +197,7 @@ linux64-android-gradle-dependencies:
|
|||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-android-sdk-linux-repack
|
||||
- linux64-jdk-repack
|
||||
- linux64-node
|
||||
|
||||
linux64-android-gradle-dependencies-lite:
|
||||
|
@ -182,4 +225,5 @@ linux64-android-gradle-dependencies-lite:
|
|||
toolchain:
|
||||
# Aliases aren't allowed for toolchains depending on toolchains.
|
||||
- linux64-android-sdk-linux-repack
|
||||
- linux64-jdk-repack
|
||||
- linux64-node
|
||||
|
|
|
@ -272,6 +272,7 @@ jobs:
|
|||
- android-sdk-linux
|
||||
- android-system-image-x86_64-linux
|
||||
- android-avd-x86_64-linux
|
||||
- linux64-jdk
|
||||
- linux64-rust-android
|
||||
- wrench-deps
|
||||
treeherder:
|
||||
|
@ -314,6 +315,7 @@ jobs:
|
|||
- android-sdk-linux
|
||||
- android-system-image-x86_64-linux
|
||||
- android-avd-x86_64-linux
|
||||
- linux64-jdk
|
||||
- linux64-rust-android
|
||||
- wrench-deps
|
||||
treeherder:
|
||||
|
@ -352,6 +354,7 @@ jobs:
|
|||
- android-sdk-linux
|
||||
- android-system-image-x86_64-linux
|
||||
- android-avd-x86_64-linux
|
||||
- linux64-jdk
|
||||
run:
|
||||
using: run-task
|
||||
tooltool-downloads: internal
|
||||
|
@ -396,6 +399,7 @@ jobs:
|
|||
- android-sdk-linux
|
||||
- android-system-image-x86_64-linux
|
||||
- android-avd-x86_64-linux
|
||||
- linux64-jdk
|
||||
run:
|
||||
using: run-task
|
||||
tooltool-downloads: internal
|
||||
|
|
|
@ -41,15 +41,5 @@ RUN apt-get update && \
|
|||
# %include taskcluster/docker/recipes/xvfb.sh
|
||||
COPY topsrcdir/taskcluster/docker/recipes/xvfb.sh /builds/worker/scripts/xvfb.sh
|
||||
|
||||
# %include taskcluster/docker/recipes/prepare_openjdk.sh
|
||||
COPY topsrcdir/taskcluster/docker/recipes/prepare_openjdk.sh /tmp/prepare_openjdk.sh
|
||||
RUN /tmp/prepare_openjdk.sh && rm /tmp/prepare_openjdk.sh
|
||||
|
||||
# Observe missing --no-install-recommends, in order to install glib2.0/gconf/etc.
|
||||
RUN apt-get install \
|
||||
libgconf-2-4 \
|
||||
libgnome2-0 \
|
||||
openjdk-8-jdk-headless
|
||||
|
||||
# Back to the workdir, matching desktop-build.
|
||||
WORKDIR /builds/worker
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
FROM $DOCKER_IMAGE_PARENT
|
||||
MAINTAINER Agi Sferro <asferro@mozilla.com>
|
||||
|
||||
VOLUME /builds/worker/.cache
|
||||
VOLUME /builds/worker/checkouts
|
||||
VOLUME /builds/worker/tooltool-cache
|
||||
VOLUME /builds/worker/workspace
|
||||
|
||||
# Workaround for missing folder in the Ubuntu image, see
|
||||
# https://github.com/debuerreotype/docker-debian-artifacts/issues/24 and
|
||||
# related.
|
||||
RUN mkdir -p /usr/share/man/man1
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install \
|
||||
openjdk-11-jdk-headless
|
||||
|
||||
CMD ["/bin/bash", "--login"]
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
# Debian >= 10 doesn't have openjdk-8, so add the Debian 9 repository, which contains it.
|
||||
version=$(awk -F. '{print $1}' /etc/debian_version)
|
||||
if test "$version" -ge 10; then
|
||||
sed -n "s/ [^/ ]* main/ stretch main/p;q" /etc/apt/sources.list | tee /etc/apt/sources.list.d/stretch.list
|
||||
apt-get update
|
||||
fi
|
|
@ -7,10 +7,6 @@ VOLUME /builds/worker/tooltool-cache
|
|||
|
||||
ENV XZ_OPT=-T0
|
||||
|
||||
# %include taskcluster/docker/recipes/prepare_openjdk.sh
|
||||
COPY topsrcdir/taskcluster/docker/recipes/prepare_openjdk.sh /tmp/prepare_openjdk.sh
|
||||
RUN /tmp/prepare_openjdk.sh && rm /tmp/prepare_openjdk.sh
|
||||
|
||||
ARG TASKCLUSTER_ROOT_URL
|
||||
ARG DOCKER_IMAGE_PACKAGES
|
||||
RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAGES
|
||||
|
@ -34,7 +30,6 @@ RUN apt-get update && \
|
|||
libstdc++-*-dev \
|
||||
libmpfr-dev \
|
||||
nasm \
|
||||
openjdk-8-jdk-headless \
|
||||
opam \
|
||||
pkg-config \
|
||||
patch \
|
||||
|
|
|
@ -5,10 +5,6 @@ VOLUME /builds/worker/checkouts
|
|||
VOLUME /builds/worker/workspace
|
||||
VOLUME /builds/worker/tooltool-cache
|
||||
|
||||
# %include taskcluster/docker/recipes/prepare_openjdk.sh
|
||||
COPY topsrcdir/taskcluster/docker/recipes/prepare_openjdk.sh /tmp/prepare_openjdk.sh
|
||||
RUN /tmp/prepare_openjdk.sh && rm /tmp/prepare_openjdk.sh
|
||||
|
||||
# %include gfx/wr/ci-scripts/docker-image/setup.sh
|
||||
ADD topsrcdir/gfx/wr/ci-scripts/docker-image/setup.sh /tmp/wr-setup.sh
|
||||
RUN /bin/bash /tmp/wr-setup.sh && rm /tmp/wr-setup.sh
|
||||
|
|
|
@ -8,6 +8,9 @@ set -v
|
|||
|
||||
cd $GECKO_PATH
|
||||
|
||||
# Needed for Nexus
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
|
||||
. taskcluster/scripts/misc/android-gradle-dependencies/before.sh
|
||||
|
||||
export MOZCONFIG=mobile/android/config/mozconfigs/android-arm-gradle-dependencies/nightly-lite
|
||||
|
|
|
@ -8,6 +8,9 @@ set -v
|
|||
|
||||
cd $GECKO_PATH
|
||||
|
||||
# Needed for Nexus
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
|
||||
. taskcluster/scripts/misc/android-gradle-dependencies/before.sh
|
||||
|
||||
export MOZCONFIG=mobile/android/config/mozconfigs/android-arm-gradle-dependencies/nightly
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -x -e -v
|
||||
|
||||
# This script is for fetching and repacking the OpenJDK (for
|
||||
# Linux)
|
||||
|
||||
UPLOAD_DIR=$HOME/project/gecko/jdk
|
||||
AVD_JSON_CONFIG="$1"
|
||||
|
||||
mkdir -p $HOME/artifacts $UPLOAD_DIR
|
||||
|
||||
# Populate /builds/worker/.mozbuild/jdk
|
||||
cd $GECKO_PATH
|
||||
./mach python python/mozboot/mozboot/android.py --jdk-only
|
||||
|
||||
tar cavf $UPLOAD_DIR/jdk-linux.tar.zst -C /builds/worker/.mozbuild jdk
|
||||
|
||||
ls -al $UPLOAD_DIR
|
|
@ -11,6 +11,7 @@ pushd "${GECKO_PATH}/gfx/wr/wrench"
|
|||
# These things come from the toolchain dependencies of the job that invokes
|
||||
# this script (webrender-wrench-android-build).
|
||||
export PATH="${PATH}:${MOZ_FETCHES_DIR}/rustc/bin"
|
||||
export PATH="${PATH}:${JAVA_HOME}/bin"
|
||||
export ANDROID_HOME="${MOZ_FETCHES_DIR}/android-sdk-linux"
|
||||
export NDK_HOME="${MOZ_FETCHES_DIR}/android-ndk"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче