Skip to content

Commit f1e7948

Browse files
committed
Move CI build from Travis to GitHub Actions.
Travis doesn't offer a way to upload artefacts without setting up secure tokens to sign into other services like AWS. We've been using transfer.sh to upload files and print a URL we can then find in the logs to download the files. GH Actions allows us to upload artefacts to GitHub in a very convinient way.
1 parent 601cc79 commit f1e7948

File tree

3 files changed

+55
-49
lines changed

3 files changed

+55
-49
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Python
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: macos-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
# OS info
14+
- run: uname -a && sw_vers
15+
# We need to ensure openSSL is available
16+
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl
17+
- run: brew list --versions openssl
18+
- run: OPEN_SSL_DIR=$(brew --prefix openssl) && echo $OPEN_SSL_DIR
19+
#- run: "$OPEN_SSL_DIR/bin/openssl" version
20+
# Download, build Python, and upload it
21+
- run: sh build_python.sh
22+
- run: mkdir upload
23+
- run: tar czf upload/python3-full.tar.gz python/
24+
- uses: actions/upload-artifact@v1
25+
with:
26+
name: python3-full
27+
path: ./upload/python3-full.tar.gz
28+
# Check built Python
29+
- run: du -sk python/
30+
- run: cp ./python/bin/python3.7 ./python/bin/python3
31+
- run: otool -L python/bin/python3
32+
- run: ./python/bin/python3 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
33+
- run: otool -L python/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so
34+
- run: ./python/bin/python3 -m pip --version
35+
# Reduce built Python and upload it
36+
- run: python process_python_build.py python/
37+
- run: echo "Python 3.7.5" >> python/version.txt
38+
- run: tar czf upload/python3-reduced.tar.gz python/
39+
- uses: actions/upload-artifact@v1
40+
with:
41+
name: python3-reduced
42+
path: ./upload/python3-reduced.tar.gz

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
*.swp
2+
python/*
3+
Python-3*/*
4+
5+
# OS X
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# Icon must end with two \r
11+
Icon
12+
13+
# Thumbnails
14+
._*

.travis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)