Skip to content

Commit 7e475d1

Browse files
committed
fml
1 parent 169320e commit 7e475d1

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

.github/workflows/macBuild.yaml

+40-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build python for macos arm
1+
name: build python for linux x64
22

33
on:
44
workflow_dispatch:
@@ -7,38 +7,64 @@ on:
77
description: "commit to checkout python to"
88
required: true
99
type: string
10+
flags:
11+
description: "flags to configure with"
12+
default: ""
13+
required: false
14+
type: string
15+
16+
permissions:
17+
contents: write
1018

1119
jobs:
1220
build:
1321
runs-on: macos-latest
22+
env:
23+
WF_PY_DIR: ${{ github.workspace }}/cpython
24+
WF_BUILD_DIR: ${{ github.workspace }}/cpython/build
25+
WF_ZIPFILE: ${{ github.workspace }}/cpython/python-${{ github.event.inputs.py_commit }}-built.zip
1426
steps:
27+
- name: set env
28+
run: |
29+
echo "RLNAME=${{ github.event.inputs.py_commit }}-$(date +'%s')" >> $GITHUB_ENV
30+
31+
- name: test
32+
run: echo "rl ${RLNAME}"
33+
1534
- name: checkout python
1635
uses: actions/checkout@v4
1736
with:
1837
repository: python/cpython
1938
path: cpython
2039
ref: ${{ github.event.inputs.py_commit }}
2140

22-
- name: compile
41+
- name: install dependencies
2342
run: |
24-
cd cpython
25-
mkdir $(pwd)/build
26-
brew install zip
43+
cd $WF_PY_DIR
44+
mkdir ${WF_BUILD_DIR}
45+
echo "zipfile: ${WF_ZIPFILE}"
2746
# sudo apt-get install build-essential gdb lcov pkg-config \
2847
# libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
2948
# libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
30-
# lzma lzma-dev tk-dev uuid-dev zlib1g-dev libmpdec-dev zip
31-
./configure --prefix=$(pwd)/build
49+
# lzma lzma-dev tk-dev uuid-dev zlib1g-dev libmpdec-dev zip \
50+
# llvm clang
51+
brew install zip
52+
53+
- name: compile
54+
run: |
55+
cd $WF_PY_DIR
56+
./configure --prefix=${WF_BUILD_DIR} ${{ github.event.inputs.flags }}
3257
make -s -j3
3358
make install
3459
3560
- name: zip
36-
run:
37-
ls
38-
zip -r python-${{ github.event.inputs.py_commit }}-built.zip build
61+
run: |
62+
ls ${WF_BUILD_DIR}
63+
zip -r ${WF_ZIPFILE} ${WF_BUILD_DIR}
3964
4065
- name: upload
41-
uses: actions/upload-artifact@v2
42-
with:
43-
name: python-${{ github.event.inputs.py_commit }}-built.zip
44-
path: ./python-${{ github.event.inputs.py_commit }}-built.zip
66+
env:
67+
GH_TOKEN: ${{ github.token }}
68+
run: |
69+
gh release create ${RLNAME} -R TbhLovers/PythonBuilds --notes hi
70+
gh release upload ${RLNAME} ${WF_ZIPFILE} -R TbhLovers/PythonBuilds

0 commit comments

Comments
 (0)