summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2022-12-23 09:21:51 +0100
committerStefan Behnel <stefan_ml@behnel.de>2022-12-23 09:21:51 +0100
commit6ae1f5d5969f7b8aee0b7ce9a0436f6e235cd52a (patch)
tree6434ebf692fe5f3ba78b3b59da1a4bfb81385eb5
parent3e0eea07932963b43ced494ea85830e472f73cc3 (diff)
downloadpython-lxml-6ae1f5d5969f7b8aee0b7ce9a0436f6e235cd52a.tar.gz
Add CI caching for the library download files to avoid excessive remote access.
-rw-r--r--.github/workflows/ci.yml10
-rw-r--r--.github/workflows/wheels.yml19
2 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d49f0ae8..605cf7c3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -159,6 +159,16 @@ jobs:
path: ~/.ccache
key: ${{ runner.os }}-ccache${{ matrix.extra_hash }}-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/ci.yml', 'tools/ci-run.sh') }}
+ - name: Cache [libs]
+ uses: actions/cache@v3
+ if: ${{ matrix.env.STATIC_DEPS == 'true' }}
+ with:
+ path: |
+ libs/*.xz
+ libs/*.gz
+ libs/*.zip
+ key: libs-${{ env.LIBXML2_VERSION }}-${{ env.LIBXSLT_VERSION }}${{ matrix.extra_hash }}
+
- name: Run CI
continue-on-error: ${{ matrix.allowed_failure || false }}
env: ${{ matrix.env }}
diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml
index 66fca606..4963a148 100644
--- a/.github/workflows/wheels.yml
+++ b/.github/workflows/wheels.yml
@@ -110,6 +110,15 @@ jobs:
- name: Install dependencies
run: python -m pip install -r requirements.txt
+ - name: Cache [libs]
+ uses: actions/cache@v3
+ with:
+ path: |
+ libs/*.xz
+ libs/*.gz
+ libs/*.zip
+ key: linux-libs
+
- name: Build Linux wheels
run: make sdist wheel_${{ matrix.image }}
env: { STATIC_DEPS: true, PYTHON_BUILD_VERSION: "${{ matrix.pyversion }}" }
@@ -166,6 +175,16 @@ jobs:
- name: Install dependencies
run: python -m pip install setuptools wheel -r requirements.txt
+ - name: Cache [libs]
+ uses: actions/cache@v3
+ if: startsWith(runner.os, 'macos-')
+ with:
+ path: |
+ libs/*.xz
+ libs/*.gz
+ libs/*.zip
+ key: non-linux-libs
+
- name: Build wheels
run: make sdist wheel
env: { STATIC_DEPS: true, RUN_TESTS: true }