mirror of https://github.com/grpc/grpc.git
Add dockerized ARM64 tests (bazel C/C++, C#, PHP, ruby, python) (#28966)
* C# arm64 docker image * add ruby arm64 docker image * add bazel_arm64 docker image * add python arm64 image * add php arm64 docker image * regenerate * add support for running arm64 tests with run_tests.py * restrict arm64 testing to python3.9 * first version of bazel arm64 C++ tests * add arm64 job configs * add initial checks to push_testing_images.shpull/29099/head
parent
6f75e54e4f
commit
6d3c45ff7b
28 changed files with 1085 additions and 28 deletions
@ -0,0 +1,27 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../run_tests_python_deps.include"/> |
||||
<%include file="../../cxx_deps.include"/> |
||||
|
||||
# Install bazel |
||||
<%include file="../../bazel.include"/> |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,28 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../run_tests_python_deps.include"/> |
||||
<%include file="../../csharp_deps.include"/> |
||||
<%include file="../../csharp_dotnetcli_deps.include"/> |
||||
<%include file="../../ccache.include"/> |
||||
<%include file="../../run_tests_addons.include"/> |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
||||
|
@ -0,0 +1,27 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2016 gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../run_tests_python_deps.include"/> |
||||
<%include file="../../php7_deps.include"/> |
||||
<%include file="../../php_valgrind.include"/> |
||||
<%include file="../../cmake.include"/> |
||||
<%include file="../../ccache.include"/> |
||||
<%include file="../../run_tests_addons.include"/> |
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,31 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../run_tests_addons.include"/> |
||||
|
||||
# 3.9 is the default python3 version on debian11 |
||||
RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3-pip |
||||
|
||||
# for Python test coverage reporting |
||||
RUN python3.9 -m pip install coverage |
||||
|
||||
<%include file="../../gcp_api_libraries.include"/> |
||||
|
||||
<%include file="../../cmake.include"/> |
||||
<%include file="../../ccache.include"/> |
@ -0,0 +1,30 @@ |
||||
%YAML 1.2 |
||||
--- | |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
<%include file="../../apt_get_basic.include"/> |
||||
<%include file="../../run_tests_python_deps.include"/> |
||||
<%include file="../../ruby_deps.include"/> |
||||
<%include file="../../cmake.include"/> |
||||
<%include file="../../ccache.include"/> |
||||
<%include file="../../run_tests_addons.include"/> |
||||
|
||||
# Seems required by XDS interop tests. |
||||
RUN python3 -m pip install virtualenv==16.7.9 |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,112 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
#================= |
||||
# Basic C core dependencies |
||||
|
||||
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||
RUN apt-get update && apt-get install -y \ |
||||
build-essential \ |
||||
autoconf \ |
||||
libtool \ |
||||
pkg-config \ |
||||
&& apt-get clean |
||||
|
||||
# GCC |
||||
RUN apt-get update && apt-get install -y \ |
||||
gcc \ |
||||
g++ \ |
||||
&& apt-get clean |
||||
|
||||
# libc6 |
||||
RUN apt-get update && apt-get install -y \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
&& apt-get clean |
||||
|
||||
# Tools |
||||
RUN apt-get update && apt-get install -y \ |
||||
bzip2 \ |
||||
curl \ |
||||
dnsutils \ |
||||
git \ |
||||
lcov \ |
||||
make \ |
||||
strace \ |
||||
time \ |
||||
unzip \ |
||||
wget \ |
||||
zip \ |
||||
&& apt-get clean |
||||
|
||||
#==================== |
||||
# run_tests.py python dependencies |
||||
|
||||
# Basic python dependencies to be able to run tools/run_tests python scripts |
||||
# These dependencies are not sufficient to build gRPC Python, gRPC Python |
||||
# deps are defined elsewhere (e.g. python_deps.include) |
||||
RUN apt-get update && apt-get install -y \ |
||||
python3 \ |
||||
python3-pip \ |
||||
python3-setuptools \ |
||||
python3-yaml \ |
||||
&& apt-get clean |
||||
|
||||
# use pinned version of pip to avoid sudden breakages |
||||
RUN python3 -m pip install --upgrade pip==19.3.1 |
||||
|
||||
# TODO(jtattermusch): currently six is needed for tools/run_tests scripts |
||||
# but since our python2 usage is deprecated, we should get rid of it. |
||||
RUN python3 -m pip install six==1.16.0 |
||||
|
||||
# Google Cloud Platform API libraries |
||||
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) |
||||
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 |
||||
|
||||
|
||||
#================= |
||||
# C++ dependencies |
||||
RUN apt-get update && apt-get -y install libc++-dev clang && apt-get clean |
||||
|
||||
|
||||
# Install bazel |
||||
#======================== |
||||
# Bazel installation |
||||
|
||||
# Must be in sync with tools/bazel |
||||
ENV BAZEL_VERSION 4.2.1 |
||||
|
||||
# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. |
||||
ENV DISABLE_BAZEL_WRAPPER 1 |
||||
|
||||
# Download the correct bazel version and make sure it's on path. |
||||
RUN BAZEL_ARCH_SUFFIX="$(uname -m | sed s/aarch64/arm64/)" \ |
||||
&& curl -sSL --fail -o /usr/local/bin/bazel "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-$BAZEL_ARCH_SUFFIX" \ |
||||
&& chmod a+x /usr/local/bin/bazel |
||||
|
||||
# Normally we would run "bazel --version" here to make sure bazel |
||||
# was correctly installed, but we can't do that because |
||||
# of # https://github.com/bazelbuild/bazel/issues/11379. |
||||
# We want to keep the arm64 version of the image buildable |
||||
# on x64 with use of qemu-user-static & binfmt emulation, |
||||
# but the self-extraction is broken for bazel currently. |
||||
# The binary will work correctly when run on real arm64 |
||||
# hardware, when qemu-user-static isn't getting into the way. |
||||
|
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,143 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
#================= |
||||
# Basic C core dependencies |
||||
|
||||
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||
RUN apt-get update && apt-get install -y \ |
||||
build-essential \ |
||||
autoconf \ |
||||
libtool \ |
||||
pkg-config \ |
||||
&& apt-get clean |
||||
|
||||
# GCC |
||||
RUN apt-get update && apt-get install -y \ |
||||
gcc \ |
||||
g++ \ |
||||
&& apt-get clean |
||||
|
||||
# libc6 |
||||
RUN apt-get update && apt-get install -y \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
&& apt-get clean |
||||
|
||||
# Tools |
||||
RUN apt-get update && apt-get install -y \ |
||||
bzip2 \ |
||||
curl \ |
||||
dnsutils \ |
||||
git \ |
||||
lcov \ |
||||
make \ |
||||
strace \ |
||||
time \ |
||||
unzip \ |
||||
wget \ |
||||
zip \ |
||||
&& apt-get clean |
||||
|
||||
#==================== |
||||
# run_tests.py python dependencies |
||||
|
||||
# Basic python dependencies to be able to run tools/run_tests python scripts |
||||
# These dependencies are not sufficient to build gRPC Python, gRPC Python |
||||
# deps are defined elsewhere (e.g. python_deps.include) |
||||
RUN apt-get update && apt-get install -y \ |
||||
python3 \ |
||||
python3-pip \ |
||||
python3-setuptools \ |
||||
python3-yaml \ |
||||
&& apt-get clean |
||||
|
||||
# use pinned version of pip to avoid sudden breakages |
||||
RUN python3 -m pip install --upgrade pip==19.3.1 |
||||
|
||||
# TODO(jtattermusch): currently six is needed for tools/run_tests scripts |
||||
# but since our python2 usage is deprecated, we should get rid of it. |
||||
RUN python3 -m pip install six==1.16.0 |
||||
|
||||
# Google Cloud Platform API libraries |
||||
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) |
||||
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 |
||||
|
||||
|
||||
#================ |
||||
# C# dependencies |
||||
|
||||
# cmake >=3.6 needed to build grpc_csharp_ext |
||||
RUN apt-get update && apt-get install -y cmake && apt-get clean |
||||
|
||||
# Install mono |
||||
RUN apt-get update && apt-get install -y apt-transport-https dirmngr && apt-get clean |
||||
RUN apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
||||
RUN echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list |
||||
RUN apt-get update && apt-get install -y \ |
||||
mono-devel \ |
||||
ca-certificates-mono \ |
||||
nuget \ |
||||
&& apt-get clean |
||||
|
||||
# Install .NET Core 3.1 (to be able to run the netcoreapp3.1 targets) |
||||
RUN DOTNET_DOWNLOAD_VERSION=3.1.415 \ |
||||
&& DOTNET_DOWNLOAD_ARCH="$(uname -m | sed s/x86_64/x64/ | sed s/aarch64/arm64/)" \ |
||||
&& curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_DOWNLOAD_VERSION/dotnet-sdk-$DOTNET_DOWNLOAD_VERSION-linux-$DOTNET_DOWNLOAD_ARCH.tar.gz \ |
||||
&& mkdir -p /usr/share/dotnet \ |
||||
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ |
||||
&& rm dotnet.tar.gz |
||||
|
||||
# Install .NET 6 |
||||
RUN DOTNET_DOWNLOAD_VERSION=6.0.100 \ |
||||
&& DOTNET_DOWNLOAD_ARCH="$(uname -m | sed s/x86_64/x64/ | sed s/aarch64/arm64/)" \ |
||||
&& curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_DOWNLOAD_VERSION/dotnet-sdk-$DOTNET_DOWNLOAD_VERSION-linux-$DOTNET_DOWNLOAD_ARCH.tar.gz \ |
||||
&& mkdir -p /usr/share/dotnet \ |
||||
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ |
||||
&& rm dotnet.tar.gz |
||||
|
||||
# Make sure "dotnet" is on PATH |
||||
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
||||
|
||||
# Trigger the population of the local package cache |
||||
ENV NUGET_XMLDOC_MODE skip |
||||
RUN mkdir warmup \ |
||||
&& cd warmup \ |
||||
&& dotnet new \ |
||||
&& cd .. \ |
||||
&& rm -rf warmup |
||||
|
||||
#================= |
||||
# Install ccache |
||||
|
||||
# Install ccache from source since ccache 3.x packaged with most linux distributions |
||||
# does not support Redis backend for caching. |
||||
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ |
||||
&& tar -zxf ccache.tar.gz \ |
||||
&& cd ccache-4.5.1 \ |
||||
&& mkdir build && cd build \ |
||||
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ |
||||
&& make -j4 && make install \ |
||||
&& cd ../.. \ |
||||
&& rm -rf ccache-4.5.1 ccache.tar.gz |
||||
|
||||
|
||||
RUN mkdir /var/local/jenkins |
||||
|
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,137 @@ |
||||
# Copyright 2016 gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
#================= |
||||
# Basic C core dependencies |
||||
|
||||
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||
RUN apt-get update && apt-get install -y \ |
||||
build-essential \ |
||||
autoconf \ |
||||
libtool \ |
||||
pkg-config \ |
||||
&& apt-get clean |
||||
|
||||
# GCC |
||||
RUN apt-get update && apt-get install -y \ |
||||
gcc \ |
||||
g++ \ |
||||
&& apt-get clean |
||||
|
||||
# libc6 |
||||
RUN apt-get update && apt-get install -y \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
&& apt-get clean |
||||
|
||||
# Tools |
||||
RUN apt-get update && apt-get install -y \ |
||||
bzip2 \ |
||||
curl \ |
||||
dnsutils \ |
||||
git \ |
||||
lcov \ |
||||
make \ |
||||
strace \ |
||||
time \ |
||||
unzip \ |
||||
wget \ |
||||
zip \ |
||||
&& apt-get clean |
||||
|
||||
#==================== |
||||
# run_tests.py python dependencies |
||||
|
||||
# Basic python dependencies to be able to run tools/run_tests python scripts |
||||
# These dependencies are not sufficient to build gRPC Python, gRPC Python |
||||
# deps are defined elsewhere (e.g. python_deps.include) |
||||
RUN apt-get update && apt-get install -y \ |
||||
python3 \ |
||||
python3-pip \ |
||||
python3-setuptools \ |
||||
python3-yaml \ |
||||
&& apt-get clean |
||||
|
||||
# use pinned version of pip to avoid sudden breakages |
||||
RUN python3 -m pip install --upgrade pip==19.3.1 |
||||
|
||||
# TODO(jtattermusch): currently six is needed for tools/run_tests scripts |
||||
# but since our python2 usage is deprecated, we should get rid of it. |
||||
RUN python3 -m pip install six==1.16.0 |
||||
|
||||
# Google Cloud Platform API libraries |
||||
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) |
||||
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 |
||||
|
||||
|
||||
#================= |
||||
# PHP7 dependencies |
||||
|
||||
# PHP specific dependencies |
||||
RUN apt-get update && apt-get install -y \ |
||||
libbison-dev \ |
||||
libcurl4-openssl-dev \ |
||||
libgmp-dev \ |
||||
libgmp3-dev \ |
||||
libssl-dev \ |
||||
libxml2-dev \ |
||||
re2c \ |
||||
zlib1g-dev \ |
||||
&& apt-get clean |
||||
|
||||
# Compile PHP7 from source |
||||
RUN git clone https://github.com/php/php-src /var/local/git/php-src |
||||
RUN cd /var/local/git/php-src \ |
||||
&& git checkout PHP-7.2.34 \ |
||||
&& ./buildconf --force \ |
||||
&& ./configure \ |
||||
--with-gmp \ |
||||
--with-openssl \ |
||||
--with-zlib \ |
||||
&& make -j$(nproc) \ |
||||
&& make install |
||||
|
||||
#================= |
||||
# PHP Test dependencies |
||||
|
||||
RUN apt-get update && apt-get install -y \ |
||||
valgrind |
||||
#================= |
||||
# Install cmake |
||||
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement. |
||||
|
||||
RUN apt-get update && apt-get install -y cmake && apt-get clean |
||||
|
||||
#================= |
||||
# Install ccache |
||||
|
||||
# Install ccache from source since ccache 3.x packaged with most linux distributions |
||||
# does not support Redis backend for caching. |
||||
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ |
||||
&& tar -zxf ccache.tar.gz \ |
||||
&& cd ccache-4.5.1 \ |
||||
&& mkdir build && cd build \ |
||||
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ |
||||
&& make -j4 && make install \ |
||||
&& cd ../.. \ |
||||
&& rm -rf ccache-4.5.1 ccache.tar.gz |
||||
|
||||
|
||||
RUN mkdir /var/local/jenkins |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,90 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
#================= |
||||
# Basic C core dependencies |
||||
|
||||
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||
RUN apt-get update && apt-get install -y \ |
||||
build-essential \ |
||||
autoconf \ |
||||
libtool \ |
||||
pkg-config \ |
||||
&& apt-get clean |
||||
|
||||
# GCC |
||||
RUN apt-get update && apt-get install -y \ |
||||
gcc \ |
||||
g++ \ |
||||
&& apt-get clean |
||||
|
||||
# libc6 |
||||
RUN apt-get update && apt-get install -y \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
&& apt-get clean |
||||
|
||||
# Tools |
||||
RUN apt-get update && apt-get install -y \ |
||||
bzip2 \ |
||||
curl \ |
||||
dnsutils \ |
||||
git \ |
||||
lcov \ |
||||
make \ |
||||
strace \ |
||||
time \ |
||||
unzip \ |
||||
wget \ |
||||
zip \ |
||||
&& apt-get clean |
||||
|
||||
|
||||
RUN mkdir /var/local/jenkins |
||||
|
||||
|
||||
# 3.9 is the default python3 version on debian11 |
||||
RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3-pip |
||||
|
||||
# for Python test coverage reporting |
||||
RUN python3.9 -m pip install coverage |
||||
|
||||
# Google Cloud Platform API libraries |
||||
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) |
||||
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 |
||||
|
||||
|
||||
#================= |
||||
# Install cmake |
||||
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement. |
||||
|
||||
RUN apt-get update && apt-get install -y cmake && apt-get clean |
||||
|
||||
#================= |
||||
# Install ccache |
||||
|
||||
# Install ccache from source since ccache 3.x packaged with most linux distributions |
||||
# does not support Redis backend for caching. |
||||
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ |
||||
&& tar -zxf ccache.tar.gz \ |
||||
&& cd ccache-4.5.1 \ |
||||
&& mkdir build && cd build \ |
||||
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ |
||||
&& make -j4 && make install \ |
||||
&& cd ../.. \ |
||||
&& rm -rf ccache-4.5.1 ccache.tar.gz |
||||
|
@ -0,0 +1,126 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
FROM arm64v8/debian:11 |
||||
|
||||
#================= |
||||
# Basic C core dependencies |
||||
|
||||
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||
RUN apt-get update && apt-get install -y \ |
||||
build-essential \ |
||||
autoconf \ |
||||
libtool \ |
||||
pkg-config \ |
||||
&& apt-get clean |
||||
|
||||
# GCC |
||||
RUN apt-get update && apt-get install -y \ |
||||
gcc \ |
||||
g++ \ |
||||
&& apt-get clean |
||||
|
||||
# libc6 |
||||
RUN apt-get update && apt-get install -y \ |
||||
libc6 \ |
||||
libc6-dbg \ |
||||
libc6-dev \ |
||||
&& apt-get clean |
||||
|
||||
# Tools |
||||
RUN apt-get update && apt-get install -y \ |
||||
bzip2 \ |
||||
curl \ |
||||
dnsutils \ |
||||
git \ |
||||
lcov \ |
||||
make \ |
||||
strace \ |
||||
time \ |
||||
unzip \ |
||||
wget \ |
||||
zip \ |
||||
&& apt-get clean |
||||
|
||||
#==================== |
||||
# run_tests.py python dependencies |
||||
|
||||
# Basic python dependencies to be able to run tools/run_tests python scripts |
||||
# These dependencies are not sufficient to build gRPC Python, gRPC Python |
||||
# deps are defined elsewhere (e.g. python_deps.include) |
||||
RUN apt-get update && apt-get install -y \ |
||||
python3 \ |
||||
python3-pip \ |
||||
python3-setuptools \ |
||||
python3-yaml \ |
||||
&& apt-get clean |
||||
|
||||
# use pinned version of pip to avoid sudden breakages |
||||
RUN python3 -m pip install --upgrade pip==19.3.1 |
||||
|
||||
# TODO(jtattermusch): currently six is needed for tools/run_tests scripts |
||||
# but since our python2 usage is deprecated, we should get rid of it. |
||||
RUN python3 -m pip install six==1.16.0 |
||||
|
||||
# Google Cloud Platform API libraries |
||||
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) |
||||
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 |
||||
|
||||
|
||||
#================== |
||||
# Ruby dependencies |
||||
|
||||
# Install rvm |
||||
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||
|
||||
# Install Ruby 2.5 |
||||
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||
RUN /bin/bash -l -c "rvm install ruby-2.5" |
||||
RUN /bin/bash -l -c "rvm use --default ruby-2.5" |
||||
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||
RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.5' >> ~/.bashrc" |
||||
RUN /bin/bash -l -c "gem install bundler --no-document -v 1.9" |
||||
|
||||
#================= |
||||
# Install cmake |
||||
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement. |
||||
|
||||
RUN apt-get update && apt-get install -y cmake && apt-get clean |
||||
|
||||
#================= |
||||
# Install ccache |
||||
|
||||
# Install ccache from source since ccache 3.x packaged with most linux distributions |
||||
# does not support Redis backend for caching. |
||||
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ |
||||
&& tar -zxf ccache.tar.gz \ |
||||
&& cd ccache-4.5.1 \ |
||||
&& mkdir build && cd build \ |
||||
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ |
||||
&& make -j4 && make install \ |
||||
&& cd ../.. \ |
||||
&& rm -rf ccache-4.5.1 ccache.tar.gz |
||||
|
||||
|
||||
RUN mkdir /var/local/jenkins |
||||
|
||||
|
||||
# Seems required by XDS interop tests. |
||||
RUN python3 -m pip install virtualenv==16.7.9 |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
@ -0,0 +1,30 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
# Config file for the internal CI (in protobuf text format) |
||||
|
||||
# Location of the continuous shell script in repository. |
||||
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" |
||||
timeout_mins: 60 |
||||
action { |
||||
define_artifacts { |
||||
regex: "**/*sponge_log.*" |
||||
regex: "github/grpc/reports/**" |
||||
} |
||||
} |
||||
|
||||
env_vars { |
||||
key: "RUN_TESTS_FLAGS" |
||||
value: "-f basictests_arm64 linux csharp --inner_jobs 4 -j 1 --internal_ci --bq_result_table aggregate_results" |
||||
} |
@ -0,0 +1,30 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
# Config file for the internal CI (in protobuf text format) |
||||
|
||||
# Location of the continuous shell script in repository. |
||||
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" |
||||
timeout_mins: 60 |
||||
action { |
||||
define_artifacts { |
||||
regex: "**/*sponge_log.*" |
||||
regex: "github/grpc/reports/**" |
||||
} |
||||
} |
||||
|
||||
env_vars { |
||||
key: "RUN_TESTS_FLAGS" |
||||
value: "-f basictests_arm64 linux php7 --inner_jobs 16 -j 2 --internal_ci --bq_result_table aggregate_results" |
||||
} |
@ -0,0 +1,30 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
# Config file for the internal CI (in protobuf text format) |
||||
|
||||
# Location of the continuous shell script in repository. |
||||
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" |
||||
timeout_mins: 60 |
||||
action { |
||||
define_artifacts { |
||||
regex: "**/*sponge_log.*" |
||||
regex: "github/grpc/reports/**" |
||||
} |
||||
} |
||||
|
||||
env_vars { |
||||
key: "RUN_TESTS_FLAGS" |
||||
value: "-f basictests_arm64 linux python --inner_jobs 16 -j 2 --internal_ci --bq_result_table aggregate_results" |
||||
} |
@ -0,0 +1,30 @@ |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
# Config file for the internal CI (in protobuf text format) |
||||
|
||||
# Location of the continuous shell script in repository. |
||||
build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" |
||||
timeout_mins: 60 |
||||
action { |
||||
define_artifacts { |
||||
regex: "**/*sponge_log.*" |
||||
regex: "github/grpc/reports/**" |
||||
} |
||||
} |
||||
|
||||
env_vars { |
||||
key: "RUN_TESTS_FLAGS" |
||||
value: "-f basictests_arm64 linux ruby --inner_jobs 16 -j 2 --internal_ci --bq_result_table aggregate_results" |
||||
} |
@ -0,0 +1,25 @@ |
||||
#!/usr/bin/env bash |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
set -ex |
||||
|
||||
# change to grpc repo root |
||||
cd $(dirname $0)/../../../.. |
||||
|
||||
source tools/internal_ci/helper_scripts/prepare_build_linux_rc |
||||
|
||||
export DOCKERFILE_DIR=tools/dockerfile/test/bazel_arm64 |
||||
export DOCKER_RUN_SCRIPT=$BAZEL_SCRIPT |
||||
exec tools/run_tests/dockerize/build_and_run_docker.sh |
@ -0,0 +1,23 @@ |
||||
# Copyright 2017 gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
# Config file for the internal CI (in protobuf text format) |
||||
|
||||
# Location of the continuous shell script in repository. |
||||
build_file: "grpc/tools/internal_ci/linux/arm64/grpc_bazel.sh" |
||||
timeout_mins: 120 |
||||
env_vars { |
||||
key: "BAZEL_SCRIPT" |
||||
value: "tools/internal_ci/linux/arm64/grpc_bazel_test_c_cpp_in_docker.sh" |
||||
} |
@ -0,0 +1,29 @@ |
||||
#!/usr/bin/env bash |
||||
# Copyright 2022 The gRPC Authors |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
set -ex |
||||
|
||||
mkdir -p /var/local/git |
||||
git clone /var/local/jenkins/grpc /var/local/git/grpc |
||||
(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \ |
||||
&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \ |
||||
${name}') |
||||
cd /var/local/git/grpc |
||||
|
||||
# tests require port server to be running |
||||
python3 tools/run_tests/start_port_server.py |
||||
|
||||
# test gRPC C/C++ with bazel |
||||
tools/bazel test --config=opt --test_output=errors --test_tag_filters=-no_linux,-no_arm64 --build_tag_filters=-no_linux,-no_arm64 --flaky_test_attempts=1 --runs_per_test=1 //test/... |
Loading…
Reference in new issue