Build using Python 2 and Python3 in Travis

This commit is contained in:
Daniel Wang 2018-08-13 15:26:05 -04:00 committed by Thomas Ferreira de Lima
parent 28e703702f
commit 532df9faff
No known key found for this signature in database
GPG Key ID: 43E98870EAA0A86E
3 changed files with 56 additions and 9 deletions

View File

@ -1,24 +1,45 @@
matrix:
include:
# Python 3
- os: osx
osx_image: xcode9.4 # macOS 10.13
osx_image: xcode9.4 # macOS 10.13
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=B37
- MACOS_VERSION=HighSierra
- os: osx
osx_image: xcode8.3 # macOS 10.12
osx_image: xcode8.3 # macOS 10.12
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=B37
- MACOS_VERSION=Sierra
- os: osx
osx_image: xcode8 # macOS 10.11
osx_image: xcode8 # macOS 10.11
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=B37
- MACOS_VERSION=ElCapitan
# Python 2
- os: osx
osx_image: xcode9.4 # macOS 10.13
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=Sys
- MACOS_VERSION=HighSierra
- os: osx
osx_image: xcode8.3 # macOS 10.12
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=Sys
- MACOS_VERSION=Sierra
- os: osx
osx_image: xcode8 # macOS 10.11
env:
- MATRIX_EVAL=""
- PYTHON_VERSION=Sys
- MACOS_VERSION=ElCapitan
before_install:
- eval "${MATRIX_EVAL}"
- brew update
@ -30,11 +51,7 @@ install:
- git clone https://github.com/kristovatlas/osx-config-check
- cd osx-config-check ; python2.7 app.py --report-only --skip-sudo-checks ; cd ..
script:
- make build
- make deploy
- make test
- make dropbox-deploy
script: ./travis-build.sh
after_success:
- dropbox-deployment

View File

@ -14,7 +14,7 @@ help:
build:
./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew -c; \
source filter-clang.sh; ./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew | filter
./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew
deploy: build
./build4mac.py -p $(PYTHON_VERSION) -q Qt5Brew -y
@ -32,4 +32,5 @@ dropbox-deploy: test
cd ..; \
export gitcommit=$(git rev-parse --short HEAD); \
mkdir deploy; \
mv build.txt deploy; \
tar czf "deploy/qt5.pkg.macos-$(MACOS_VERSION)-release-$gitcommit.tar.gz" qt5.pkg.macos-$(MACOS_VERSION)-release

29
travis-build.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -e
export PING_SLEEP=30s
error_handler() {
echo ERROR: There was an error while building.
tail -500 build.txt
kill $PING_LOOP_PID
exit 1
}
trap 'error_handler' ERR
bash -c "while true; do echo -n '.'; sleep $PING_SLEEP; done" &
PING_LOOP_PID=$!
make build PYTHON_VERSION=B37 >> build.txt 2>&1
make deploy PYTHON_VERSION=B37 >> build.txt 2>&1
make test MACOS_VERSION=HighSierra >> build.txt 2>&1
make dropbox-deploy
tail -500 build.txt
echo "build finished"
kill $PING_LOOP_PID
exit 0