forked from mu-editor/mu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (65 loc) · 3.26 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
# Travis can building for Linux (Ubuntu 14.04 x64) and OS X (El Capitan)
matrix:
include:
- os: linux
dist: trusty
sudo: required
language: generic
# To maximise compatibility pick earliest image, 10.9 to be removed on 20/01/2017
- os: osx
osx_image: beta-xcode6.1
sudo: required
language: generic
before_install:
# OS and default Python info
- uname -a
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sw_vers; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then python3 -c "import sys; print(sys.executable)"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo python3 -c "import sys; print(sys.executable)"; fi
install:
# Python 3 and pip 3 installation are OS dependent
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash package/install_osx.sh; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then bash package/install_linux.sh; fi
# Install Mu dependencies (PyQt & QScintilla will be absorbed in requirements.txt once ready)
- sudo pip3 install -r requirements.txt
- sudo pip3 install PyQt5
- sudo pip3 install QScintilla
# Install packaging dependencies, macOS depends on update not yet released https://github.com/pyinstaller/pyinstaller/pull/1965
- sudo pip3 install git+git://github.com/pyinstaller/pyinstaller.git@483c819d6a256b58db6740696a901bd41c313f0c
# 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)"
- pip3 --version
- sudo pip3 --version
- pip3 freeze
- python3 -c "import PyQt5"
- python3 -c "import PyQt5.Qsci"
script:
# Run the tests, at the moment there is a segmentation fault on Linux, this will go away with Py3.5
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make check; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make clean; fi
# Package it
- pyinstaller package/pyinstaller.spec
- du -sk dist/
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then mv dist/mu dist/mu_$(date '+%Y-%m-%d_%H_%M')_${TRAVIS_BRANCH}_${TRAVIS_COMMIT:0:7}.bin; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd dist && zip --symlinks -r mu_$(date '+%Y-%m-%d_%H_%M')_${TRAVIS_BRANCH}_${TRAVIS_COMMIT:0:7}.zip mu.app && rm -r mu.app && rm mu && cd ..; 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: ardublockly-builds
skip_cleanup: true
local-dir: dist/
upload-dir: microbit/$TRAVIS_OS_NAME
acl: public_read
on:
repo: mu-editor/mu
branch: [master]
notifications:
email:
on_success: change
on_failure: change