Skip to content

Commit

Permalink
WiP: Publishing manylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
corey committed Jan 20, 2024
1 parent 56fcb19 commit 8199c5c
Showing 1 changed file with 60 additions and 18 deletions.
78 changes: 60 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS_FOR_RELEASE) }}
needs: [lock_master]
runs-on: ubuntu-latest
container:
Expand All @@ -140,27 +140,69 @@ jobs:
rustc --version
cargo --version
# TODO: For now use pre-installed python version.
# In future, will probably want to download latest version
- name: Set Python Version (3.7 Path)
if: ${{ matrix.python-version == 3.7 }}
- name: Install Newer OpenSSL
run: |
PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g")
echo $PYVER
PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER\m/bin
echo $PATH_TO_PY
echo "$PATH_TO_PY" >> $GITHUB_PATH
- name: Set Python Version
if: ${{ matrix.python-version != 3.7 }}
curl -O https://www.openssl.org/source/openssl-1.1.1l.tar.gz
tar zxf openssl-1.1.1l.tar.gz
cd openssl-1.1.1l
./config
make
make install
- name: Install Python
run: |
PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g")
echo $PYVER
PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER/bin
echo $PATH_TO_PY
echo "$PATH_TO_PY" >> $GITHUB_PATH
curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-$PY_VER.tgz
tar zxf Python-${{ matrix.python-version }}.tgz
cd Python-${{ matrix.python-version }}
./configure --with-openssl=/openssl-1.1.1l --prefix=/root/python --enable-optimizations --enable-shared
make altinstall
- name: Update LD_LIBRARY_PATH
run: |
echo $LD_LIBRARY_PATH
echo "LD_LIBRARY_PATH=/Python-${{ matrix.python-version }}:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Check LD_LIBRARY_PATH
run: |
echo $LD_LIBRARY_PATH
- name: Alias Python and Pip binaries
run: |
IFS='.' read -r -a SPLIT_VER <<< ${{ matrix.python-version }}
M_VER=${SPLIT_VER[0]}.${SPLIT_VER[1]}
echo $M_VER
ls /root/python/bin
ln -s /root/python/bin/python$M_VER /root/python/bin/python
ln -s /root/python/bin/pip$M_VER /root/python/bin/pip
ls /root/python/bin
- name: Update $PATH
run: |
echo /root/python/bin >> $GITHUB_PATH
# # TODO: For now use pre-installed python version.
# # In future, will probably want to download latest version
# - name: Set Python Version (3.7 Path)
# if: ${{ matrix.python-version == 3.7 }}
# run: |
# PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g")
# echo $PYVER
# PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER\m/bin
# echo $PATH_TO_PY
# echo "$PATH_TO_PY" >> $GITHUB_PATH
# - name: Set Python Version
# if: ${{ matrix.python-version != 3.7 }}
# run: |
# PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g")
# echo $PYVER
# PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER/bin
# echo $PATH_TO_PY
# echo "$PATH_TO_PY" >> $GITHUB_PATH

- name: Display Python Version
run:
which python
which pip
python --version
pip --version

Expand Down Expand Up @@ -246,7 +288,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS_FOR_RELEASE) }}
needs: [lock_master]

runs-on: windows-latest
Expand Down

0 comments on commit 8199c5c

Please sign in to comment.