Skip to content

Commit 7950b44

Browse files
committed
CI: Hopefully fix caching and artifact uploads by creating $JOBID
as a unique key for each job in the matrix, using that as the cache key and in each artefact upload (otherwise multiple failures uploading "error_log" overwrite each other). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916051 13f79535-47bb-0310-9956-ffa450edef68
1 parent d57a750 commit 7950b44

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/linux.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ jobs:
277277
name: ${{ matrix.name }}
278278
steps:
279279
- name: Set environment variables
280-
run: echo "${{ matrix.env }}" >> $GITHUB_ENV
280+
run: |
281+
echo "${{ matrix.env }}" >> $GITHUB_ENV
282+
echo JOBID=`echo "${{ matrix.notest-cflags }} ${{ matrix.env }} ${{ matrix.config }}'"| md5sum - | sed 's/ .*//'` >> $GITHUB_ENV
281283
- name: apt refresh
282284
run: sudo apt-get -o Acquire::Retries=5 update
283285
- name: Install prerequisites
@@ -287,34 +289,30 @@ jobs:
287289
libnghttp2-dev libjansson-dev libpcre2-dev gdb
288290
perl-doc ${{ matrix.pkgs }}
289291
- uses: actions/checkout@v3
290-
- name: Cache APR build
292+
- name: Cache installed libraries
291293
uses: actions/cache@v3
292-
env:
293-
cache-name: cache-apru
294294
with:
295295
path: ~/root
296-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/home/runner/root/.key-*') }}
296+
key: cache-libs-${{ env.JOBID }}
297297
- name: Cache CPAN modules
298298
uses: actions/cache@v3
299-
env:
300-
cache-name: cache-cpan
301299
with:
302300
path: ~/perl5
303-
key: ${{ runner.os }}-cpan-${{ env.cache-name }}-${{ hashFiles('/home/runner/perl5/.key') }}
301+
key: cache-cpan-${{ env.JOBID }}
304302
- name: Configure environment
305303
run: ./test/travis_before_linux.sh
306304
timeout-minutes: 15
307305
- uses: actions/upload-artifact@v3
308306
if: failure()
309307
with:
310-
name: config.log ${{ matrix.node-version }}
308+
name: config.log-${{ env.JOBID }}
311309
path: |
312310
/home/runner/build/**/config.log
313311
- name: Build and test
314312
run: ./test/travis_run_linux.sh
315313
- uses: actions/upload-artifact@v3
316314
if: failure()
317315
with:
318-
name: error_log ${{ matrix.node-version }}
316+
name: error_log-${{ env.JOBID }}
319317
path: test/perl-framework/t/logs/error_log
320318

0 commit comments

Comments
 (0)