-
Notifications
You must be signed in to change notification settings - Fork 7
84 lines (72 loc) · 2.2 KB
/
python_builder.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: python-builder
on:
workflow_dispatch:
inputs:
variant:
type: choice
description: Please select a python build variant
default: python-shared
required: true
options:
- python-shared
- python-shared-tiny
- python-shared-ext
- python-shared-pkg
- python-static
- python-static-tiny
- python-framework
- python-framework-ext
- python-framework-pkg
- python-relocatable
py_version:
type: choice
description: Please select a python version
default: '3.11'
required: true
options:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
env:
arch: darwin-x86
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: '0'
- uses: benjlevesque/[email protected]
id: short-sha
with:
length: 7
- name: Cache downloads
id: cache-downloads
uses: actions/cache@v3
env:
cache-name: pyjs-cache-1
with:
path: |
source/projects/py/targets/build/downloads
source/projects/py/targets/build/lib/bzip2
source/projects/py/targets/build/lib/openssl
source/projects/py/targets/build/lib/xz
key: $${{ env.cache-name }}-${{ hashFiles('source/projects/py/resources/pyjs-dependencies.txt') }}
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ github.event.inputs.py_version }}
cache: 'pip' # caching pip dependencies
- name: install python requirements
run: pip install -r requirements.txt
- name: Display python version
run: python3 --version
- name: Build python variant
run: make ${{ github.event.inputs.variant }}
- uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-${{ github.event.inputs.variant }}-${{ env.arch }}-${{ github.event.inputs.py_version }}-${{ steps.short-sha.outputs.sha }}
path: "source/projects/py/targets/build/lib/${{ github.event.inputs.variant }}"