-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (45 loc) · 1.27 KB
/
action.yml
File metadata and controls
50 lines (45 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: setup-python2
branding:
icon: "play-circle"
color: "blue"
description: setup python2 by manual compile
inputs:
config_args:
description: Add some extra argument for configure
required: false
default: ""
runs:
using: composite
steps:
- run: sudo apt-get install -y build-essential libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libbz2-dev liblzma-dev libssl-dev libffi-dev
shell: bash
- run: echo "::group::Get & configure python2 source..."
shell: bash
- name: get python source
run: |
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz -O python.tar.gz
tar -xvf python.tar.gz
shell: bash
- name: configure
run: cd Python-2.7.18 && ./configure --with-pydebug ${{inputs.config_args}}
shell: bash
- run: echo "::endgroup::"
shell: bash
- run: echo "::group::Compile&install..."
shell: bash
- name: Compile
run: |
cd Python-2.7.18
make -j$(nproc)
shell: bash
- name: install
run: |
cd Python-2.7.18
sudo make altinstall
sudo update-alternatives --install /usr/bin/python2 python2 /usr/local/bin/python2.7 1
shell: bash
- run: echo "::endgroup::"
shell: bash
- name: clean up...
run: rm -rf Python-2.7.18 && rm python.tar.gz
shell: bash