diff --git a/.gitea/workflows/gentoo-utils.yml b/.gitea/workflows/gentoo-utils.yml index 70584d0..be37515 100644 --- a/.gitea/workflows/gentoo-utils.yml +++ b/.gitea/workflows/gentoo-utils.yml @@ -91,20 +91,22 @@ 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: build - key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} - - name: Checkout repo uses: actions/checkout@v5 - - name: build and check + - name: Build run: | meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized -Ddocs=enabled build meson compile -C build + - name: Cache Build + Subprojects + uses: actions/cache@v4 + with: + path: | + subprojects + build + key: build-${{ gitea.repository }}-${{ gitea.sha }} + # 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: @@ -117,10 +119,13 @@ jobs: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - name: Restore git cache - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: - path: build - key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} + path: | + subprojects + build + key: gitea-repo-${{ gitea.repository }}-${{ gitea.sha }} + - name: Checkout repo uses: actions/checkout@v5 @@ -141,10 +146,12 @@ jobs: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - name: Restore git cache - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: - path: build - key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }} + path: | + subprojects + build + key: gitea-repo-${{ gitea.repository }}-${{ gitea.sha }} - name: Checkout repo uses: actions/checkout@v5 @@ -169,13 +176,21 @@ jobs: check-format: runs-on: gentoo - needs: [build-oci-image] + needs: [build-oci-image, build] container: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: - name: Checkout repo uses: actions/checkout@v5 + - name: Restore git cache + uses: actions/cache/restore@v4 + with: + path: | + subprojects + build + key: gitea-repo-${{ gitea.repository }}-${{ gitea.sha }} + - name: Check Formatting run: | meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build @@ -184,7 +199,7 @@ jobs: docs: runs-on: gentoo - needs: [build-oci-image] + needs: [build-oci-image, build] container: image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }} steps: