-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
291 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish support package | ||
|
||
on: | ||
release: | ||
types: published | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python environment | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.X" | ||
- name: Set build variables | ||
env: | ||
TAG_NAME: ${{ github.ref }} | ||
run: | | ||
export TAG=$(basename $TAG_NAME) | ||
echo "TAG=${TAG}" | ||
export TAG_VERSION="${TAG%-*}" | ||
export TAG_BUILD="${TAG#*-}" | ||
echo "PY_VERSION=${TAG_VERSION}" | ||
echo "BUILD_NUMBER=${TAG_BUILD}" | ||
echo "::set-env name=TAG::${TAG}" | ||
echo "::set-env name=PY_VERSION::${TAG_VERSION}" | ||
echo "::set-env name=BUILD_NUMBER::${TAG_BUILD}" | ||
- name: Update Release Asset to S3 | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U setuptools | ||
python -m pip install awscli | ||
# macOS build | ||
curl -o macOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-macOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
aws s3 cp macOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/macOS/Python-${{ env.PY_VERSION }}-macOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
# iOS build | ||
curl -o iOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-iOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
aws s3 cp iOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/iOS/Python-${{ env.PY_VERSION }}-iOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
# tvOS build | ||
curl -o tvOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-tvOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
aws s3 cp tvOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/tvOS/Python-${{ env.PY_VERSION }}-tvOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
# watchOS build | ||
curl -o watchOS-artefact.tar.gz -L https://github.com/beeware/Python-Apple-support/releases/download/${{ env.TAG }}/Python-${{ env.PY_VERSION }}-watchOS-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
aws s3 cp watchOS-artefact.tar.gz s3://briefcase-support/python/${{ env.PY_VERSION }}/watchOS/Python-${{ env.PY_VERSION }}-watchOS-support.${{ env.BUILD_NUMBER }}.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# This is the DEV workflow. | ||
# Run this Action on creating a new tag matching "<version>-b<build>" | ||
# e.g., 3.7-b1 | ||
name: Build support package | ||
on: | ||
push: | ||
tags: | ||
- '*-b*' | ||
|
||
jobs: | ||
make-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set build variables | ||
env: | ||
TAG_NAME: ${{ github.ref }} | ||
run: | | ||
export TAG=$(basename $TAG_NAME) | ||
echo "TAG=${TAG}" | ||
export TAG_VERSION="${TAG%-*}" | ||
export TAG_BUILD="${TAG#*-}" | ||
echo "PY_VERSION=${TAG_VERSION}" | ||
echo "BUILD_NUMBER=${TAG_BUILD}" | ||
echo "::set-env name=TAG::${TAG}" | ||
echo "::set-env name=PY_VERSION::${TAG_VERSION}" | ||
echo "::set-env name=BUILD_NUMBER::${TAG_BUILD}" | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
body: | | ||
Build ${{ env.BUILD_NUMBER }} of the BeeWare support package for Python ${{ env.PY_VERSION }}. | ||
Includes: | ||
* Python ${{ env.PY_VERSION }}.? | ||
* ... | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
build: | ||
runs-on: macOS-latest | ||
needs: make-release | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
target: ['macOS', 'iOS', 'tvOS', 'watchOS'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set build variables | ||
env: | ||
TAG_NAME: ${{ github.ref }} | ||
run: | | ||
export TAG=$(basename $TAG_NAME) | ||
echo "TAG=${TAG}" | ||
export TAG_VERSION="${TAG%-*}" | ||
export TAG_BUILD="${TAG#*-}" | ||
echo "PY_VERSION=${TAG_VERSION}" | ||
echo "BUILD_NUMBER=${TAG_BUILD}" | ||
echo "::set-env name=TAG::${TAG}" | ||
echo "::set-env name=PY_VERSION::${TAG_VERSION}" | ||
echo "::set-env name=BUILD_NUMBER::${TAG_BUILD}" | ||
- name: Build ${{ matrix.target }} | ||
env: | ||
BUILD_NUMBER: ${{ env.BUILD_NUMBER }} | ||
run: | | ||
# 2020-05-29: The iOS 13.4 SDK changed the implementation of FD_SET | ||
# to use a weak linked symbol (__darwin_check_fd_set_overflow). | ||
# This means any support package built against that SDK is incompatible | ||
# with linking against an earlier SDK. | ||
# However, you can't get the iOS 13.4 SDK on macOS Mojave (10.14), | ||
# because the latest XCode supported on Mojave (11.3.1) only provided | ||
# SDK 13.2. | ||
# So: We force the use of XCode 11.3.1, which ships with the 13.2 SDK. | ||
# For a list of SDKs available on Github Actions, see: | ||
# https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md | ||
sudo xcode-select --switch /Applications/Xcode_11.3.1.app | ||
make -e ${{ matrix.target }} | ||
- name: Upload ${{ matrix.target }} release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.make-release.outputs.upload_url }} | ||
asset_path: ./dist/Python-${{ env.PY_VERSION }}-${{ matrix.target }}-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
asset_name: Python-${{ env.PY_VERSION }}-${{ matrix.target }}-support.${{ env.BUILD_NUMBER }}.tar.gz | ||
asset_content_type: application/gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This is a list of Python standard library path patterns | ||
# we exclude from the embedded device Python-Apple-support tarballs. | ||
# It is used by `tar -X` during the Makefile build. | ||
# | ||
# Remove binaries; not needed for | ||
Python/Resources/bin | ||
# Remove includes; use the version packaged in Headers | ||
Python/Resources/include | ||
# Remove the Resources version of libpython; | ||
# we use the version packaged at the root level | ||
Python/Resources/lib/libpython3.*.a | ||
# Remove lib/pkgconfig files. These are used for compiling C extension modules. | ||
Python/Resources/lib/pkgconfig | ||
# Remove standard library test suites. | ||
Python/Resources/lib/python*/ctypes/test | ||
Python/Resources/lib/python*/distutils/tests | ||
Python/Resources/lib/python*/lib2to3/tests | ||
Python/Resources/lib/python*/sqlite3/test | ||
Python/Resources/lib/python*/test | ||
# Remove compiled test and example modules. | ||
Python/Resources/lib/python*/lib-dynload/_test*.so | ||
Python/Resources/lib/python*/lib-dynload/_ctypes_test*.so | ||
Python/Resources/lib/python*/lib-dynload/xxlimited*.so | ||
Python/Resources/lib/python*/lib-dynload/_xxtestfuzz.so | ||
# Remove wsgiref web app module; it's unusual that mobile apps would | ||
# start a web app server with it. | ||
Python/Resources/lib/python*/wsgiref | ||
# Remove command-line curses toolkit. | ||
Python/Resources/lib/python*/curses | ||
# Remove config-* directory, which is used for compiling C extension modules. | ||
Python/Resources/lib/python*/config-* | ||
# Remove ensurepip. If user code needs pip, it can add it to | ||
Python/Resources/lib/python*/ensurepip | ||
# Remove Tcl/Tk GUI code. We don't build against Tcl/Tk at the moment, so this | ||
# will not work. | ||
Python/Resources/lib/python*/idlelib | ||
Python/Resources/lib/python*/tkinter | ||
Python/Resources/lib/python*/turtle.py | ||
Python/Resources/lib/python*/turtledemo | ||
# Remove site-packages directory. The template unpacks user code and | ||
# dependencies to a different path. | ||
Python/Resources/lib/python*/site-packages | ||
# Remove share/ directory, which contains user documentation (man pages). | ||
Python/Resources/share | ||
# Remove pyc files. These take up space, but since most stdlib modules are | ||
# never imported by user code, they mostly have no value. | ||
Python/Resources/*/*.pyc |
Oops, something went wrong.