From 315147dcae03fde6915a6f713e68f5b45dc27128 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Thu, 21 Nov 2019 16:36:52 -0800 Subject: [PATCH 1/5] Add Python3.8 to our macOS CI --- tools/internal_ci/helper_scripts/prepare_build_macos_rc | 4 ++++ tools/run_tests/artifacts/artifact_targets.py | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 413ed49adc3..43a34d51c41 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -58,6 +58,10 @@ export PYTHONPATH=/Library/Python/3.4/site-packages time curl -O https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target / +# Install Python 3.8 +time curl -O https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg +time sudo installer -pkg ./python-3.8.0-macosx10.9.pkg -target / + # set xcode version for Obj-C tests sudo xcode-select -switch /Applications/Xcode_9.2.app/Contents/Developer/ diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 62dd3e12f8f..0709db94696 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -406,8 +406,7 @@ def targets(): PythonArtifact('macos', 'x64', 'python3.5'), PythonArtifact('macos', 'x64', 'python3.6'), PythonArtifact('macos', 'x64', 'python3.7'), - # TODO(https://github.com/grpc/grpc/issues/20615) Enable this artifact - # PythonArtifact('macos', 'x64', 'python3.8'), + PythonArtifact('macos', 'x64', 'python3.8'), PythonArtifact('windows', 'x86', 'Python27_32bits'), PythonArtifact('windows', 'x86', 'Python35_32bits'), PythonArtifact('windows', 'x86', 'Python36_32bits'), From 63363aaf187539e3311590ff137446f2ccc6115c Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Fri, 22 Nov 2019 13:52:46 -0800 Subject: [PATCH 2/5] Install setup essentials for Python3.8 --- tools/internal_ci/macos/grpc_build_artifacts.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/internal_ci/macos/grpc_build_artifacts.sh b/tools/internal_ci/macos/grpc_build_artifacts.sh index 7b9c5eb673d..f4a7708e71e 100755 --- a/tools/internal_ci/macos/grpc_build_artifacts.sh +++ b/tools/internal_ci/macos/grpc_build_artifacts.sh @@ -25,6 +25,7 @@ python2.7 -m pip install cython setuptools wheel python3.5 -m pip install cython setuptools wheel python3.6 -m pip install cython setuptools wheel python3.7 -m pip install cython setuptools wheel +python3.8 -m pip install cython setuptools wheel # needed to build ruby artifacts time bash tools/distrib/build_ruby_environment_macos.sh From c711e5d4a6252a329e0b407adbf4155ae4c0e044 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 25 Nov 2019 10:59:51 -0800 Subject: [PATCH 3/5] Validate checksum for Python installers --- tools/internal_ci/helper_scripts/prepare_build_macos_rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 43a34d51c41..6747508b036 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -12,7 +12,6 @@ # 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. - # Source this rc script to prepare the environment for macos builds # show original open file limit values @@ -56,10 +55,14 @@ export PYTHONPATH=/Library/Python/3.4/site-packages # Install Python 3.7 time curl -O https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg +download_hash=$(md5sum python-3.7.0-macosx10.9.pkg | awk '{print $1}') +if [[ download_hash != 'ae0717a02efea3b0eb34aadc680dc498' ]]; then echo "Incorrect hash!"; exit 1; fi time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target / # Install Python 3.8 time curl -O https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg +download_hash=$(md5sum python-3.8.0-macosx10.9.pkg | awk '{print $1}') +if [[ download_hash != 'f5f9ae9f416170c6355cab7256bb75b5' ]]; then echo "Incorrect hash!"; exit 1; fi time sudo installer -pkg ./python-3.8.0-macosx10.9.pkg -target / # set xcode version for Obj-C tests @@ -85,3 +88,4 @@ ln -s /tmpfs/DerivedData ~/Library/Developer/Xcode/DerivedData # PHP tests currently require using an older version of PHPUnit ln -sf /usr/local/bin/phpunit-5.7 /usr/local/bin/phpunit + From f0623730ef767a9612a8e0a965aebed650648c05 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 25 Nov 2019 13:24:26 -0800 Subject: [PATCH 4/5] Validate md5sum v2 --- .../helper_scripts/prepare_build_macos_rc | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 6747508b036..1b856f78b03 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -ex # Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -53,16 +53,13 @@ time pip install --user virtualenv time pip install --user --upgrade Mako six tox setuptools twisted pyyaml pyjwt cryptography requests export PYTHONPATH=/Library/Python/3.4/site-packages -# Install Python 3.7 +# Install Python 3.7 and Python 3.8 time curl -O https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg -download_hash=$(md5sum python-3.7.0-macosx10.9.pkg | awk '{print $1}') -if [[ download_hash != 'ae0717a02efea3b0eb34aadc680dc498' ]]; then echo "Incorrect hash!"; exit 1; fi -time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target / - -# Install Python 3.8 time curl -O https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg -download_hash=$(md5sum python-3.8.0-macosx10.9.pkg | awk '{print $1}') -if [[ download_hash != 'f5f9ae9f416170c6355cab7256bb75b5' ]]; then echo "Incorrect hash!"; exit 1; fi +echo "ae0717a02efea3b0eb34aadc680dc498 python-3.7.0-macosx10.9.pkg" > python_intaller_checksum.md5 +echo "f5f9ae9f416170c6355cab7256bb75b5 python-3.8.0-macosx10.9.pkg" >> python_intaller_checksum.md5 +md5sum -c python_installer_checksum.md5 +time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target / time sudo installer -pkg ./python-3.8.0-macosx10.9.pkg -target / # set xcode version for Obj-C tests From 606516346605aa7bb0d811450fa3e3835f420024 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 25 Nov 2019 14:27:27 -0800 Subject: [PATCH 5/5] Fix typo --- tools/internal_ci/helper_scripts/prepare_build_macos_rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 1b856f78b03..a13c29ea7f5 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -56,9 +56,9 @@ export PYTHONPATH=/Library/Python/3.4/site-packages # Install Python 3.7 and Python 3.8 time curl -O https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg time curl -O https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg -echo "ae0717a02efea3b0eb34aadc680dc498 python-3.7.0-macosx10.9.pkg" > python_intaller_checksum.md5 -echo "f5f9ae9f416170c6355cab7256bb75b5 python-3.8.0-macosx10.9.pkg" >> python_intaller_checksum.md5 -md5sum -c python_installer_checksum.md5 +echo "ae0717a02efea3b0eb34aadc680dc498 python-3.7.0-macosx10.9.pkg" > /tmp/python_installer_checksum.md5 +echo "f5f9ae9f416170c6355cab7256bb75b5 python-3.8.0-macosx10.9.pkg" >> /tmp/python_installer_checksum.md5 +md5sum -c /tmp/python_installer_checksum.md5 time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target / time sudo installer -pkg ./python-3.8.0-macosx10.9.pkg -target /