From a42bac6fccdfa286ba9a0b9e5de325e5acffddd4 Mon Sep 17 00:00:00 2001 From: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com> Date: Wed, 19 Apr 2023 16:07:34 -0400 Subject: [PATCH] fix: only cache java packages and not source content (#1750) * fix: only cache java packages and not source content Signed-off-by: Christopher Phillips * fix: add gradle to matched files for ci checksum Signed-off-by: Christopher Phillips --------- Signed-off-by: Christopher Phillips --- .github/workflows/validations.yaml | 2 +- syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validations.yaml b/.github/workflows/validations.yaml index 2ed621fa4..9ddb8c965 100644 --- a/.github/workflows/validations.yaml +++ b/.github/workflows/validations.yaml @@ -36,7 +36,7 @@ jobs: - name: Restore Java test-fixture cache uses: actions/cache@v3 with: - path: syft/pkg/cataloger/java/test-fixtures/java-builds + path: syft/pkg/cataloger/java/test-fixtures/java-builds/packages key: ${{ runner.os }}-unit-java-cache-${{ hashFiles( 'syft/pkg/cataloger/java/test-fixtures/java-builds/cache.fingerprint' ) }} - name: Restore RPM test-fixture cache diff --git a/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile b/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile index 17c42ea11..1970b42f8 100644 --- a/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile +++ b/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile @@ -74,5 +74,5 @@ $(PKGSDIR)/gcc-amd64-darwin-exec-debug: # we need a way to determine if CI should bust the test cache based on the source material .PHONY: cache.fingerprint cache.fingerprint: - find example-* build-* Makefile -type f -exec sha256sum {} \; | sort | tee /dev/stderr | tee cache.fingerprint + find example* build* gradle* Makefile -type f -exec sha256sum {} \; | sort | tee /dev/stderr | tee cache.fingerprint sha256sum cache.fingerprint