mirror of https://github.com/KLayout/klayout.git
initial travis config for OSX
test script for klayout python binding build script w python3 filtering output to reduce log size (travis complains about >4Mb) Fixing exit code in macbuild Adding unit tests including long tests in ut_runner
This commit is contained in:
parent
904c19ebcb
commit
54fac962e0
|
|
@ -0,0 +1,49 @@
|
||||||
|
# qt app example with linux and mac: https://stackoverflow.com/questions/29721240/ci-for-qt-app-build-with-different-qt-versions
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.3beta
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL=""
|
||||||
|
|
||||||
|
# - os: osx
|
||||||
|
# osx_image: xcode8
|
||||||
|
# env:
|
||||||
|
# - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
|
||||||
|
|
||||||
|
# - os: osx
|
||||||
|
# osx_image: xcode8
|
||||||
|
# env:
|
||||||
|
# - MATRIX_EVAL="brew install gcc5 && CC=gcc-5 && CXX=g++-5"
|
||||||
|
|
||||||
|
# - os: osx
|
||||||
|
# osx_image: xcode8
|
||||||
|
# env:
|
||||||
|
# - MATRIX_EVAL="brew install gcc6 && CC=gcc-6 && CXX=g++-6"
|
||||||
|
|
||||||
|
# - os: osx
|
||||||
|
# osx_image: xcode8
|
||||||
|
# env:
|
||||||
|
# - MATRIX_EVAL="brew install gcc && CC=gcc-7 && CXX=g++-7"
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- eval "${MATRIX_EVAL}"
|
||||||
|
- brew update
|
||||||
|
- brew bundle
|
||||||
|
|
||||||
|
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:
|
||||||
|
- python3 build4mac.py -p B36 -q Qt5Brew -c
|
||||||
|
- source filter-clang.sh; python3 build4mac.py -p B36 -q Qt5Brew | filter
|
||||||
|
- python3 build4mac.py -p B36 -q Qt5Brew -y
|
||||||
|
- qt5.pkg.macos-HighSierra-release/klayout.app/Contents/MacOS/klayout -b -r test-pylib-script.py
|
||||||
|
- cd qt5.build.macos-HighSierra-release
|
||||||
|
- ln -s klayout.app/Contents/MacOS/klayout klayout
|
||||||
|
- export TESTTMP=testtmp # path to a directory that will hold temporary data (will be created)
|
||||||
|
- export TESTSRC=.. # path to the source directory
|
||||||
|
- ./ut_runner -h
|
||||||
|
- ./ut_runner -s
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
tap "homebrew/core"
|
||||||
|
brew "postgresql"
|
||||||
|
brew "mysql"
|
||||||
|
brew "python3"
|
||||||
|
brew "python@2", link: false
|
||||||
|
brew "qt"
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
filter () {
|
||||||
|
sed -E 's/^\/Applications\/Xcode.app\/Contents\/Developer\/Toolchains\/XcodeDefault\.xctoolchain\/usr\/bin\/clang\+\+ -c[[:space:]]+([^[:space:]]+[[:space:]]+)*/Compiling \1/'
|
||||||
|
}
|
||||||
|
|
@ -1012,8 +1012,6 @@ def main():
|
||||||
|
|
||||||
if not ret2 == 0:
|
if not ret2 == 0:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
#===================================================================================
|
#===================================================================================
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,20 @@ installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
|
||||||
for i in installed_packages])
|
for i in installed_packages])
|
||||||
print(installed_packages_list)
|
print(installed_packages_list)
|
||||||
|
|
||||||
|
def get_pip_main():
|
||||||
|
import pip
|
||||||
|
# check if pip version is new:
|
||||||
|
if int(pip.__version__.split('.')[0]) > 9:
|
||||||
|
from pip._internal import main
|
||||||
|
else:
|
||||||
|
from pip import main
|
||||||
|
return main
|
||||||
|
|
||||||
print("-------------")
|
print("-------------")
|
||||||
|
|
||||||
if pip.main(['install', '--upgrade', 'numpy']) > 0:
|
pipmain = get_pip_main()
|
||||||
|
|
||||||
|
if pipmain(['install', '--upgrade', 'numpy']) > 0:
|
||||||
exit(1)
|
exit(1)
|
||||||
print("-------------")
|
print("-------------")
|
||||||
|
|
||||||
|
|
@ -18,12 +29,11 @@ import numpy
|
||||||
print("-------------")
|
print("-------------")
|
||||||
|
|
||||||
|
|
||||||
import sys;
|
import sys
|
||||||
print("Executing from: ", sys.executable)
|
print("Executing from: ", sys.executable)
|
||||||
print("-------------")
|
print("-------------")
|
||||||
|
|
||||||
import os
|
import os
|
||||||
print("Environment variables:")
|
print("Environment variables:")
|
||||||
for variable, value in os.environ.items():
|
for variable, value in os.environ.items():
|
||||||
print(variable, ":", value)
|
print(variable, ":", value)
|
||||||
|
|
||||||
Loading…
Reference in New Issue