CI: Use faster zstd for repo archives (#7868)

This commit is contained in:
Geza Lore 2026-07-05 09:24:33 +01:00 committed by GitHub
parent 2285e5b6da
commit 13236822d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 8 deletions

View File

@ -121,7 +121,7 @@ jobs:
- name: Unpack repository archive
run: |
tar -x -z -f ${{ needs.build.outputs.archive }}
tar --zstd -x -f ${{ needs.build.outputs.archive }}
ls -lsha
- name: Download code coverage data

View File

@ -88,8 +88,9 @@ jobs:
working-directory: ${{ github.workspace }}
run: |
# Name of the archive must be unique based on the build parameters
ARCHIVE=verilator-${{ inputs.sha }}-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.dev-asan }}-${{ inputs.dev-gcov }}.tar.gz
tar --posix -c -z -f $ARCHIVE repo
ARCHIVE=verilator-${{ inputs.sha }}-${{ inputs.os }}-${{ inputs.cc }}-${{ inputs.dev-asan }}-${{ inputs.dev-gcov }}.tar.zst
# zstd compresses faster than gzip and decompresses far faster in the many downstream test jobs
ZSTD_NBTHREADS=0 tar --posix --zstd -c -f $ARCHIVE repo
echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT"
- name: Upload repository archive
@ -97,3 +98,5 @@ jobs:
with:
path: ${{ github.workspace }}/${{ steps.create-archive.outputs.archive }}
name: ${{ steps.create-archive.outputs.archive }}
# Archive is already zstd-compressed; skip upload-artifact's zip pass
compression-level: 0

View File

@ -84,8 +84,9 @@ jobs:
id: create-archive
run: |
SHA=$(git -C repo rev-parse HEAD)
ARCHIVE=verilator-$SHA-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}.tar.gz
tar --posix -c -z -f $ARCHIVE install
ARCHIVE=verilator-$SHA-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }}.tar.zst
# zstd compresses faster than gzip and decompresses far faster in the downstream run jobs
ZSTD_NBTHREADS=0 tar --posix --zstd -c -f $ARCHIVE install
echo "archive=$ARCHIVE" >> $GITHUB_OUTPUT
- name: Upload Verilator installation archive
@ -94,3 +95,5 @@ jobs:
path: ${{ steps.create-archive.outputs.archive }}
name: ${{ steps.create-archive.outputs.archive }}
overwrite: true
# Archive is already zstd-compressed; skip upload-artifact's zip pass
compression-level: 0

View File

@ -101,7 +101,7 @@ jobs:
- name: Unpack Verilator installation archive - new
run: |
tar -x -z -f ${{ inputs.verilator-archive-new }}
tar --zstd -x -f ${{ inputs.verilator-archive-new }}
mv install verilator-new
- name: Compile cases - new
@ -164,7 +164,7 @@ jobs:
- name: Unpack Verilator installation archive - old
if: ${{ inputs.verilator-archive-old != '' }}
run: |
tar -x -z -f ${{ inputs.verilator-archive-old }}
tar --zstd -x -f ${{ inputs.verilator-archive-old }}
mv install verilator-old
- name: Compile cases - old

View File

@ -63,7 +63,7 @@ jobs:
- name: Unpack repository archive
working-directory: ${{ github.workspace }}
run: |
tar -x -z -f ${{ inputs.archive }}
tar --zstd -x -f ${{ inputs.archive }}
ls -lsha
- name: Cache $CCACHE_DIR