-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.69 KB
/
build.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
name: build python for linux x64
on:
workflow_dispatch:
inputs:
py_commit:
description: "commit to checkout python to"
required: true
type: string
flags:
description: "flags to compile with"
default: ""
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
env:
WF_PY_DIR: ${{ github.workspace }}/cpython
WF_BUILD_DIR: ${{ github.workspace }}/cpython/build
steps:
- name: checkout python
uses: actions/checkout@v4
with:
repository: python/cpython
path: $WF_PY_DIR
ref: ${{ github.event.inputs.py_commit }}
- name: install llvm
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
- name: compile
run: |
cd $WF_PY_DIR
mkdir ${WF_BUILD_DIR}
sudo apt-get install build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev libmpdec-dev zip
./configure --enable-optimizations --with-lto --prefix=${WF_BUILD_DIR} ${{ github.event.inputs.flags }}
make -s -j4
make install
- name: zip
run: |
ls ${WF_BUILD_DIR}
zip -r python-${{ github.event.inputs.py_commit }}-built.zip ${WF_BUILD_DIR}
- name: upload
uses: actions/upload-artifact@v2
with:
name: python-${{ github.event.inputs.py_commit }}-built.zip
path: ./python-${{ github.event.inputs.py_commit }}-built.zip