Skip to content

Commit 13e7430

Browse files
committed
ci: 🎡 refactor CI runner build deps caching
1 parent 1a3b3a7 commit 13e7430

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/wheels.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ jobs:
1919
env:
2020
PCRE_VERSION: "8.45"
2121

22-
outputs:
23-
build-deps-cache-key: ${{ steps.build-deps-cache-key.outputs.value }}
2422
strategy:
2523
fail-fast: true
2624
matrix:
27-
os: [ubuntu-22.04, macos-12-xl, flyci-macos-large-latest-m1]
25+
include:
26+
- os: ubuntu-22.04
27+
platform_id: manylinux_x86_64
28+
- os: ubuntu-22.04
29+
platform_id: musllinux_x86_64
30+
- os: ubicloud-standard-2-arm
31+
platform_id: manylinux_aarch64
32+
- os: macos-12-xl
33+
platform_id: macosx_x86_64
34+
- os: flyci-macos-large-latest-m1
35+
platform_id: macosx_arm64
2836

2937
steps:
3038
- name: Checkout python-hyperscan
@@ -43,7 +51,7 @@ jobs:
4351
if: contains(matrix.os, 'macos')
4452
uses: actions/cache/restore@v4
4553
with:
46-
key: build-deps-${{ runner.os }}-${{ matrix.os }}
54+
key: build-deps-${{ matrix.os }}-${{ matrix.platform_id }}
4755
path: |
4856
/opt/vectorscan
4957
/opt/pcre
@@ -62,11 +70,6 @@ jobs:
6270
/opt/vectorscan
6371
/opt/pcre
6472
65-
- name: Capture build dependencies cache key
66-
id: build-deps-cache-key
67-
run: |
68-
echo "value=${{ contains(matrix.os, 'macos') && steps.build-deps-macos.outputs.cache-primary-key || '' }}" >> $GITHUB_OUTPUT
69-
7073
build_wheels:
7174
name: ${{ matrix.python_id }}-${{ matrix.platform_id }} wheel
7275
runs-on: ${{ matrix.os }}
@@ -256,7 +259,7 @@ jobs:
256259
if: contains(matrix.os, 'macos')
257260
uses: actions/cache/restore@v4
258261
with:
259-
key: ${{ needs.build_environment.outputs.build-deps-cache-key }}
262+
key: build-deps-${{ matrix.os }}-${{ matrix.platform_id }}
260263
path: |
261264
/opt/vectorscan
262265
/opt/pcre

0 commit comments

Comments
 (0)