Skip to content

Commit

Permalink
Move CI build from Travis to GitHub Actions.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carlosperate committed Nov 29, 2019
1 parent 601cc79 commit f1e7948
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 49 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Python

on:
push:
branches:
- '*'

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
# OS info
- run: uname -a && sw_vers
# We need to ensure openSSL is available
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl
- run: brew list --versions openssl
- run: OPEN_SSL_DIR=$(brew --prefix openssl) && echo $OPEN_SSL_DIR
#- run: "$OPEN_SSL_DIR/bin/openssl" version
# Download, build Python, and upload it
- run: sh build_python.sh
- run: mkdir upload
- run: tar czf upload/python3-full.tar.gz python/
- uses: actions/upload-artifact@v1
with:
name: python3-full
path: ./upload/python3-full.tar.gz
# Check built Python
- run: du -sk python/
- run: cp ./python/bin/python3.7 ./python/bin/python3
- run: otool -L python/bin/python3
- run: ./python/bin/python3 -c 'import ssl; print(ssl.OPENSSL_VERSION)'
- run: otool -L python/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so
- run: ./python/bin/python3 -m pip --version
# Reduce built Python and upload it
- run: python process_python_build.py python/
- run: echo "Python 3.7.5" >> python/version.txt
- run: tar czf upload/python3-reduced.tar.gz python/
- uses: actions/upload-artifact@v1
with:
name: python3-reduced
path: ./upload/python3-reduced.tar.gz
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
*.swp
python/*
Python-3*/*

# OS X
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

0 comments on commit f1e7948

Please sign in to comment.