-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
49 lines (42 loc) · 1.47 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
# Travis can building for Linux and macOS
matrix:
include:
# 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
install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl
- PROJECT_DIR="$PWD"
- echo $PROJECT_DIR
- mkdir upload
script:
# Download and build Python
- cd "$PROJECT_DIR"
- sh build_python.sh
# Compress and upload it before touching it
- cd "$PROJECT_DIR"
- tar czf upload/python3-full.tar.gz python/
- curl --upload-file ./upload/python3-full.tar.gz https://transfer.sh/python3-full.tar.gz | tee -a output_urls.txt && echo "" >> output_urls.txt
# Check built Python
- cd "$PROJECT_DIR"
- du -sk python/
- cd python
- otool -L bin/python3.6
- cp ./bin/python3.6 ./bin/python3
- ./bin/python3 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
- ./bin/python3 -m pip --version
# Reduce stand-alone Python and upload it
- cd "$PROJECT_DIR"
- python process_python_build.py "$PROJECT_DIR/python"
- echo "Python 3.6.5" >> ./python/version.txt
- tar czf upload/python3-reduced.tar.gz python/
- curl --upload-file ./upload/python3-reduced.tar.gz https://transfer.sh/python3-reduced.tar.gz | tee -a output_urls.txt && echo "" >> output_urls.txt
# Print all uploaded files URLs
- cd "$PROJECT_DIR"
- cat output_urls.txt