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