Skip to content

Commit daf8318

Browse files
Copilotluzfcb
andcommitted
Use ubuntu-22.04 and install Python 3.5.10 via pyenv in GH Actions workflows (cache pyenv versions)
Co-authored-by: luzfcb <[email protected]>
1 parent a98e3f0 commit daf8318

File tree

2 files changed

+52
-11
lines changed

2 files changed

+52
-11
lines changed

.github/workflows/build-test.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,38 @@ permissions:
1212
jobs:
1313
build:
1414
name: Build
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-22.04
1616
steps:
1717
- name: Checkout do repositório
1818
uses: actions/checkout@v5
1919
with:
2020
submodules: recursive
2121

22-
- name: Configura python
23-
uses: actions/setup-python@v6
22+
- name: Instala dependências de compilação
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
26+
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
27+
xz-utils tk-dev libffi-dev liblzma-dev
28+
29+
- name: Cache pyenv versions
30+
uses: actions/cache@v4
2431
with:
25-
python-version: '3.5.10'
26-
cache: pip
32+
path: $HOME/.pyenv/versions
33+
key: ${{ runner.os }}-pyenv-3.5.10
34+
restore-keys: |
35+
${{ runner.os }}-pyenv-
36+
37+
- name: Instala pyenv e Python 3.5.10
38+
run: |
39+
curl https://pyenv.run | bash
40+
export PYENV_ROOT="$HOME/.pyenv"
41+
export PATH="$PYENV_ROOT/bin:$PATH"
42+
eval "$(pyenv init -)"
43+
pyenv install -s 3.5.10
44+
pyenv global 3.5.10
45+
python --version
46+
python -m pip install --upgrade pip setuptools wheel
2747
2848
- name: Instala dependências
2949
run: pip install -r requirements.txt

.github/workflows/github-pages.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,38 @@ concurrency:
1515
jobs:
1616
build:
1717
name: Build
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: Checkout do repositório
2121
uses: actions/checkout@v5
2222
with:
2323
submodules: recursive
2424

25-
- name: Configura python
26-
uses: actions/setup-python@v6
25+
- name: Instala dependências de compilação
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
29+
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
30+
xz-utils tk-dev libffi-dev liblzma-dev
31+
32+
- name: Cache pyenv versions
33+
uses: actions/cache@v4
2734
with:
28-
python-version: '3.5.10'
29-
cache: pip
35+
path: $HOME/.pyenv/versions
36+
key: ${{ runner.os }}-pyenv-3.5.10
37+
restore-keys: |
38+
${{ runner.os }}-pyenv-
39+
40+
- name: Instala pyenv e Python 3.5.10
41+
run: |
42+
curl https://pyenv.run | bash
43+
export PYENV_ROOT="$HOME/.pyenv"
44+
export PATH="$PYENV_ROOT/bin:$PATH"
45+
eval "$(pyenv init -)"
46+
pyenv install -s 3.5.10
47+
pyenv global 3.5.10
48+
python --version
49+
python -m pip install --upgrade pip setuptools wheel
3050
3151
- name: Instala dependências
3252
run: pip install -r requirements.txt
@@ -45,11 +65,12 @@ jobs:
4565
permissions:
4666
pages: write
4767
id-token: write
48-
runs-on: ubuntu-20.04
68+
runs-on: ubuntu-22.04
4969
environment:
5070
name: github-pages
5171
url: ${{ steps.deployment.outputs.page_url }}
5272
steps:
5373
- name: Deploy no GitHub Pages
5474
id: deployment
5575
uses: actions/deploy-pages@v4
76+

0 commit comments

Comments
 (0)