add python38 (#7009)

* add python38

* add python3.8

* fix tox
pull/7019/head
Jie Luo 5 years ago committed by Paul Yang
parent fe1790ca0d
commit 7faab5eeeb
  1. 2
      kokoro/linux/dockerfile/test/python_stretch/Dockerfile
  2. 18
      kokoro/linux/python38/build.sh
  3. 11
      kokoro/linux/python38/continuous.cfg
  4. 11
      kokoro/linux/python38/presubmit.cfg
  5. 18
      kokoro/linux/python38_cpp/build.sh
  6. 11
      kokoro/linux/python38_cpp/continuous.cfg
  7. 11
      kokoro/linux/python38_cpp/presubmit.cfg
  8. 10
      kokoro/release/python/windows/build_artifacts.bat
  9. 6
      kokoro/release/python/windows/build_single_artifact.bat
  10. 8
      tests.sh

@ -40,8 +40,10 @@ RUN apt-get update && apt-get -t testing install -y \
python3.5 \
python3.6 \
python3.7 \
python3.8 \
python3-all-dev
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.5
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.8

@ -0,0 +1,18 @@
#!/bin/bash
#
# This is the top-level script we give to Kokoro as the entry point for
# running the "pull request" project:
#
# This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image. Then we delegate to the general
# build_and_run_docker.sh script.
# Change to repo root
cd $(dirname $0)/../../..
export DOCKERHUB_ORGANIZATION=protobuftesting
export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
export OUTPUT_DIR=testoutput
export TEST_SET="python38"
./kokoro/linux/build_and_run_docker.sh

@ -0,0 +1,11 @@
# Config file for running tests in Kokoro
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
timeout_mins: 120
action {
define_artifacts {
regex: "**/sponge_log.xml"
}
}

@ -0,0 +1,11 @@
# Config file for running tests in Kokoro
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python/build.sh"
timeout_mins: 120
action {
define_artifacts {
regex: "**/sponge_log.xml"
}
}

@ -0,0 +1,18 @@
#!/bin/bash
#
# This is the top-level script we give to Kokoro as the entry point for
# running the "pull request" project:
#
# This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image. Then we delegate to the general
# build_and_run_docker.sh script.
# Change to repo root
cd $(dirname $0)/../../..
export DOCKERHUB_ORGANIZATION=protobuftesting
export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python_stretch
export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh
export OUTPUT_DIR=testoutput
export TEST_SET="python38_cpp"
./kokoro/linux/build_and_run_docker.sh

@ -0,0 +1,11 @@
# Config file for running tests in Kokoro
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
timeout_mins: 120
action {
define_artifacts {
regex: "**/sponge_log.xml"
}
}

@ -0,0 +1,11 @@
# Config file for running tests in Kokoro
# Location of the build script in repository
build_file: "protobuf/kokoro/linux/python_cpp/build.sh"
timeout_mins: 120
action {
define_artifacts {
regex: "**/sponge_log.xml"
}
}

@ -62,6 +62,16 @@ SET PYTHON_VERSION=3.7
SET PYTHON_ARCH=64
CALL build_single_artifact.bat || goto :error
SET PYTHON=C:\python38_32bit
SET PYTHON_VERSION=3.8
SET PYTHON_ARCH=32
CALL build_single_artifact.bat || goto :error
SET PYTHON=C:\python38
SET PYTHON_VERSION=3.8
SET PYTHON_ARCH=64
CALL build_single_artifact.bat || goto :error
goto :EOF
:error

@ -18,6 +18,12 @@ if %PYTHON%==C:\python37_32bit set vcplatform=Win32
if %PYTHON%==C:\python37 set generator=Visual Studio 14 Win64
if %PYTHON%==C:\python37 set vcplatform=x64
if %PYTHON%==C:\python38_32bit set generator=Visual Studio 14
if %PYTHON%==C:\python38_32bit set vcplatform=Win32
if %PYTHON%==C:\python38 set generator=Visual Studio 14 Win64
if %PYTHON%==C:\python38 set vcplatform=x64
REM Prepend newly installed Python to the PATH of this build (this cannot be
REM done from inside the powershell script as it would require to restart
REM the parent CMD process).

@ -360,6 +360,10 @@ build_python37() {
build_python_version py37-python
}
build_python38() {
build_python_version py38-python
}
build_python_cpp() {
internal_build_cpp
export LD_LIBRARY_PATH=../src/.libs # for Linux
@ -408,6 +412,10 @@ build_python37_cpp() {
build_python_cpp_version py37-cpp
}
build_python38_cpp() {
build_python_cpp_version py38-cpp
}
build_python_compatibility() {
internal_build_cpp
# Use the unit-tests extraced from 2.5.0 to test the compatibilty.

Loading…
Cancel
Save