build-cache.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. name: Build Actions Cache
  2. on:
  3. workflow_dispatch: # allows manual triggering
  4. schedule:
  5. - cron: '0 * * * *'
  6. concurrency:
  7. group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. ubuntu-24-vulkan-cache:
  11. runs-on: ubuntu-24.04
  12. steps:
  13. - name: Clone
  14. id: checkout
  15. uses: actions/checkout@v4
  16. - name: Get latest Vulkan SDK version
  17. id: vulkan_sdk_version
  18. run: |
  19. echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
  20. - name: Setup Cache
  21. uses: actions/cache@v4
  22. id: cache-sdk
  23. with:
  24. path: ./vulkan_sdk
  25. key: vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
  26. - name: Setup Vulkan SDK
  27. if: steps.cache-sdk.outputs.cache-hit != 'true'
  28. uses: ./.github/actions/linux-setup-vulkan
  29. with:
  30. path: ./vulkan_sdk
  31. version: ${{ env.VULKAN_SDK_VERSION }}
  32. ubuntu-24-spacemit-cache:
  33. runs-on: ubuntu-24.04
  34. env:
  35. # Make sure this is in sync with build-linux-cross.yml
  36. SPACEMIT_IME_TOOLCHAIN_VERSION: "1.1.2"
  37. steps:
  38. - name: Clone
  39. id: checkout
  40. uses: actions/checkout@v4
  41. - name: Setup Cache
  42. uses: actions/cache@v4
  43. id: cache-toolchain
  44. with:
  45. path: ./spacemit_toolchain
  46. key: spacemit-ime-toolchain-v${{ env.SPACEMIT_IME_TOOLCHAIN_VERSION }}-${{ runner.os }}
  47. - name: Setup SpacemiT Toolchain
  48. if: steps.cache-toolchain.outputs.cache-hit != 'true'
  49. uses: ./.github/actions/linux-setup-spacemit
  50. with:
  51. path: ./spacemit_toolchain
  52. version: ${{ env.SPACEMIT_IME_TOOLCHAIN_VERSION }}
  53. windows-2022-rocm-cache:
  54. runs-on: windows-2022
  55. env:
  56. # Make sure this is in sync with build.yml
  57. HIPSDK_INSTALLER_VERSION: "25.Q3"
  58. steps:
  59. - name: Clone
  60. id: checkout
  61. uses: actions/checkout@v4
  62. - name: Setup Cache
  63. uses: actions/cache@v4
  64. id: cache-rocm
  65. with:
  66. path: C:\Program Files\AMD\ROCm
  67. key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
  68. - name: Setup ROCm
  69. if: steps.cache-rocm.outputs.cache-hit != 'true'
  70. uses: ./.github/actions/windows-setup-rocm
  71. with:
  72. version: ${{ env.HIPSDK_INSTALLER_VERSION }}