Skip to content

Commit b350c53

Browse files
Merge branch '11.5' into 12.3
* 11.5: Cache Composer's cache directory Revert "Cache Composer's cache directory" Cache Composer's cache directory
2 parents 44f1531 + c2f607a commit b350c53

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ jobs:
4646
- name: Ensure that composer.json is valid
4747
run: ./tools/composer validate --no-ansi --strict composer.json
4848

49+
- name: Get Composer cache directory
50+
id: composer-cache
51+
shell: bash
52+
run: |
53+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
54+
55+
- name: Cache Composer cache directory
56+
uses: actions/cache@v4
57+
with:
58+
path: ${{ steps.composer-cache.outputs.dir }}
59+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
60+
restore-keys: ${{ runner.os }}-composer-
61+
4962
- name: Ensure that dependencies can be installed
5063
run: ./tools/composer install --no-ansi --dry-run
5164

@@ -112,6 +125,19 @@ jobs:
112125
coverage: none
113126
tools: none
114127

128+
- name: Get Composer cache directory
129+
id: composer-cache
130+
shell: bash
131+
run: |
132+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
133+
134+
- name: Cache Composer cache directory
135+
uses: actions/cache@v4
136+
with:
137+
path: ${{ steps.composer-cache.outputs.dir }}
138+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
139+
restore-keys: ${{ runner.os }}-composer-
140+
115141
- name: Install dependencies with Composer
116142
run: ./tools/composer install --no-interaction --no-ansi --no-progress
117143

@@ -170,6 +196,19 @@ jobs:
170196
ini-values: ${{ env.PHP_INI_VALUES }}
171197
tools: none
172198

199+
- name: Get Composer cache directory
200+
id: composer-cache
201+
shell: bash
202+
run: |
203+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
204+
205+
- name: Cache Composer cache directory
206+
uses: actions/cache@v4
207+
with:
208+
path: ${{ steps.composer-cache.outputs.dir }}
209+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
210+
restore-keys: ${{ runner.os }}-composer-
211+
173212
- name: Install dependencies with Composer
174213
run: php ./tools/composer install --no-ansi --no-interaction --no-progress
175214

@@ -228,6 +267,19 @@ jobs:
228267
ini-values: ${{ env.PHP_INI_VALUES }}
229268
tools: none
230269

270+
- name: Get Composer cache directory
271+
id: composer-cache
272+
shell: bash
273+
run: |
274+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
275+
276+
- name: Cache Composer cache directory
277+
uses: actions/cache@v4
278+
with:
279+
path: ${{ steps.composer-cache.outputs.dir }}
280+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
281+
restore-keys: ${{ runner.os }}-composer-
282+
231283
- name: Install dependencies with Composer
232284
run: php ./tools/composer install --no-ansi --no-interaction --no-progress
233285

@@ -267,6 +319,19 @@ jobs:
267319
ini-values: zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
268320
tools: none
269321

322+
- name: Get Composer cache directory
323+
id: composer-cache
324+
shell: bash
325+
run: |
326+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
327+
328+
- name: Cache Composer cache directory
329+
uses: actions/cache@v4
330+
with:
331+
path: ${{ steps.composer-cache.outputs.dir }}
332+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
333+
restore-keys: ${{ runner.os }}-composer-
334+
270335
- name: Install dependencies with Composer
271336
run: ./tools/composer install --no-ansi --no-interaction --no-progress
272337

0 commit comments

Comments
 (0)