Skip to content

Commit 5db1d2d

Browse files
authored
Merge pull request #322 from tlsfuzzer/py27-ci-fixes
fix CI for python2.7
2 parents 74f8879 + c586ada commit 5db1d2d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,20 @@ jobs:
160160
run: git fetch origin master:refs/remotes/origin/master
161161
- name: Set up Python ${{ matrix.python-version }}
162162
# we use containers to use the native python version from them
163-
if: ${{ !matrix.container }}
163+
if: ${{ !matrix.container && matrix.python-version != '2.7' }}
164164
uses: actions/setup-python@v2
165165
with:
166166
python-version: ${{ matrix.python-version }}
167+
- name: Ensure python 2.7
168+
if: matrix.python-version == '2.7'
169+
run: |
170+
sudo apt-get update
171+
sudo apt-get install -y \
172+
python2.7 python2.7-dev python-pip-whl
173+
sudo ln -sf python2.7 /usr/bin/python
174+
export PYTHONPATH=`echo /usr/share/python-wheels/pip-*py2*.whl`
175+
sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
176+
sudo chown -R $USER /usr/local/lib/python2.7
167177
- name: Display Python version
168178
run: python -c "import sys; print(sys.version)"
169179
- name: Display installed python package versions

0 commit comments

Comments
 (0)