Build Python 3.11.8 (32-bit) #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Python 3.11.8 (32-bit) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
zlib1g-dev \ | |
libncurses5-dev \ | |
libgdbm-dev \ | |
libnss3-dev \ | |
libssl-dev \ | |
libreadline-dev \ | |
libffi-dev \ | |
wget \ | |
curl \ | |
libbz2-dev \ | |
libsqlite3-dev \ | |
liblzma-dev | |
- name: Download Python 3.11.8 source | |
run: | | |
wget https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz | |
tar -xf Python-3.11.8.tgz | |
- name: Configure and build Python 3.11.8 (32-bit) | |
run: | | |
cd Python-3.11.8 | |
sudo CFLAGS="-m32" LDFLAGS="-m32" ./configure --prefix=/usr/local/python-3.11.8 --enable-optimizations | |
make -j$(nproc) | |
sudo make altinstall | |
- name: Verify installation | |
run: | | |
/usr/local/python-3.11.8/bin/python3.11 --version | |
file /usr/local/python-3.11.8/bin/python3.11 | |
/usr/local/python-3.11.8/bin/python3.11 -c "import hashlib" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-3.11.8-32bit | |
path: /usr/local/python-3.11.8 |