Skip to content

Commit 45da211

Browse files
committed
Fix Python 3.4 tests on CI
1 parent ec2b255 commit 45da211

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

.github/workflows/main.yml

+37-10
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,49 @@ jobs:
2828

2929
tests_py34:
3030
runs-on: ubuntu-20.04
31-
container: python:3.4
3231
strategy:
3332
fail-fast: false
3433

35-
env:
36-
# Run actions/checkout@v3
37-
# /__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /__e/node20/bin/node)
38-
#
39-
# https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
40-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
41-
4234
steps:
43-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
36+
37+
- name: Build OpenSSL 1.0.2 (required by Python 3.4)
38+
run: |
39+
sudo apt-get install build-essential zlib1g-dev
40+
41+
cd $RUNNER_TEMP
42+
wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_0_2u/openssl-1.0.2u.tar.gz
43+
tar -xf openssl-1.0.2u.tar.gz
44+
cd openssl-1.0.2u
45+
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib-dynamic
46+
make
47+
sudo make install
48+
49+
echo CFLAGS="-I/usr/local/ssl/include $CFLAGS" >> $GITHUB_ENV
50+
echo LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" >> $GITHUB_ENV
51+
echo LD_LIBRARY_PATH="/usr/local/ssl/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
52+
53+
sudo ln -s /usr/local/ssl/lib/libssl.so.1.0.0 /usr/lib/libssl.so.1.0.0
54+
sudo ln -s /usr/local/ssl/lib/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.1.0.0
55+
sudo ldconfig
56+
57+
- name: Build Python 3.4
58+
run: |
59+
sudo apt-get install build-essential libncurses5-dev libgdbm-dev libnss3-dev libreadline-dev zlib1g-dev
60+
61+
cd $RUNNER_TEMP
62+
wget -O cpython-3.4.10.zip https://github.com/python/cpython/archive/refs/tags/v3.4.10.zip
63+
unzip cpython-3.4.10.zip
64+
cd cpython-3.4.10
65+
./configure
66+
make
67+
sudo make install
68+
69+
python3.4 --version
70+
python3.4 -c 'import ssl'
4471
4572
- name: Install dependencies
46-
run: $PIP install virtualenv tox
73+
run: $PIP install virtualenv==20.4.7 tox==3.28.0
4774

4875
- name: Run the unit tests
4976
run: TOXENV=py34 tox

0 commit comments

Comments
 (0)