From 3bc4b61e138d85d7031de1b79f7ed84e78c9a358 Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Sun, 22 Sep 2024 11:26:02 -0700 Subject: [PATCH] use brotli instead of gzip for test result compression --- .github/workflows/build.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e28c4b67d..368f9f79a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,16 +191,19 @@ jobs: echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV - name: Compress test results if: always() && (env.JAVA_VERSION == env.PUBLISH_JDK) - run: > - find . -path */jacoco/*.exec -o -path */results/*.xml - | tar czf ${{ env.ARTIFACT_NAME }}.tar.gz --files-from - + run: | + tmp_file=$(mktemp) + tar_file=$(mktemp --suffix=.tar) + find . -path */jacoco/*.exec -o -path */results/*.xml > "$tmp_file" + tar c --files-from="$temp_file" -f "$tar_file" + brotli -o "${{ env.ARTIFACT_NAME }}.tar.br" "$tar_file" - name: Upload test results uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 if: always() && (env.JAVA_VERSION == env.PUBLISH_JDK) with: retention-days: 1 name: ${{ env.ARTIFACT_NAME }}-results - path: ${{ env.ARTIFACT_NAME }}.tar.gz + path: ${{ env.ARTIFACT_NAME }}.tar.br - name: Cancel if failed uses: andymckay/cancel-action@a955d435292c0d409d104b57d8e78435a93a6ef1 # 0.5 continue-on-error: true @@ -239,7 +242,9 @@ jobs: - name: Download Tests Results uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - name: Decompress - run: find . -type f -name '*.tar.gz' -exec sh -c 'tar -zxf {} --one-top-level' \; + run: > + find . -type f -name '*.tar.br' -exec sh -c + 'brotli -d "$1" && tar -xf "${1%.br}" --one-top-level' _ {} \; - name: Combine Jacoco Reports uses: ./.github/actions/run-gradle with: @@ -298,7 +303,9 @@ jobs: - name: Download Tests uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - name: Decompress - run: find . -type f -name '*.tar.gz' -exec sh -c 'tar -zxf {} --one-top-level' \; + run: > + find . -type f -name '*.tar.br' -exec sh -c + 'brotli -d "$1" && tar -xf "${1%.br}" --one-top-level' _ {} \; - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a # v2.17.1 continue-on-error: true