Skip to content

Commit

Permalink
Always update caches, even if the build failed
Browse files Browse the repository at this point in the history
  • Loading branch information
grg-haas committed Jun 11, 2024
1 parent ec6e90c commit e310f6a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,16 @@ jobs:
tar -cf - $COMPRESSDIRS | xz -9 -T0 > build.tar.xz
- name: Upload build directory
uses: actions/upload-artifact@v4
with:
name: keystone-${{ matrix.platform }}${{ matrix.bits }}-builddir
path: build.tar.xz
retention-days: 7
compression-level: 0A

- name: Compress cache directories
if: success() || failure()
run: |
# Clear out old bundles
rm -f dl.tar ccache.tar.xz
Expand All @@ -188,15 +197,8 @@ jobs:
tar --null -cf - -T - | xz -9 -T0 > ccache.tar.xz
fi
- name: Upload build directory
uses: actions/upload-artifact@v4
with:
name: keystone-${{ matrix.platform }}${{ matrix.bits }}-builddir
path: build.tar.xz
retention-days: 7
compression-level: 0

- name: Upload buildroot package directory
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: keystone-${{ matrix.platform }}${{ matrix.bits }}-buildroot-dl
Expand All @@ -205,6 +207,7 @@ jobs:
compression-level: 0

- name: Upload ccache directory
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: keystone-${{ matrix.platform }}${{ matrix.bits }}-ccache
Expand All @@ -219,6 +222,7 @@ jobs:
# Combine cache directories to save space
combine-caches:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: build
steps:
- name: Install dependencies
Expand Down

0 comments on commit e310f6a

Please sign in to comment.