From ac2ccc2d03624a1da0c0115dd87b9dfcbb4236f8 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Mon, 6 May 2019 10:01:36 -0400 Subject: [PATCH] Test on Python 3.5, 3.6, 3.8-dev and nightly --- .travis.yml | 27 +++++ src/travis/linux-x86_64-before-install.sh | 120 +++++++++++----------- 2 files changed, 89 insertions(+), 58 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97419ad4..0234ef6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,33 @@ matrix: env: - GAMOS=linux - PLATFORM=x86_64 + - os: linux + name: "Linux 64-bit Xenial - Python 3.5 Source Testing" + dist: xenial + language: python + python: + - "3.5" + deploy: true # skips full deploy steps + - os: linux + name: "Linux 64-bit Xenial - Python 3.6 Source Testing" + dist: xenial + language: python + python: + - "3.6" + deploy: true + - os: linux + name: "Linux 64-bit Xenial - Python 3.8-dev Source Testing" + dist: xenial + language: python + python: + - "3.8-dev" + deploy: true + - os: linux + name: "Linux 64-bit Xenial - Python nightly Source Testing" + dist: xenial + python: + - "nightly" + deploy: true - os: osx name: "MacOS 64-bit" language: generic diff --git a/src/travis/linux-x86_64-before-install.sh b/src/travis/linux-x86_64-before-install.sh index 8df1b3f9..d66d94b3 100755 --- a/src/travis/linux-x86_64-before-install.sh +++ b/src/travis/linux-x86_64-before-install.sh @@ -1,74 +1,78 @@ -export whereibelong=$(pwd) -export dist=$(lsb_release --codename --short) -echo "We are running on Ubuntu $dist" -echo "RUNNING: apt update..." -sudo apt-get --yes update > /dev/null -echo "RUNNING: apt dist-upgrade..." -sudo apt-get --yes dist-upgrade > /dev/null -echo "Installing build tools..." -sudo apt-get --yes install build-essential +if [ -n $TRAVIS_PYTHON_VERSION ]; then + export python="python" + export pip="pip" + echo "Travis setup Python $TRAVIS_PYTHON_VERSION" + echo "running tests with this version" +else + export whereibelong=$(pwd) + export dist=$(lsb_release --codename --short) + echo "We are running on Ubuntu $dist" + echo "RUNNING: apt update..." + sudo apt-get --yes update > /dev/null + echo "RUNNING: apt dist-upgrade..." + sudo apt-get --yes dist-upgrade > /dev/null + echo "Installing build tools..." + sudo apt-get --yes install build-essential -echo "Installing deps for python3" -sudo cp -v /etc/apt/sources.list /tmp -chmod a+rwx /tmp/sources.list -echo "deb-src http://archive.ubuntu.com/ubuntu/ $dist main" >> /tmp/sources.list -sudo cp -v /tmp/sources.list /etc/apt -sudo apt-get --yes update > /dev/null -sudo apt-get --yes build-dep python3 + echo "Installing deps for python3" + sudo cp -v /etc/apt/sources.list /tmp + chmod a+rwx /tmp/sources.list + echo "deb-src http://archive.ubuntu.com/ubuntu/ $dist main" >> /tmp/sources.list + sudo cp -v /tmp/sources.list /etc/apt + sudo apt-get --yes update > /dev/null + sudo apt-get --yes build-dep python3 -mypath=$HOME -echo "My Path is $mypath" -cpucount=$(nproc --all) -echo "This device has $cpucount CPUs for compiling..." + mypath=$HOME + echo "My Path is $mypath" + cpucount=$(nproc --all) + echo "This device has $cpucount CPUs for compiling..." -# Compile latest OpenSSL -OPENSSL_VER=1.1.1b -wget https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz -echo "Extracting OpenSSL..." -tar xf openssl-$OPENSSL_VER.tar.gz -cd openssl-$OPENSSL_VER -echo "Compiling OpenSSL $OPENSSL_VER..." -./config shared --prefix=$mypath/ssl -echo "Running make for OpenSSL..." -make -j$cpucount -s -echo "Running make install for OpenSSL..." -make install > /dev/null -export LD_LIBRARY_PATH=~/ssl/lib -cd ~ + # Compile latest OpenSSL + OPENSSL_VER=1.1.1b + wget https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz + echo "Extracting OpenSSL..." + tar xf openssl-$OPENSSL_VER.tar.gz + cd openssl-$OPENSSL_VER + echo "Compiling OpenSSL $OPENSSL_VER..." + ./config shared --prefix=$mypath/ssl + echo "Running make for OpenSSL..." + make -j$cpucount -s + echo "Running make install for OpenSSL..." + make install > /dev/null + export LD_LIBRARY_PATH=~/ssl/lib + cd ~ -# Compile latest Python -PYTHON_VER=3.7.3 -wget https://www.python.org/ftp/python/$PYTHON_VER/Python-$PYTHON_VER.tar.xz -echo "Extracting Python..." -tar xf Python-$PYTHON_VER.tar.xz -cd Python-$PYTHON_VER -echo "Compiling Python $PYTHON_VER..." -./configure --with-openssl=$mypath/ssl --enable-shared \ + # Compile latest Python + PYTHON_VER=3.7.3 + wget https://www.python.org/ftp/python/$PYTHON_VER/Python-$PYTHON_VER.tar.xz + echo "Extracting Python..." + tar xf Python-$PYTHON_VER.tar.xz + cd Python-$PYTHON_VER + echo "Compiling Python $PYTHON_VER..." + ./configure --with-openssl=$mypath/ssl --enable-shared \ --prefix=$mypath/python --with-ensurepip=upgrade > /dev/null -make -j$cpucount -s -echo "Installing Python..." -make install > /dev/null -cd ~ + make -j$cpucount -s + echo "Installing Python..." + make install > /dev/null + cd ~ -export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib -python=~/python/bin/python3 -pip=~/python/bin/pip3 + export LD_LIBRARY_PATH=~/ssl/lib:~/python/lib + python=~/python/bin/python3 + pip=~/python/bin/pip3 -$python -V + $python -V -if [[ "$dist" == "xenial" ]]; then - echo "Installing deps for StaticX..." - sudo apt-get install --yes patchelf scons musl - $pip install git+https://github.com/JonathonReinhart/staticx.git@master + if [[ "$dist" == "xenial" ]]; then + echo "Installing deps for StaticX..." + sudo apt-get install --yes patchelf scons musl + $pip install git+https://github.com/JonathonReinhart/staticx.git@master + fi + cd $whereibelong fi -cd $whereibelong - echo "Upgrading pip packages..." $pip freeze > upgrades.txt $pip install --upgrade -r upgrades.txt $pip install -r src/requirements.txt $pip install pyinstaller - -cd $whereibelong