-
-
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
11 changed files
with
426 additions
and
242 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
Oops, something went wrong.