From 1db4ecb1bb39e918c2fc1c3d13fd1807f0070ebc Mon Sep 17 00:00:00 2001 From: penguin Date: Sat, 27 Dec 2025 12:27:26 -0600 Subject: [PATCH] ci: fix build cache path --- .gitea/workflows/gentoo-utils.yml | 47 ++++++++++++++----------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/gentoo-utils.yml b/.gitea/workflows/gentoo-utils.yml index 5d944d7..8f2049e 100644 --- a/.gitea/workflows/gentoo-utils.yml +++ b/.gitea/workflows/gentoo-utils.yml @@ -22,7 +22,7 @@ jobs: key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -91,20 +91,25 @@ jobs: container: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - - name: Restore git cache - uses: actions/cache@v4 - with: - path: .git - key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} - - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - - name: build and check + # TODO: This is currently unused by other jobs. I couldn't make meson not regenerate things regardless of + # the build dir already existing. + - name: Build Cache Setup + uses: actions/cache@v5 + with: + path: | + subprojects + build + key: build-${{ gitea.repository }}-${{ gitea.sha }} + + - name: Build run: | meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized -Ddocs=enabled build meson compile -C build + # FIXME: Currently this rebuilds everything. Instead we should bring over the build dir from the build job. This will come in handy # when we have multiple build targets and configs. What we have currently is fine until we get lots of builds going test: @@ -112,17 +117,12 @@ jobs: env: CC: "clang" CXX: "clang++" - needs: [build-oci-image, build] + needs: [build-oci-image] container: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - - name: Restore git cache - uses: actions/cache@v4 - with: - path: .git - key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: test run: | @@ -136,17 +136,12 @@ jobs: CC: "clang" CXX: "clang++" FUZZER_TIMEOUT_S: 300 - needs: [build-oci-image, build] + needs: [build-oci-image] container: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - - name: Restore git cache - uses: actions/cache@v4 - with: - path: .git - key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 # FIXME: Get rid of this step when portage has fixes merged? # needed because portage has fixes upstream we need that arent stable yet @@ -174,7 +169,7 @@ jobs: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Check Formatting run: | @@ -189,7 +184,7 @@ jobs: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Build Documentation run: | @@ -203,7 +198,7 @@ jobs: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: grep for patterns # negate git grep ret code because 1 means no findings