Travis-ci cache Python packages to reduce build time on macOS

[skip appveyor]
Not a great difference, but we are too close to 50' limit
Also reduce curl max time to avoid timouts.
For Linux buils remove --silent build to avoid the job being cancelled
This commit is contained in:
Ale Martinez
2020-06-25 15:19:12 -03:00
parent 5dd950c77b
commit e90eaf281f
4 changed files with 11 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ cache:
- $HOME/Library/Caches/Homebrew
- qwt
- D2XX
- site-packages
env:
global:

View File

@@ -2,5 +2,5 @@
set -ev
export PATH=/opt/qt514/bin:$PATH
qmake -recursive QMAKE_CXXFLAGS_WARN_ON+="-Wno-deprecated-declarations -Wno-unused-value" QMAKE_CFLAGS_WARN_ON+="-Wno-deprecated-declarations -Wno-unused-value"
make --silent -j4 || make
make -j4
exit

View File

@@ -21,10 +21,9 @@ OLD_PATH=`otool -L GoldenCheetah.app/Contents/Frameworks/Python.framework/Versio
echo $OLD_PATH
install_name_tool -change $OLD_PATH "@executable_path/../Python" GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/bin/python3.7
install_name_tool -change $OLD_PATH "@executable_path/../../../../Python" GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
# Add mandatory Python dependencies to site-packages
rm GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
mkdir GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
python3.7 -m pip install -r Python/requirements.txt -t GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
# Add mandatory Python dependencies
rm -r GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
cp -R ../site-packages GoldenCheetah.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7
# Initial deployment using macdeployqt
/usr/local/opt/qt5/bin/macdeployqt GoldenCheetah.app -verbose=2 -executable=GoldenCheetah.app/Contents/MacOS/GoldenCheetah
@@ -66,7 +65,7 @@ aws s3 rm s3://goldencheetah-binaries/MacOS --recursive # keep only the last one
aws s3 cp --acl public-read $FINAL_NAME s3://goldencheetah-binaries/MacOS/$FINAL_NAME
aws s3 cp --acl public-read GCversionMacOS.txt s3://goldencheetah-binaries/MacOS/GCversionMacOS.txt
else
curl --max-time 300 --upload-file $FINAL_NAME https://transfer.sh/$FINAL_NAME
curl --max-time 150 --upload-file $FINAL_NAME https://transfer.sh/$FINAL_NAME
fi
echo "Make sure we are back in the Travis build directory"

View File

@@ -1,6 +1,11 @@
#!/bin/bash
set -ev
# Python mandatory packages - refresh cache if folder is empty
if [ -z "$(ls -A site-packages)" ]; then
python3.7 -m pip install -r src/Python/requirements.txt -t site-packages
fi
# Python SIP
python3 --version
python3-config --prefix