forked from mu-editor/mu
/
.travis.yml
90 lines (83 loc) · 3.7 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Travis can building for Linux and macOS
matrix:
include:
# To maximise compatibility pick earliest image, Ubuntu 14.04.5 x64
- os: linux
dist: trusty
sudo: required
language: python
python: 3.5
- os: linux
dist: trusty
sudo: required
language: python
python: 3.6
# To maximise compatibility pick earliest image, OS X 10.10 Yosemite
- os: osx
osx_image: xcode6.4
sudo: required
language: generic
before_install:
# OS and default Python info
- uname -a
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sw_vers; fi
# Python 3 and pip 3 installation required in macOS
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash package/install_osx.sh; fi
# Linux needs to install pip again to have pip3 for the right Python version
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then bash package/install_pip3.sh; fi
# Check everything was correctly installed
- echo $PATH
- python3 --version
- python3 -c "import struct; print(struct.calcsize('P') * 8)"
- python3 -c "import sys; print(sys.executable)"
- python3 -m pip --version
- pip3 --version
- pip3 install virtualenv
- virtualenv venv --python=python3
- source venv/bin/activate
install:
# Install Mu dependencies
- pip3 install -r requirements.txt
# Install packager for OSX
- pip3 install briefcase
# Install disk image maker for OSX
- pip3 install dmgbuild
# Install helpful pytest plug-in
- pip3 install pytest-faulthandler
# Check everything was correctly installed
- pip3 freeze
script:
# Run the tests
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make check; fi
# PyQt crashes without a frame buffer, so Linux needs "X Virtual Framebuffer"
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run make check; fi
- make clean
# Package it for OSX
#- if [ "$TRAVIS_OS_NAME" = "osx" ]; then echo "[install]" >> setup.cfg; echo "prefix=" >> setup.cfg; fi
#- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sudo mkdir -p /lib/python3.6/site-packages/; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 setup.py macos --support-pkg=https://github.com/mu-editor/mu_portable_python_macos/releases/download/0.0.2/python3-reduced.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 package/osx_adjustments.py; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mkdir dist; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then dmgbuild -s package/dmg_settings.py "Mu Editor" dist/mu-editor.dmg; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then du -sk dist/; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then mv dist/mu-editor.dmg dist/mu-editor_$(date '+%Y-%m-%d_%H_%M')_${TRAVIS_BRANCH}_${TRAVIS_COMMIT:0:7}.dmg; fi
# Deploy the build version in an S3 bucket
deploy:
provider: s3
access_key_id: AKIAJYJV7NN6HVHCX5NQ
secret_access_key:
secure: QHLfRUdFQX+TejhRBkgNvySkaQOskXji+iduIvKRtzvvhyr3QJHKcMNtO426GRFyKhz6sK3shqn4d5iu/m03gtbv+u1pL9pp0J2GEePzQVP8v24q9Y3oxaXaA7Tm7L2vSIrB7uhJvG5D9H0bVL9my61JvXhvySH47jLvhqHH4F9LdPzby1DXds1Z+R4YNMKE0Z4KmNOhiBHkmKdDcp61fZ91gGiScFIjaXvDb50zdGKjXTQy2t4OtFt4kVbTZWijzxKPCSLZkErfcdNNrCNeMEktk6IEV2KVru9XhDNzzslWwwsR1r2hQI39oVULa3fYXK6W7am8WXVZ6cnJB+yBsNWro3Tp5oiNCWSe6fKDEp+Io+qyhZ+R5PSdzhyRYPUHPCIY/fP/dap/4M/MAO3hZFA3mxjK/vUOc6mtMD/wTE659K4/i7PNYtKFndXXpLpYHHaTis44NLZFIxvs9wWG/ljToYDDK20vG317k5TZUZB/6EipW1DeoO/9qBUxgTdfJypp58kcZNvntUVa4ezf/Bx01ZCMFAk234l7+xAFYI7+m9ITqAPlKWI230Ki5ShzyV+kYcI/GS9cT75iok6+zIWWfyQhKUMDYZ1qb/UDM5Gz9RXoIah0UJTjFd4b3bO6Awdrs2V5Vv2EgMWuKDaHs1s3uONH+PGTluROuqFju/s=
bucket: mu-builds
region: eu-west-2
skip_cleanup: true
local-dir: dist/
upload-dir: $TRAVIS_OS_NAME
acl: public_read
on:
repo: mu-editor/mu
branch: [master]
condition: $TRAVIS_OS_NAME = "osx"
notifications:
email:
on_success: change
on_failure: change