Skip to content

Commit 32262df

Browse files
committed
- cache the pyenv build for old versions of wget in the wget workflow.
1 parent accb185 commit 32262df

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/wget.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ jobs:
6262
libtasn1-bin libtasn1-6-dev libunistring-dev libp11-kit-dev libunbound-dev \
6363
wget git flex autoconf-archive libhttp-daemon-perl
6464
65-
# ───────────── cache the wolfssl/gnutls tool-chain ─────────────
6665
- name: Restore cached gnutls-wolfssl
6766
id: cache-gnutls
6867
uses: actions/cache@v4
@@ -174,6 +173,13 @@ jobs:
174173
run: |
175174
make -j $(nproc)
176175
# Get python 3.11 for old versions of wget
176+
- name: Cache pyenv Python 3.11.9
177+
id: cache-pyenv
178+
if: matrix.wget_ref == 'v1.21.3' || matrix.wget_ref == 'v1.21.4'
179+
uses: actions/cache@v4
180+
with:
181+
path: ~/.pyenv
182+
key: pyenv-3.11.9-${{ matrix.os }}-${{ matrix.use_container }}
177183
- name: Install pyenv dependencies
178184
if: matrix.wget_ref == 'v1.21.3' || matrix.wget_ref == 'v1.21.4'
179185
run: |
@@ -183,7 +189,7 @@ jobs:
183189
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
184190
libffi-dev liblzma-dev
185191
- name: Install pyenv
186-
if: matrix.wget_ref == 'v1.21.3' || matrix.wget_ref == 'v1.21.4'
192+
if: (matrix.wget_ref == 'v1.21.3' || matrix.wget_ref == 'v1.21.4') && steps.cache-pyenv.outputs.cache-hit != 'true'
187193
run: |
188194
curl https://pyenv.run | bash
189195
- name: Test wget
@@ -195,7 +201,7 @@ jobs:
195201
export PATH="$PYENV_ROOT/bin:$PATH"
196202
eval "$(pyenv init --path)"
197203
eval "$(pyenv virtualenv-init -)"
198-
pyenv install 3.11.9
204+
pyenv install -s 3.11.9
199205
pyenv global 3.11.9
200206
python --version
201207
fi

0 commit comments

Comments
 (0)