action.yml 1.0 KB

1234567891011121314151617181920212223242526
  1. name: cache-folly
  2. description: Cache folly build to speed up CI
  3. outputs:
  4. cache-hit:
  5. description: Whether the cache was hit
  6. value: ${{ steps.cache-folly-build.outputs.cache-hit }}
  7. runs:
  8. using: composite
  9. steps:
  10. - name: Extract FOLLY_COMMIT_HASH from Makefile
  11. id: extract-folly-hash
  12. shell: bash
  13. run: |
  14. FOLLY_COMMIT_HASH=$(grep '^FOLLY_COMMIT_HASH' Makefile | awk '{print $3}')
  15. echo "hash=$FOLLY_COMMIT_HASH" >> $GITHUB_OUTPUT
  16. - name: Cache folly build
  17. id: cache-folly-build
  18. uses: actions/cache@v4
  19. with:
  20. # Cache the folly build directory
  21. path: /tmp/fbcode_builder_getdeps-Z__wZrocksdbZrocksdbZthird-partyZfollyZbuildZfbcode_builder-root/installed
  22. # Key is based on:
  23. # - OS and architecture
  24. # - The specific folly commit hash from Makefile
  25. # - The container image version to account for different compiler/library versions
  26. key: folly-build-${{ runner.os }}-${{ runner.arch }}-${{ steps.extract-folly-hash.outputs.hash }}-ubuntu22.1-v1