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