Skip to content

Commit

Permalink
Update ubunutu-14.04 to Python 3.11.5 (#341)
Browse files Browse the repository at this point in the history
* Exclude test results from badges
* Build Python3.11 with SSL
* Fix python configuration prefix
* install ffi.h, which is required for python build
* Update comment to exclude ubuntu-14.04 for making badges
---------
Co-authored-by: lo-simon <[email protected]>
  • Loading branch information
jonathan-r-thorpe authored Sep 25, 2023
1 parent 9ebb3ae commit b5c8d2e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 15 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,25 @@ jobs:
apt-get --allow-unauthenticated install -y curl g++ git make patch zlib1g-dev libssl-dev bsdmainutils dnsutils unzip
# ubuntu-14.04 ca-certificates are out of date
git config --global http.sslVerify false
curl -sS https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz | tar -xJ
cd Python-3.6.9
./configure
# build and install openssl
curl -OsSk https://www.openssl.org/source/openssl-1.1.1v.tar.gz
tar xzf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl
make -j1 depend
make -j8
make install_sw
cd ..
# install ffi.h, which is required for python build
apt install libffi-dev
# build and install python
curl -sSk https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz | tar -xJ
cd Python-3.11.5
./configure -C --with-openssl=/usr/local/custom-openssl --with-openssl-rpath=auto
make -j8
make install
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.6 3
ln -s /usr/local/bin/python3.6 /usr/bin/python
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 3
ln -s /usr/local/bin/python3.11 /usr/bin/python
curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python
curl -sS https://nodejs.org/dist/v12.16.2/node-v12.16.2-linux-x64.tar.xz | tar -xJ
echo "`pwd`/node-v12.16.2-linux-x64/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -1063,8 +1075,8 @@ jobs:

- name: make badges
run: |
# combine badges from all builds, exclude macos-11
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-11
# combine badges from all builds, exclude macos-11 and ubuntu-14.04
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-11 ubuntu-14.04
# force push to github onto an orphan 'badges' branch
cd ${{ github.workspace }}
Expand All @@ -1075,4 +1087,4 @@ jobs:
git config --global user.name 'test-results-uploader'
git config --global user.email '[email protected]'
git commit -qm "Badges for README at ${{ env.GITHUB_COMMIT }}"
git push -f `git remote` badges-${{ env.GITHUB_COMMIT }}:badges
git push -f `git remote` badges-${{ env.GITHUB_COMMIT }}:badges
26 changes: 19 additions & 7 deletions .github/workflows/src/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,25 @@ jobs:
apt-get --allow-unauthenticated install -y curl g++ git make patch zlib1g-dev libssl-dev bsdmainutils dnsutils unzip
# ubuntu-14.04 ca-certificates are out of date
git config --global http.sslVerify false
curl -sS https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz | tar -xJ
cd Python-3.6.9
./configure
# build and install openssl
curl -OsSk https://www.openssl.org/source/openssl-1.1.1v.tar.gz
tar xzf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl
make -j1 depend
make -j8
make install_sw
cd ..
# install ffi.h, which is required for python build
apt install libffi-dev
# build and install python
curl -sSk https://www.python.org/ftp/python/3.11.5/Python-3.11.5.tar.xz | tar -xJ
cd Python-3.11.5
./configure -C --with-openssl=/usr/local/custom-openssl --with-openssl-rpath=auto
make -j8
make install
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.6 3
ln -s /usr/local/bin/python3.6 /usr/bin/python
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 3
ln -s /usr/local/bin/python3.11 /usr/bin/python
curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py | python
curl -sS https://nodejs.org/dist/v12.16.2/node-v12.16.2-linux-x64.tar.xz | tar -xJ
echo "`pwd`/node-v12.16.2-linux-x64/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -163,8 +175,8 @@ jobs:

- name: make badges
run: |
# combine badges from all builds, exclude macos-11
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-11
# combine badges from all builds, exclude macos-11 and ubuntu-14.04
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-11 ubuntu-14.04
# force push to github onto an orphan 'badges' branch
cd ${{ github.workspace }}
Expand Down

0 comments on commit b5c8d2e

Please sign in to comment.