From 4ca0277e6389a01e22314fa95f3649fe977ab586 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Mon, 6 May 2019 11:37:41 -0400 Subject: [PATCH] split out build vs test some more --- .travis.yml | 8 ++-- src/travis/linux-x86_64-before-install.sh | 2 +- src/travis/linux-x86_64-install.sh | 48 ++++++++++++----------- src/travis/osx-x86_64-install.sh | 3 +- src/travis/windows-x86-install.sh | 5 ++- src/travis/windows-x86_64-install.sh | 5 ++- 6 files changed, 39 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3caee9b..e5adc41e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,10 +96,10 @@ install: - source src/travis/$TRAVIS_OS_NAME-$PLATFORM-install.sh script: -- gam/gam version extended -- gam/gam version | grep "Python 3\.7\.3" # We should be building with Python 3.7.3 -- gam/gam version | grep travis # travis should be part of the path (not /tmp or such) -- gam/gam version extended | grep TLSv1\.[23] # We should support TLS 1.2 or 1.3 to Google +- $gam version extended +- $gam version | grep travis # travis should be part of the path (not /tmp or such) +- if [ "$VMTYPE" == "build" ]; then $gam version | grep "Python 3\.7\.3"; fi # We should be building with Python 3.7.3 +- if [ "$VMTYPE" == "build" ]; then $gam version extended | grep TLSv1\.[23]; fi # Builds should support TLS 1.2 or 1.3 to Google before_deploy: - export TRAVIS_TAG="preview" diff --git a/src/travis/linux-x86_64-before-install.sh b/src/travis/linux-x86_64-before-install.sh index a731445e..6538959d 100755 --- a/src/travis/linux-x86_64-before-install.sh +++ b/src/travis/linux-x86_64-before-install.sh @@ -68,6 +68,7 @@ else sudo apt-get install --yes patchelf scons musl $pip install git+https://github.com/JonathonReinhart/staticx.git@master fi + $pip install pyinstaller cd $whereibelong fi @@ -75,4 +76,3 @@ echo "Upgrading pip packages..." $pip freeze > upgrades.txt $pip install --upgrade -r upgrades.txt $pip install -r src/requirements.txt -$pip install pyinstaller diff --git a/src/travis/linux-x86_64-install.sh b/src/travis/linux-x86_64-install.sh index 4584eb6e..aec55d3c 100755 --- a/src/travis/linux-x86_64-install.sh +++ b/src/travis/linux-x86_64-install.sh @@ -1,25 +1,29 @@ cd src -$python -OO -m PyInstaller --clean --debug -F --distpath=gam $GAMOS-gam.spec -gam/gam version extended -export GAMVERSION=`gam/gam version simple` -cp LICENSE gam -cp whatsnew.txt gam -cp GamCommands.txt gam -this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}') -GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-glibc$this_glibc_ver.tar.xz -tar cfJ $GAM_ARCHIVE gam/ -echo "PyInstaller GAM info:" -du -h gam/gam -time gam/gam version extended - -if [[ "$dist" == "xenial" ]]; then - GAM_LEGACY_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-legacy.tar.xz - $python -OO -m staticx gam/gam gam/gam-staticx - strip gam/gam-staticx - rm gam/gam - mv gam/gam-staticx gam/gam - tar cfJ $GAM_LEGACY_ARCHIVE gam/ - echo "Legacy StaticX GAM info:" +if [ "$VMTYPE" == "test" ]; then + export gam="$python gam.py" +else + $python -OO -m PyInstaller --clean --debug -F --distpath=gam $GAMOS-gam.spec + export gam="gam/gam" + export GAMVERSION=`$gam version simple` + cp LICENSE gam + cp whatsnew.txt gam + cp GamCommands.txt gam + this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}') + GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-glibc$this_glibc_ver.tar.xz + tar cfJ $GAM_ARCHIVE gam/ + echo "PyInstaller GAM info:" du -h gam/gam - time gam/gam version extended + time $gam version extended + + if [[ "$dist" == "xenial" ]]; then + GAM_LEGACY_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-legacy.tar.xz + $python -OO -m staticx gam/gam gam/gam-staticx + strip gam/gam-staticx + rm gam/gam + mv gam/gam-staticx gam/gam + tar cfJ $GAM_LEGACY_ARCHIVE gam/ + echo "Legacy StaticX GAM info:" + du -h gam/gam + time $gam version extended + fi fi diff --git a/src/travis/osx-x86_64-install.sh b/src/travis/osx-x86_64-install.sh index 22d32d3c..ef8d0d4f 100755 --- a/src/travis/osx-x86_64-install.sh +++ b/src/travis/osx-x86_64-install.sh @@ -1,6 +1,7 @@ cd src $python -OO -m PyInstaller --clean --debug -F --distpath=gam $GAMOS-gam.spec -gam/gam version +export gam="gam/gam" +$gam version extended export GAMVERSION=`gam/gam version simple` cp LICENSE gam cp whatsnew.txt gam diff --git a/src/travis/windows-x86-install.sh b/src/travis/windows-x86-install.sh index 32cd4bc4..1309d63f 100755 --- a/src/travis/windows-x86-install.sh +++ b/src/travis/windows-x86-install.sh @@ -1,7 +1,8 @@ cd src pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec -gam/gam version -export GAMVERSION=`gam/gam version simple` +export gam="gam/gam" +$gam version extended +export GAMVERSION=`$gam version simple` cp LICENSE gam cp GamCommands.txt gam cp whatsnew.txt gam diff --git a/src/travis/windows-x86_64-install.sh b/src/travis/windows-x86_64-install.sh index 29714249..d0a2be3a 100755 --- a/src/travis/windows-x86_64-install.sh +++ b/src/travis/windows-x86_64-install.sh @@ -1,7 +1,8 @@ cd src pyinstaller --clean -F --distpath=gam $GAMOS-gam.spec -gam/gam version -export GAMVERSION=`gam/gam version simple` +export gam="gam/gam" +$gam version +export GAMVERSION=`$gam version simple` cp LICENSE gam cp GamCommands.txt gam cp whatsnew.txt gam