Skip to content

build python for linux x64 #7

build python for linux x64

build python for linux x64 #7

Workflow file for this run

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
steps:
- name: checkout python
uses: actions/checkout@v4
with:
repository: python/cpython
path: cpython
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 cpython
mkdir $(pwd)/build
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
sudo ln /usr/bin/llvm-ar-18 /usr/bin/llvm-ar
CC=clang-18 CXX=clang-18++ ./configure --enable-optimizations --with-lto --prefix=$(pwd)/build ${{ github.event.inputs.flags }}
make -s -j4
make install
- name: zip
run:
ls
zip -r python-${{ github.event.inputs.py_commit }}-built.zip build
- 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