Skip to content

Commit 7c94895

Browse files
authored
Merge pull request #191 from beeware/framework-lib
Switch to a framework-based approach for building support packages.
2 parents 62237a5 + 8a0cd42 commit 7c94895

18 files changed

+2218
-2605
lines changed

.github/workflows/ci.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
5+
env:
6+
FORCE_COLOR: "1"
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
# Cancel active CI runs for a PR before starting another run
13+
concurrency:
14+
group: ${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: macOS-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
target: ['macOS', 'iOS', 'tvOS', 'watchOS']
24+
include:
25+
- briefcase-run-args:
26+
- run-tests: false
27+
28+
- target: macOS
29+
run-tests: true
30+
31+
- target: iOS
32+
briefcase-run-args: ' -d "iPhone SE (3rd generation)"'
33+
run-tests: true
34+
35+
steps:
36+
- uses: actions/[email protected]
37+
38+
- name: Extract config variables
39+
id: config-vars
40+
run: |
41+
PYTHON_VER=$(make config | grep "PYTHON_VER=" | cut -d "=" -f 2)
42+
echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT}
43+
44+
- name: Set up Python
45+
uses: actions/[email protected]
46+
with:
47+
# Appending -dev ensures that we can always build the dev release.
48+
# It's a no-op for versions that have been published.
49+
python-version: ${{ steps.config-vars.outputs.PYTHON_VER }}-dev
50+
51+
- name: Build ${{ matrix.target }}
52+
run: |
53+
# Do the build for the requested target.
54+
make ${{ matrix.target }}
55+
56+
- name: Upload build artefacts
57+
uses: actions/[email protected]
58+
with:
59+
name: Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz
60+
path: dist/Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz
61+
62+
- uses: actions/[email protected]
63+
if: matrix.run-tests
64+
with:
65+
repository: beeware/Python-support-testbed
66+
path: Python-support-testbed
67+
# TODO - remove the py3.13 reference option.
68+
ref: py3.13-support
69+
70+
- name: Install dependencies
71+
if: matrix.run-tests
72+
run: |
73+
# TODO - Revert to the development version of Briefcase
74+
# Use the development version of Briefcase
75+
# python -m pip install git+https://github.com/beeware/briefcase.git
76+
python -m pip install git+https://github.com/freakboy3742/briefcase.git@version-bumps
77+
78+
- name: Run support testbed check
79+
if: matrix.run-tests
80+
timeout-minutes: 10
81+
working-directory: Python-support-testbed
82+
# TODO - remove the template_branch option.
83+
run: briefcase run ${{ matrix.target }} Xcode --test ${{ matrix.briefcase-run-args }} -C support_package=\'../dist/Python-${{ steps.config-vars.outputs.PYTHON_VER }}-${{ matrix.target }}-support.custom.tar.gz\' -C template_branch=\'framework-lib\'

.github/workflows/publish.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,13 @@ jobs:
2020
env:
2121
TAG_NAME: ${{ github.ref }}
2222
run: |
23-
export TAG=$(basename $TAG_NAME)
24-
echo "TAG=${TAG}"
25-
export PYTHON_VER="${TAG%-*}"
26-
export BUILD_NUMBER="${TAG#*-}"
23+
TAG=$(basename $TAG_NAME)
24+
PYTHON_VER="${TAG%-*}"
25+
BUILD_NUMBER="${TAG#*-}"
2726
28-
echo "PYTHON_VER=${PYTHON_VER}"
29-
echo "BUILD_NUMBER=${BUILD_NUMBER}"
30-
31-
echo "TAG=${TAG}" >> ${GITHUB_OUTPUT}
32-
echo "PYTHON_VER=${PYTHON_VER}" >> ${GITHUB_OUTPUT}
33-
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> ${GITHUB_OUTPUT}
27+
echo "TAG=${TAG}" | tee -a ${GITHUB_OUTPUT}
28+
echo "PYTHON_VER=${PYTHON_VER}" | tee -a ${GITHUB_OUTPUT}
29+
echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a ${GITHUB_OUTPUT}
3430
3531
- name: Update Release Asset to S3
3632
env:

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ jobs:
5353
- name: Extract Version Details
5454
id: version-details
5555
run: |
56-
export PYTHON_VERSION=$(grep "Python version:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 3)
57-
export BZIP2_VERSION=$(grep "BZip2:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
58-
export XZ_VERSION=$(grep "XZ:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
59-
export OPENSSL_VERSION=$(grep "OpenSSL:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
60-
export LIBFFI_VERSION=$(grep "libFFI:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
56+
PYTHON_VERSION=$(grep "Python version:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 3)
57+
BZIP2_VERSION=$(grep "BZip2:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
58+
XZ_VERSION=$(grep "XZ:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
59+
OPENSSL_VERSION=$(grep "OpenSSL:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
60+
LIBFFI_VERSION=$(grep "libFFI:" support/${{ steps.build-vars.outputs.PYTHON_VER }}/${{ matrix.target }}/VERSIONS | cut -d " " -f 2)
6161
6262
echo "PYTHON_VERSION=${PYTHON_VERSION}" | tee -a ${GITHUB_OUTPUT}
6363
echo "BZIP2_VERSION=${BZIP2_VERSION}" | tee -a ${GITHUB_OUTPUT}

0 commit comments

Comments
 (0)