浏览代码

Enable cache for pip (#1380)

Jelmer Vernooij 5 月之前
父节点
当前提交
d70d2065df
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 6 0
      .github/workflows/python-distributions.yml
  2. 1 0
      .github/workflows/pythontest.yml

+ 6 - 0
.github/workflows/python-distributions.yml

@@ -18,6 +18,8 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - uses: actions/setup-python@v5
+        with:
+          cache: pip
       - name: Install native dependencies (Ubuntu)
         run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
         if: "matrix.os == 'ubuntu-latest'"
@@ -46,6 +48,8 @@ jobs:
     steps:
       - uses: actions/checkout@v4
       - uses: actions/setup-python@v5
+        with:
+          cache: pip
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
@@ -64,6 +68,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/setup-python@v5
+        with:
+          cache: pip
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip

+ 1 - 0
.github/workflows/pythontest.yml

@@ -23,6 +23,7 @@ jobs:
         with:
           python-version: ${{ matrix.python-version }}
           allow-prereleases: true
+          cache: pip
       - name: Install native dependencies (Ubuntu)
         run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
         if: "matrix.os == 'ubuntu-latest'"