-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.83 KB
/
build.yml
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
name: Build
on:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.13-dev']
build-host:
- 'arm64-apple-ios'
- 'arm64-apple-ios-simulator'
- 'x86_64-apple-ios-simulator'
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: py
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Download Python ${{ matrix.python-version }} source code
run: |
curl -o Python.tgz $(python ./geturl.py)
tar -xzf Python.tgz
- name: Add iOS/Resources/bin to PATH
working-directory: Python-${{ steps.py.outputs.python-version }}
run: |
echo "${{ github.workspace }}/Python/iOS/Resources/bin" >> $GITHUB_PATH
- name: Configure
working-directory: Python-${{ steps.py.outputs.python-version }}
run: >
./configure
--enable-framework="./iOS/Frameworks/main/"
--host=${{ matrix.build-host }}
--build=arm64-apple-darwin
--with-build-python="${{ steps.py.outputs.python-path }}"
- name: Build Python.framework
working-directory: Python-${{ steps.py.outputs.python-version }}
run: |
make
make install
- name: Create an archive
working-directory: Python-${{ steps.py.outputs.python-version }}
run: >
tar -czf
./iOS/Frameworks/dist/Python.framework.tar.gz
./iOS/Frameworks/dist/Python.framework