Skip to content

Commit

Permalink
fix python 2.7 ci by installing manually
Browse files Browse the repository at this point in the history
  • Loading branch information
lihsai0 committed Jul 21, 2023
1 parent 99a3c6f commit 8890e33
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@ jobs:
fail-fast: false
max-parallel: 1
matrix:
python_version: ['2.7', '3.4.10', '3.5', '3.6', '3.7', '3.8', '3.9']
python_version: ['2.7.18', '3.4.10', '3.5', '3.6', '3.7', '3.8', '3.9']
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Setup python
if: ${{ matrix.python_version != '3.4.10' }}
if: ${{ matrix.python_version != '2.7.18' && matrix.python_version != '3.4.10' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
architecture: x64
- name: Setup python manually
if: ${{ matrix.python_version == '3.4.10' }}
if: ${{ matrix.python_version == '2.7.18' || matrix.python_version == '3.4.10' }}
env:
PYTHON_VERSION: ${{ matrix.python_version }}
PYTHON_SOURCE_URL: https://www.python.org/ftp/python/${{ matrix.python_version }}/Python-${{ matrix.python_version }}.tgz
PIP_BOOTSTRAP_SCRIPT_URL: https://bootstrap.pypa.io/pip
run: |
cd /tmp
curl -s -L "$PYTHON_SOURCE_URL" | tar -zxf - -C ./
Expand All @@ -31,6 +33,11 @@ jobs:
make
sudo make install
echo 'export PATH="/opt/python/bin:$PATH"' >> $HOME/.bashrc
if ! command -v pip &> /dev/null; \
# not work with 3.10.x
curl -s -L "$PIP_BOOTSTRAP_SCRIPT_URL/${PYTHON_VERSION:0:3}/get-pip.py" > get-pip.py \
python get-pip.py \
fi
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit 8890e33

Please sign in to comment.